Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelDkhn committed Oct 26, 2023
1 parent 1ec3069 commit d68da4f
Show file tree
Hide file tree
Showing 33 changed files with 70 additions and 73 deletions.
5 changes: 1 addition & 4 deletions Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@ cubit = { git = "https://github.com/raphaelDkhn/cubit.git" }
[scripts]
sierra = "cairo-compile . -r"
docgen = "cd docgen && cargo run"
nodegen = "python3 nodegen/node/__init__.py"

# [workspace]
# members = ["tests/"]
nodegen = "python3 nodegen/node/__init__.py"
1 change: 1 addition & 0 deletions src/lib.cairo
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mod operators;
mod numbers;
mod utils;
mod test_helper;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 6 additions & 7 deletions tests/lib.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// mod numbers;
// // mod performance;
// // mod tensor_core;
// // mod nodes;
// mod helpers;
// // mod ml;
// // mod operators;
mod numbers;
mod performance;
mod tensor_core;
mod nodes;
mod ml;
mod operators;
6 changes: 3 additions & 3 deletions tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod tensor_1D {
use array::ArrayTrait;
use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper;
use orion::test_helper::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
Expand All @@ -31,7 +31,7 @@ mod tensor_2D {
use array::ArrayTrait;
use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper;
use orion::test_helper::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
Expand Down Expand Up @@ -60,7 +60,7 @@ mod tensor_3D {
use array::ArrayTrait;
use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper;
use orion::test_helper::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
Expand Down
6 changes: 3 additions & 3 deletions tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod tensor_1D {
use array::ArrayTrait;
use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper;
use orion::test_helper::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};

Expand All @@ -29,7 +29,7 @@ mod tensor_2D {
use array::ArrayTrait;
use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper;
use orion::test_helper::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};

Expand All @@ -56,7 +56,7 @@ mod tensor_3D {
use array::ArrayTrait;
use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper;
use orion::test_helper::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};

Expand Down
6 changes: 3 additions & 3 deletions tests/tensor_core/at/at_i32_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod tensor_1D {
use array::ArrayTrait;
use orion::operators::tensor::I32Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::i32::i32_tensor_1x3_helper;
use orion::test_helper::tensor::i32::i32_tensor_1x3_helper;


#[test]
Expand All @@ -28,7 +28,7 @@ mod tensor_2D {
use array::ArrayTrait;
use orion::operators::tensor::I32Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::i32::i32_tensor_2x2_helper;
use orion::test_helper::tensor::i32::i32_tensor_2x2_helper;


#[test]
Expand All @@ -53,7 +53,7 @@ mod tensor_3D {
use array::ArrayTrait;
use orion::operators::tensor::I32Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::i32::i32_tensor_2x2x2_helper;
use orion::test_helper::tensor::i32::i32_tensor_2x2x2_helper;


#[test]
Expand Down
6 changes: 3 additions & 3 deletions tests/tensor_core/at/at_u32_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod tensor_1D {
use array::ArrayTrait;
use orion::operators::tensor::U32Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::u32::u32_tensor_1x3_helper;
use orion::test_helper::tensor::u32::u32_tensor_1x3_helper;


#[test]
Expand All @@ -28,7 +28,7 @@ mod tensor_2D {
use array::ArrayTrait;
use orion::operators::tensor::U32Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::u32::u32_tensor_2x2_helper;
use orion::test_helper::tensor::u32::u32_tensor_2x2_helper;


#[test]
Expand All @@ -53,7 +53,7 @@ mod tensor_3D {
use array::ArrayTrait;
use orion::operators::tensor::U32Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::u32::u32_tensor_2x2x2_helper;
use orion::test_helper::tensor::u32::u32_tensor_2x2x2_helper;


#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
mod tensor_1D {
use core::traits::Into;
use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor;
use orion::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper;
use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper;
use orion::operators::tensor::core::TensorTrait;

#[test]
Expand All @@ -24,7 +24,7 @@ mod tensor_1D {
mod tensor_2D {
use core::traits::Into;
use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor;
use orion::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper;
use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper;
use orion::operators::tensor::core::TensorTrait;

#[test]
Expand Down Expand Up @@ -53,7 +53,7 @@ mod tensor_2D {
mod tensor_3D {
use core::traits::Into;
use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor;
use orion::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper;
use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper;
use orion::operators::tensor::core::TensorTrait;

#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
mod tensor_1D {
use core::traits::Into;
use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;
use orion::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper;
use orion::test_helper::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper;
use orion::operators::tensor::core::TensorTrait;

#[test]
Expand All @@ -24,7 +24,7 @@ mod tensor_1D {
mod tensor_2D {
use core::traits::Into;
use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;
use orion::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper;
use orion::test_helper::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper;
use orion::operators::tensor::core::TensorTrait;

#[test]
Expand Down Expand Up @@ -53,7 +53,7 @@ mod tensor_2D {
mod tensor_3D {
use core::traits::Into;
use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;
use orion::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper;
use orion::test_helper::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper;
use orion::operators::tensor::core::TensorTrait;

#[test]
Expand Down
6 changes: 3 additions & 3 deletions tests/tensor_core/flatten/flatten_i32_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mod tensor_1D {

use orion::operators::tensor::I32Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::i32::i32_tensor_1x3_helper;
use orion::test_helper::tensor::i32::i32_tensor_1x3_helper;

#[test]
#[available_gas(200000)]
Expand All @@ -29,7 +29,7 @@ mod tensor_2D {

use orion::operators::tensor::I32Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::i32::i32_tensor_2x2_helper;
use orion::test_helper::tensor::i32::i32_tensor_2x2_helper;

#[test]
#[available_gas(200000)]
Expand Down Expand Up @@ -60,7 +60,7 @@ mod tensor_3D {

use orion::operators::tensor::I32Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::i32::i32_tensor_2x2x2_helper;
use orion::test_helper::tensor::i32::i32_tensor_2x2x2_helper;


#[test]
Expand Down
6 changes: 3 additions & 3 deletions tests/tensor_core/flatten/flatten_u32_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mod tensor_1D {

use orion::operators::tensor::U32Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::u32::u32_tensor_1x3_helper;
use orion::test_helper::tensor::u32::u32_tensor_1x3_helper;

#[test]
#[available_gas(200000)]
Expand All @@ -29,7 +29,7 @@ mod tensor_2D {

use orion::operators::tensor::U32Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::u32::u32_tensor_2x2_helper;
use orion::test_helper::tensor::u32::u32_tensor_2x2_helper;

#[test]
#[available_gas(200000)]
Expand Down Expand Up @@ -60,7 +60,7 @@ mod tensor_3D {

use orion::operators::tensor::U32Tensor;
use orion::operators::tensor::core::{TensorTrait};
use orion::helpers::tensor::u32::u32_tensor_2x2x2_helper;
use orion::test_helper::tensor::u32::u32_tensor_2x2x2_helper;


#[test]
Expand Down
6 changes: 3 additions & 3 deletions tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
mod tensor_1D {
use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper;
use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper;
use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16;
use orion::numbers::fixed_point::core::{FixedTrait};

Expand All @@ -24,7 +24,7 @@ mod tensor_1D {
mod tensor_2D {
use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper;
use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper;
use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16;
use orion::numbers::fixed_point::core::{FixedTrait};

Expand All @@ -45,7 +45,7 @@ mod tensor_2D {
mod tensor_3D {
use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper;
use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper;
use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16;
use orion::numbers::fixed_point::core::{FixedTrait};

Expand Down
6 changes: 3 additions & 3 deletions tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
mod tensor_1D {
use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper;
use orion::test_helper::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper;
use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23;
use orion::numbers::fixed_point::core::{FixedTrait};

Expand All @@ -24,7 +24,7 @@ mod tensor_1D {
mod tensor_2D {
use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper;
use orion::test_helper::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper;
use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23;
use orion::numbers::fixed_point::core::{FixedTrait};

Expand All @@ -45,7 +45,7 @@ mod tensor_2D {
mod tensor_3D {
use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper;
use orion::test_helper::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper;
use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23;
use orion::numbers::fixed_point::core::{FixedTrait};

Expand Down
6 changes: 3 additions & 3 deletions tests/tensor_core/max/max_i32_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
mod tensor_1D {
use orion::operators::tensor::I32Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::i32::i32_tensor_1x3_helper;
use orion::test_helper::tensor::i32::i32_tensor_1x3_helper;

#[test]
#[available_gas(2000000)]
Expand All @@ -22,7 +22,7 @@ mod tensor_1D {
mod tensor_2D {
use orion::operators::tensor::I32Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::i32::i32_tensor_2x2_helper;
use orion::test_helper::tensor::i32::i32_tensor_2x2_helper;

#[test]
#[available_gas(2000000)]
Expand All @@ -40,7 +40,7 @@ mod tensor_2D {
mod tensor_3D {
use orion::operators::tensor::I32Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::i32::i32_tensor_2x2x2_helper;
use orion::test_helper::tensor::i32::i32_tensor_2x2x2_helper;

#[test]
#[available_gas(2000000)]
Expand Down
6 changes: 3 additions & 3 deletions tests/tensor_core/max/max_u32_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
mod tensor_1D {
use orion::operators::tensor::U32Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::u32::u32_tensor_1x3_helper;
use orion::test_helper::tensor::u32::u32_tensor_1x3_helper;

#[test]
#[available_gas(2000000)]
Expand All @@ -22,7 +22,7 @@ mod tensor_1D {
mod tensor_2D {
use orion::operators::tensor::U32Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::u32::u32_tensor_2x2_helper;
use orion::test_helper::tensor::u32::u32_tensor_2x2_helper;

#[test]
#[available_gas(2000000)]
Expand All @@ -40,7 +40,7 @@ mod tensor_2D {
mod tensor_3D {
use orion::operators::tensor::U32Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::u32::u32_tensor_2x2x2_helper;
use orion::test_helper::tensor::u32::u32_tensor_2x2x2_helper;

#[test]
#[available_gas(2000000)]
Expand Down
6 changes: 3 additions & 3 deletions tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
mod tensor_1D {
use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper;
use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper;
use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl;
use orion::numbers::fixed_point::core::{FixedTrait};

Expand All @@ -24,7 +24,7 @@ mod tensor_1D {
mod tensor_2D {
use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper;
use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper;
use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl;
use orion::numbers::fixed_point::core::{FixedTrait};

Expand All @@ -45,7 +45,7 @@ mod tensor_2D {
mod tensor_3D {
use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor;
use orion::operators::tensor::core::TensorTrait;
use orion::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper;
use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper;
use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl;
use orion::numbers::fixed_point::core::{FixedTrait};

Expand Down
Loading

0 comments on commit d68da4f

Please sign in to comment.