gizatechxyz / orion Goto Github PK
View Code? Open in Web Editor NEWONNX Runtime in Cairo 1.0 for verifiable ML inference using STARK
Home Page: https://orion.gizatech.xyz
License: MIT License
ONNX Runtime in Cairo 1.0 for verifiable ML inference using STARK
Home Page: https://orion.gizatech.xyz
License: MIT License
Describe the Feature Request
Implementation of ONNX Operator
Describe Preferred Solution
Implementation following the same Operator interface as defined in ONNX. See Contribution Guidelines
Additional Context
Describe the Feature Request
Implementation of ONNX Operator
Describe Preferred Solution
Implementation following the same Operator interface as defined in ONNX. See Contribution Guidelines
Additional Context
Describe the Feature Request
Calculates the hyperbolic cosine of the given input tensor element-wise.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#CumSum
Describe the Feature Request
Computes the indices of the min elements of the input tensor's element along the provided axis. The resulting tensor has the same rank as the input if keepdims equals 1. If keepdims equals 0, then the resulting tensor has the reduced dimension pruned. If select_last_index is True (default False), the index of the last occurrence of the min is selected if the min appears more than once in the input. Otherwise the index of the first occurrence is selected. The type of the output tensor is integer.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#ArgMin
Describe the Feature Request
Calculates the hyperbolic arcsine of the given input tensor element-wise.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#Asinh
Describe the Feature Request
Calculates the arcsine (inverse of sine) of the given input tensor, element-wise.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#Asin
Describe the Feature Request
Tensor contraction over specified indices and outer product.
Here is a full description of Einsum in ONNX:
https://github.com/onnx/onnx/blob/main/docs/Operators.md#einsum
Additional Context
You can take inspiration to EZKL or Julia-lang implementation of Einsum:
Orion version:
Broken Link at "Get Started Orion", the link https://orion.gizatech.xyz/apis/get-started
Current behavior:
Transfer to a page that is not found
Expected behavior:
Should transfer to the API page
Steps to reproduce:
Related code:
at the bottom of page
Other information:
Describe the Feature Request
Implementation of ONNX Operator
Describe Preferred Solution
Implementation following the same Operator interface as defined in ONNX. See Contribution Guidelines
Additional Context
Describe the Feature Request
Calculates the cosine of the given input tensor, element-wise.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#Cos
Describe the Feature Request
Applies a linear transformation to the incoming tensor.
It should take as parameter:
And return the result tensor after linear transformation.
It should panic if:
If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)
Describe the Feature Request
Implementation of ONNX Operator
Describe Preferred Solution
Implementation following the same Operator interface as defined in ONNX. See Contribution Guidelines
Additional Context
Describe the Feature Request
Ceil takes one input data (Tensor) and produces one output data (Tensor) where the ceil is, y = ceil(x), is applied to the tensor elementwise.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#Ceil
Describe the Feature Request
Implementation of ONNX Operator
Describe Preferred Solution
Implementation following the same Operator interface as defined in ONNX. See Contribution Guidelines
Additional Context
Describe the Feature Request
Implementation of ONNX Operator
Describe Preferred Solution
Implementation following the same Operator interface as defined in ONNX. See Contribution Guidelines
Additional Context
Describe the Feature Request
Calculates the arccosine (inverse of cosine) of the given input tensor, element-wise.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#acos
Update the existing examples in the documentation to reflect the change of fixed points from Q5.26 to Q8.23 versions.
Describe the Feature Request
Or returns the tensor resulted from performing the or logical operation elementwise on the input tensors A and B (with Numpy-style broadcasting support).
Full description here:
https://github.com/onnx/onnx/blob/main/docs/Operators.md#Or
If the feature request is approved, would you be willing to submit a PR?
Describe the Feature Request
Calculates the hyperbolic cosine of the given input tensor element-wise.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#Cosh
Describe the Feature Request
Returns the tensor resulted from performing the xor logical operation elementwise on the input tensors A and B (with Numpy-style broadcasting support).
This operator supports multidirectional (i.e., Numpy-style) broadcasting.
Link to the full ONNX description of XOR: https://github.com/onnx/onnx/blob/main/docs/Operators.md#xor
If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)
Describe the Feature Request
Add a threshold parameter to the relu_u32 function. Since u32 numbers range from 0 ... 2** 32 -1, without the threshold parameter, relu_u32([original_array])
will always equal [original_array]
, as if the function was never applied.
Describe Preferred Solution
Added a threshold parameter below which the original values in the array will be mapped to zero
Related Code
relu_u32([original_array],threshold)
Additional Context
If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)
Describe the Feature Request
The convolution operator consumes an input tensor and a filter, and computes the output.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#Conv
Currently, when creating a fixed point, there is no range checking. But we should check the range for security reasons.
However, when using neural networks, we need to perform wide-ranging intermediate calculations with fixed points. But checking will create an error if the result is out of range.
I propose three approaches, but feel free to share yours if you have a better idea:
Add unsafe
parameter as boolean to all FixedTrait
ops functions. When unsafe
is true
, the range of the new fixed point is not checked.
Interesting, but couldn't benefit from arithmetic operators (+-*/
), as there's no way to pass the unsafe
parameter.
We implement wide operations (wide_mul, wide_exp, etc.) that return a tuple of fixed types.
We implement a check_range
function in FixedTrait. By default, calculations don't check the range, but we can easily check the result as follows:
(a + b).check_range()
Describe the Feature Request
The operator computes the log of softmax values for the given input.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#logsoftmax
Describe the Feature Request
Selects slices from an input tensor along a given axis where condition evaluates to True for each axis index. In case axis is not provided, input is flattened before elements are selected. Compress behaves like numpy.compress: https://docs.scipy.org/doc/numpy/reference/generated/numpy.compress.html
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#Compress
Describe the Feature Request
Calculates the hyperbolic arctangent of the given input tensor element-wise.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#Atanh
Describe the Feature Request
Calculates the hyperbolic arccosine of the given input tensor element-wise.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#acosh
Orion version:
fa81f4a
Current behavior:
For all signed integers, x < y
returns true
where x==y
Expected behavior:
x < y
should return false
where x == y
Steps to reproduce:
Related code:
let x = IntegerTrait::<i32>::new(1,false);
let y = IntegerTrait::<i32>::new(1,false);
assert((x<y) == false);
Other information:
orion/src/numbers/signed_integer/i32.cairo
Line 374 in fa81f4a
produces error in cairo 1.0, i don't think into is needed
error: Type annotations needed. Failed to infer ?2
--> types.cairo:142:9
self.mag.into().print();
^*************^
Describe the Feature Request
Implementation of ONNX Operator
Describe Preferred Solution
Implementation following the same Operator interface as defined in ONNX. See Contribution Guidelines
Additional Context
Current behavior:
Currently Argmin and Argmax panics with 1D tensor.
let tensor = i32_tensor_1x3_helper();
let result = tensor.argmin(0,Option::None(()),Option::None(()));
>>>> panicked with [('shape cannot be empty') ]
ONNX-Cairo version:
commit @7bf1e1127bc638a5af4f27834374568535adb3ce
Current behavior:
There is no range check on the magnitude value being passed to any function creating a fixed type
Example: Fixed::new(value,t|f)
does not check whether value
is within the range of 0 and 2**31 -1
Affected functions seem to be:
trait Fixed {
fn new(mag: u128, sign: bool) -> FixedType;
fn new_unscaled(mag: u128, sign: bool) -> FixedType;
fn from_felt(val: felt252) -> FixedType;
fn from_unscaled_felt(val: felt252) -> FixedType;
...
}
Expected behavior:
Fixed::new(value, t|f)
and similar functions should panic where value>=2**31
Describe the Feature Request
Calculates the arctangent (inverse of tangent) of the given input tensor, element-wise.
Full description here: https://github.com/onnx/onnx/blob/main/docs/Operators.md#Atan
Orion version:
Current behavior:
Linear tests not running because of improper import
Expected behavior:
All tests should run including tests in the linear_test.cairo
file
Steps to reproduce:
scarb run test
Related code:
Other information:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.