file_path
stringlengths
7
180
content
stringlengths
0
811k
repo
stringclasses
11 values
tests/nodes/or_fp8x23_broadcast.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::tensor::{U32Tensor, U32TensorMul}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::U32TensorPartialEq; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::FP8x23TensorPartialEq; use orion::operators::t...
https://github.com/gizatechxyz/orion
tests/nodes/or_fp8x23_broadcast/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorMul}; use orion::numbers::{FixedTrait, FP8x23}; fn input_0() -> Tensor<FP8x23> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(...
https://github.com/gizatechxyz/orion
tests/nodes/or_fp8x23_broadcast/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorMul}; use orion::numbers::{FixedTrait, FP8x23}; fn input_1() -> Tensor<FP8x23> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(...
https://github.com/gizatechxyz/orion
tests/nodes/or_fp8x23_broadcast/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{U32Tensor, U32TensorMul}; fn output_0() -> Tensor<u32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); dat...
https://github.com/gizatechxyz/orion
tests/nodes/or_i32.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::tensor::{U32Tensor, U32TensorMul}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::U32TensorPartialEq; use orion::operators::tensor::{I32Tensor, I32TensorMul}; use core::array::{ArrayTrait, SpanTrait}; use orion::operator...
https://github.com/gizatechxyz/orion
tests/nodes/or_i32/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{I32Tensor, I32TensorMul}; fn input_0() -> Tensor<i32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayT...
https://github.com/gizatechxyz/orion
tests/nodes/or_i32/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{I32Tensor, I32TensorMul}; fn input_1() -> Tensor<i32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayT...
https://github.com/gizatechxyz/orion
tests/nodes/or_i32/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{U32Tensor, U32TensorMul}; fn output_0() -> Tensor<u32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = Array...
https://github.com/gizatechxyz/orion
tests/nodes/or_i32_broadcast.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::tensor::{U32Tensor, U32TensorMul}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::U32TensorPartialEq; use orion::operators::tensor::{I32Tensor, I32TensorMul}; use core::array::{ArrayTrait, SpanTrait}; use orion::operator...
https://github.com/gizatechxyz/orion
tests/nodes/or_i32_broadcast/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{I32Tensor, I32TensorMul}; fn input_0() -> Tensor<i32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data...
https://github.com/gizatechxyz/orion
tests/nodes/or_i32_broadcast/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{I32Tensor, I32TensorMul}; fn input_1() -> Tensor<i32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); data...
https://github.com/gizatechxyz/orion
tests/nodes/or_i32_broadcast/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{U32Tensor, U32TensorMul}; fn output_0() -> Tensor<u32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); dat...
https://github.com/gizatechxyz/orion
tests/nodes/or_i8.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::tensor::{U32Tensor, U32TensorMul}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::U32TensorPartialEq; use orion::operators::tensor::I8TensorPartialEq; use orion::operators::tensor::{I8Tensor, I8TensorMul}; use core::arra...
https://github.com/gizatechxyz/orion
tests/nodes/or_i8/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{I8Tensor, I8TensorMul}; fn input_0() -> Tensor<i8> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrai...
https://github.com/gizatechxyz/orion
tests/nodes/or_i8/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{I8Tensor, I8TensorMul}; fn input_1() -> Tensor<i8> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrai...
https://github.com/gizatechxyz/orion
tests/nodes/or_i8/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{U32Tensor, U32TensorMul}; fn output_0() -> Tensor<u32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = Array...
https://github.com/gizatechxyz/orion
tests/nodes/or_i8_broadcast.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::tensor::{U32Tensor, U32TensorMul}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::U32TensorPartialEq; use orion::operators::tensor::I8TensorPartialEq; use orion::operators::tensor::{I8Tensor, I8TensorMul}; use core::arra...
https://github.com/gizatechxyz/orion
tests/nodes/or_i8_broadcast/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{I8Tensor, I8TensorMul}; fn input_0() -> Tensor<i8> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.ap...
https://github.com/gizatechxyz/orion
tests/nodes/or_i8_broadcast/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{I8Tensor, I8TensorMul}; fn input_1() -> Tensor<i8> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); data.ap...
https://github.com/gizatechxyz/orion
tests/nodes/or_i8_broadcast/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{U32Tensor, U32TensorMul}; fn output_0() -> Tensor<u32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); dat...
https://github.com/gizatechxyz/orion
tests/nodes/or_u32.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::tensor::{U32Tensor, U32TensorMul}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::U32TensorPartialEq; use core::array::{ArrayTrait, SpanTrait}; use orion::utils::{assert_eq, assert_seq_eq}; #[test] #[available_gas(20000...
https://github.com/gizatechxyz/orion
tests/nodes/or_u32/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{U32Tensor, U32TensorMul}; fn input_0() -> Tensor<u32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayT...
https://github.com/gizatechxyz/orion
tests/nodes/or_u32/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{U32Tensor, U32TensorMul}; fn input_1() -> Tensor<u32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayT...
https://github.com/gizatechxyz/orion
tests/nodes/or_u32/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{U32Tensor, U32TensorMul}; fn output_0() -> Tensor<u32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = Array...
https://github.com/gizatechxyz/orion
tests/nodes/or_u32_broadcast.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::tensor::{U32Tensor, U32TensorMul}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::U32TensorPartialEq; use core::array::{ArrayTrait, SpanTrait}; use orion::utils::{assert_eq, assert_seq_eq}; #[test] #[available_gas(20000...
https://github.com/gizatechxyz/orion
tests/nodes/or_u32_broadcast/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{U32Tensor, U32TensorMul}; fn input_0() -> Tensor<u32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data...
https://github.com/gizatechxyz/orion
tests/nodes/or_u32_broadcast/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{U32Tensor, U32TensorMul}; fn input_1() -> Tensor<u32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); data...
https://github.com/gizatechxyz/orion
tests/nodes/or_u32_broadcast/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{U32Tensor, U32TensorMul}; fn output_0() -> Tensor<u32> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); dat...
https://github.com/gizatechxyz/orion
tests/nodes/pow_fp16x16.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::{assert_eq, assert_seq_eq}; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; #[test] #[availab...
https://github.com/gizatechxyz/orion
tests/nodes/pow_fp16x16/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); let mut ...
https://github.com/gizatechxyz/orion
tests/nodes/pow_fp16x16/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); let mut ...
https://github.com/gizatechxyz/orion
tests/nodes/pow_fp16x16/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); let mut...
https://github.com/gizatechxyz/orion
tests/nodes/pow_fp16x16_broadcast.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::{assert_eq, assert_seq_eq}; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; #[test] #[availab...
https://github.com/gizatechxyz/orion
tests/nodes/pow_fp16x16_broadcast/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); let mut ...
https://github.com/gizatechxyz/orion
tests/nodes/pow_fp16x16_broadcast/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); let mut ...
https://github.com/gizatechxyz/orion
tests/nodes/pow_fp16x16_broadcast/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); let mut...
https://github.com/gizatechxyz/orion
tests/nodes/pow_fp8x23.cairo
mod input_0; mod input_1; mod output_0; use orion::utils::{assert_eq, assert_seq_eq}; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::FP8x23TensorPartialEq; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorSub}; #[test] #[available_...
https://github.com/gizatechxyz/orion
tests/numbers.cairo
// mod fixed_point; mod complex_number_test;
https://github.com/gizatechxyz/orion
tests/numbers/complex_number_test.cairo
//use cubit::f128::types::fixed::FixedTrait; use orion::numbers::complex_number::complex_trait::ComplexTrait; use orion::numbers::complex_number::complex64::{TWO, complex64}; use orion::numbers::{FP64x64, FP64x64Impl, FixedTrait}; use core::debug::PrintTrait; #[test] #[available_gas(2000000000)] fn test_add() { /...
https://github.com/gizatechxyz/orion
tests/numbers/fixed_point_test.cairo
mod erf_fp16x16_test; mod erf_fp16x16wide_test; mod erf_fp8x23_test; mod erf_fp8x23wide_test; mod erf_fp32x32_test; mod erf_fp64x64_test;
https://github.com/gizatechxyz/orion
tests/numbers/fixed_point_test/erf_fp16x16_test.cairo
use orion::numbers::fixed_point::implementations::fp16x16::math::erf::erf; use orion::numbers::fixed_point::implementations::fp16x16::core::{ONE, FP16x16, FixedTrait}; use core::debug::PrintTrait; #[test] #[available_gas(1000000000)] fn test_erf() { // 1.0 let f1: FP16x16 = FP16x16 { mag: 65536, sign: false }; ...
https://github.com/gizatechxyz/orion
tests/numbers/fixed_point_test/erf_fp16x16wide_test.cairo
use orion::numbers::fixed_point::implementations::fp16x16wide::math::erf::erf; use orion::numbers::fixed_point::implementations::fp16x16wide::core::{ONE, FP16x16W, FixedTrait}; use core::debug::PrintTrait; #[test] #[available_gas(1000000000)] fn test_erf() { // 1.0 let f1: FP16x16W = FP16x16W { mag: 65536, sign...
https://github.com/gizatechxyz/orion
tests/numbers/fixed_point_test/erf_fp32x32_test.cairo
use orion::numbers::fixed_point::implementations::fp32x32::erf::erf; use orion::numbers::fixed_point::implementations::fp32x32::core::{ONE, FP32x32, FixedTrait}; use core::debug::PrintTrait; #[test] #[available_gas(1000000000)] fn test_erf() { // 1.0 let f1: FP32x32 = FP32x32 { mag: 4294967296, sign: false }; ...
https://github.com/gizatechxyz/orion
tests/numbers/fixed_point_test/erf_fp64x64_test.cairo
use orion::numbers::fixed_point::implementations::fp64x64::erf::erf; use orion::numbers::fixed_point::implementations::fp64x64::core::{ONE, FP64x64, FixedTrait}; use core::debug::PrintTrait; #[test] #[available_gas(1000000000)] fn test_erf() { // 1.0 let f1: FP64x64 = FP64x64 { mag: 18446744073709551616_u128, s...
https://github.com/gizatechxyz/orion
tests/numbers/fixed_point_test/erf_fp8x23_test.cairo
use orion::numbers::fixed_point::implementations::fp8x23::math::erf::erf; use orion::numbers::fixed_point::implementations::fp8x23::core::{ONE, FP8x23, FixedTrait}; use core::debug::PrintTrait; #[test] #[available_gas(1000000000)] fn test_erf() { // 1.0 let f1: FP8x23 = FP8x23 { mag: 8388608, sign: false }; ...
https://github.com/gizatechxyz/orion
tests/numbers/fixed_point_test/erf_fp8x23wide_test.cairo
use orion::numbers::fixed_point::implementations::fp8x23wide::math::erf::erf; use orion::numbers::fixed_point::implementations::fp8x23wide::core::{ONE, FP8x23W, FixedTrait}; use core::debug::PrintTrait; #[test] #[available_gas(1000000000)] fn test_erf() { // 1.0 let f1: FP8x23W = FP8x23W { mag: 8388608, sign: f...
https://github.com/gizatechxyz/orion
tests/operators.cairo
mod transpose_test; mod qlinear_matmul_test; mod qlinear_concat_test; mod qlinear_add_test; mod constant_of_shape_test; mod qlinear_leakyrelu_test; mod optional;
https://github.com/gizatechxyz/orion
tests/operators/constant_of_shape_test.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; use core::debug::PrintTrait; #[test] #[available_gas(200000000000)] fn constant_of_shape_test() { let tensor = TensorTrait::<u32>::constant_of_shape(shape: array![4, 2].span(), value: 20); assert(tensor....
https://github.com/gizatechxyz/orion
tests/operators/optional.cairo
mod optional_test; mod optional_has_element_test; mod optional_get_element_test;
https://github.com/gizatechxyz/orion
tests/operators/optional/optional_get_element_test.cairo
use core::debug::PrintTrait; use core::array::{ArrayTrait, SpanTrait}; use core::option::OptionTrait; use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor, U32Tensor, FP16x16Tensor}; use orion::numbers::{FP16x16, FP16x16Impl, FP32x32, FP32x32Impl, FixedTrait}; use orion::numbers::{NumberTrait}; use ...
https://github.com/gizatechxyz/orion
tests/operators/optional/optional_has_element_test.cairo
use core::debug::PrintTrait; use core::array::{ArrayTrait, SpanTrait}; use core::option::OptionTrait; use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor, U32Tensor, FP16x16Tensor}; use orion::numbers::{FP16x16, FP16x16Impl, FP32x32, FP32x32Impl, FixedTrait}; use orion::numbers::{NumberTrait}; use ...
https://github.com/gizatechxyz/orion
tests/operators/optional/optional_test.cairo
use core::debug::PrintTrait; use core::array::{ArrayTrait, SpanTrait}; use core::option::OptionTrait; use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor, U32Tensor, FP16x16Tensor}; use orion::numbers::{FP16x16, FP16x16Impl, FP32x32, FP32x32Impl, FixedTrait}; use orion::numbers::{NumberTrait}; use ...
https://github.com/gizatechxyz/orion
tests/operators/qlinear_add_test.cairo
use core::debug::PrintTrait; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor, U32Tensor, FP16x16Tensor}; use orion::numbers::{FP16x16, FP16x16Impl, FP32x32, FP32x32Impl, FixedTrait}; use orion::numbers::{NumberTrait}; #[test] #[available_gas(200000000...
https://github.com/gizatechxyz/orion
tests/operators/qlinear_concat_test.cairo
use core::debug::PrintTrait; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor, U32Tensor, FP16x16Tensor}; use orion::numbers::{FP16x16, FP16x16Impl, FP32x32, FP32x32Impl, FixedTrait}; use orion::numbers::{NumberTrait}; fn print_span(mut span: Span<i8>) {...
https://github.com/gizatechxyz/orion
tests/operators/qlinear_leakyrelu_test.cairo
use core::debug::PrintTrait; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor, U32Tensor, FP16x16Tensor}; use orion::numbers::{FP16x16, FP16x16Impl, FP32x32, FP32x32Impl, FixedTrait}; use orion::numbers::{NumberTrait}; #[test] #[available_gas(2000000000...
https://github.com/gizatechxyz/orion
tests/operators/qlinear_matmul_test.cairo
use core::debug::PrintTrait; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{ TensorTrait, Tensor, I8Tensor, I32Tensor, U32Tensor, FP16x16Tensor, FP32x32Tensor }; use orion::numbers::{FP16x16, FP16x16Impl, FP32x32, FP32x32Impl, FixedTrait}; use orion::numbers::{NumberTrait}; #[test] #[av...
https://github.com/gizatechxyz/orion
tests/operators/qlinear_mul_test.cairo
use core::debug::PrintTrait; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{ TensorTrait, Tensor, I8Tensor, I32Tensor, U32Tensor, FP16x16Tensor, FP32x32Tensor }; use orion::numbers::{FP16x16, FP16x16Impl, FP32x32, FP32x32Impl, FixedTrait}; use orion::numbers::{NumberTrait}; #[test] #[ava...
https://github.com/gizatechxyz/orion
tests/operators/tensor/math.cairo
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;...
https://github.com/gizatechxyz/orion
tests/operators/transpose_test.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; use core::debug::PrintTrait; #[test] #[available_gas(200000000000)] fn transpose_test_shape() { let tensor = TensorTrait::< u32 >::new(shape: array![4, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6,...
https://github.com/gizatechxyz/orion
tests/performance.cairo
mod quantize_linear_test; mod dequantize_linear_test; mod dynamic_quantize_linear_test;
https://github.com/gizatechxyz/orion
tests/performance/dequantize_linear_test.cairo
mod dequantize_linear_i32_test; mod dequantize_linear_fp_test;
https://github.com/gizatechxyz/orion
tests/performance/dequantize_linear_test/dequantize_linear_fp_test.cairo
mod fp_i8_test;
https://github.com/gizatechxyz/orion
tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo
#[cfg(test)] mod fp8x23 { use core::array::ArrayTrait; use core::array::SpanTrait; use core::traits::Into; use core::debug::PrintTrait; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23PartialEq}; use ori...
https://github.com/gizatechxyz/orion
tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo
use core::debug::{PrintTrait}; use core::array::ArrayTrait; use core::array::SpanTrait; use core::traits::Into; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::I8Tensor; use orion::operators::tensor::I32Tensor; use orion::operators::tensor::{TensorTrait, Tensor}; #[test] #[available...
https://github.com/gizatechxyz/orion
tests/performance/dynamic_quantize_linear_test.cairo
mod dynamic_quantize_linear_fp_test;
https://github.com/gizatechxyz/orion
tests/performance/dynamic_quantize_linear_test/dynamic_quantize_linear_fp_test.cairo
#[cfg(test)] mod fp8x23 { use core::array::ArrayTrait; use core::array::SpanTrait; use core::traits::Into; use core::debug::PrintTrait; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; use orion::operators::tens...
https://github.com/gizatechxyz/orion
tests/performance/quantize_linear_test.cairo
mod quantize_linear_i32_test; mod quantize_linear_fp_test;
https://github.com/gizatechxyz/orion
tests/performance/quantize_linear_test/quantize_linear_fp_test.cairo
mod fp_i8_test;
https://github.com/gizatechxyz/orion
tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo
#[cfg(test)] mod fp8x23 { use core::array::ArrayTrait; use core::array::SpanTrait; use core::traits::Into; use core::debug::PrintTrait; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; use orion::operators::tens...
https://github.com/gizatechxyz/orion
tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo
use core::debug::{PrintTrait}; use core::array::ArrayTrait; use core::array::SpanTrait; use core::traits::Into; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::I32Tensor; use orion::operators::tensor::{TensorTrait, Tensor}; #[test] #[available_gas(2000000)] fn quantize_linear() { ...
https://github.com/gizatechxyz/orion
tests/tensor_core.cairo
mod at; mod flatten; mod max; mod min; mod stride; mod onehot;
https://github.com/gizatechxyz/orion
tests/tensor_core/at.cairo
mod at_u32_test; mod at_i32_test; mod at_fp_test; mod at_bool_test;
https://github.com/gizatechxyz/orion
tests/tensor_core/at/at_bool_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use core::array::ArrayTrait; use orion::operators::tensor::BoolTensor; use orion::operators::tensor::core::{TensorTrait}; #[test] #[available_gas(2000000)] fn tensor_at() { let mut sizes = ArrayTrait::new(); sizes.append(3); ...
https://github.com/gizatechxyz/orion
tests/tensor_core/at/at_fp_test.cairo
mod at_fp8x23_test; mod at_fp16x16_test;
https://github.com/gizatechxyz/orion
tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use core::array::ArrayTrait; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::numb...
https://github.com/gizatechxyz/orion
tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use core::array::ArrayTrait; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::test_helper::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::numbers...
https://github.com/gizatechxyz/orion
tests/tensor_core/at/at_i32_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use core::array::ArrayTrait; use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::test_helper::tensor::i32::i32_tensor_1x3_helper; #[test] #[available_gas(2000000)] fn tensor_at() { ...
https://github.com/gizatechxyz/orion
tests/tensor_core/at/at_u32_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use core::array::ArrayTrait; use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::test_helper::tensor::u32::u32_tensor_1x3_helper; #[test] #[available_gas(2000000)] fn tensor_at() { ...
https://github.com/gizatechxyz/orion
tests/tensor_core/flatten.cairo
mod flatten_i32_test; mod flatten_u32_test; mod flatten_fp_test;
https://github.com/gizatechxyz/orion
tests/tensor_core/flatten/flatten_fp_test.cairo
mod flatten_fp8x23_test; mod flatten_fp16x16_test;
https://github.com/gizatechxyz/orion
tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use core::traits::Into; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::operators::tensor::core::TensorTrait; #[test] #[availab...
https://github.com/gizatechxyz/orion
tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use core::traits::Into; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::test_helper::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::operators::tensor::core::TensorTrait; #[test] #[available_...
https://github.com/gizatechxyz/orion
tests/tensor_core/flatten/flatten_i32_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use core::array::{ArrayTrait, SpanTrait}; use core::traits::Into; use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::test_helper::tensor::i32::i32_tensor_1x3_helper; #[test] #[available_g...
https://github.com/gizatechxyz/orion
tests/tensor_core/flatten/flatten_u32_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use core::array::{ArrayTrait, SpanTrait}; use core::traits::Into; use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::test_helper::tensor::u32::u32_tensor_1x3_helper; #[test] #[available_g...
https://github.com/gizatechxyz/orion
tests/tensor_core/max.cairo
mod max_u32_test; mod max_i32_test; mod max_fp_test;
https://github.com/gizatechxyz/orion
tests/tensor_core/max/max_fp_test.cairo
mod max_fp8x23_test; mod max_fp16x16_test;
https://github.com/gizatechxyz/orion
tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::...
https://github.com/gizatechxyz/orion
tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::test_helper::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::fp8...
https://github.com/gizatechxyz/orion
tests/tensor_core/max/max_i32_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::test_helper::tensor::i32::i32_tensor_1x3_helper; #[test] #[available_gas(2000000)] fn tensor_max() { let tensor = i32_tensor_1x3_helper...
https://github.com/gizatechxyz/orion
tests/tensor_core/max/max_u32_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::test_helper::tensor::u32::u32_tensor_1x3_helper; #[test] #[available_gas(2000000)] fn tensor_max() { let tensor = u32_tensor_1x3_helper...
https://github.com/gizatechxyz/orion
tests/tensor_core/min.cairo
mod min_u32_test; mod min_i32_test; mod min_fp_test;
https://github.com/gizatechxyz/orion
tests/tensor_core/min/min_fp_test.cairo
mod min_fp8x23_test; mod min_fp16x16_test;
https://github.com/gizatechxyz/orion
tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::test_helper::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::...
https://github.com/gizatechxyz/orion
tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::test_helper::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::fp8...
https://github.com/gizatechxyz/orion
tests/tensor_core/min/min_i32_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::test_helper::tensor::i32::i32_tensor_1x3_helper; #[test] #[available_gas(2000000)] fn tensor_min() { let tensor = i32_tensor_1x3_helper...
https://github.com/gizatechxyz/orion
tests/tensor_core/min/min_u32_test.cairo
// ===== 1D ===== // #[cfg(test)] mod tensor_1D { use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::test_helper::tensor::u32::u32_tensor_1x3_helper; #[test] #[available_gas(2000000)] fn tensor_min() { let tensor = u32_tensor_1x3_helper...
https://github.com/gizatechxyz/orion
tests/tensor_core/onehot.cairo
mod onehot_fp_test;
https://github.com/gizatechxyz/orion
tests/tensor_core/onehot/onehot_fp_test.cairo
mod onehot_fp8x23_test; mod onehot_fp16x16_test;
https://github.com/gizatechxyz/orion
tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo
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 core::array::{ArrayTrait, SpanTrait}; use core::traits::Into; use orion::numbers::fixed_point::core::{FixedTrait}; use ...
https://github.com/gizatechxyz/orion
tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo
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 core::array::{ArrayTrait, SpanTrait}; use core::traits::Into; use orion::numbers::fixed_point::core::{FixedTrait}; use ...
https://github.com/gizatechxyz/orion