Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub in onnx + lean format #226

Open
MirkoCalvi opened this issue Mar 8, 2025 · 1 comment
Open

Sub in onnx + lean format #226

MirkoCalvi opened this issue Mar 8, 2025 · 1 comment
Labels
Math Related to TensorMath

Comments

@MirkoCalvi
Copy link
Collaborator

MirkoCalvi commented Mar 8, 2025

Current Problem

The "sub" mathematical operation does not respect the onnx format and it is not present any "lean" version of the function

Standard & lean format

The "standard version" of a method is in the format:

    pub fn methodName (args) !Tensor(T) {
       ...
       outputShape = compute output shape...
       outputTensor = compute output tensor...
       ...
       methodName_lean(input, args..., output)

       return outputTensor;
    }

It is suggested to write a get_methodName_oputput_shape() to compute the shape of the output so that the same method can be called during the generation of the readyGraph.

The "lean version" of a method is in the format:

    pub inline fn methodName_lean (args) void {
       ...
       ... actual computation of the output
    }

"lean" and "standard" are mandatory.
The lean version is called during the codegen and the standard version is used in testings.

@MirkoCalvi MirkoCalvi added the Math Related to TensorMath label Mar 8, 2025
Copy link

Connected to Huly®: X_PI-259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Math Related to TensorMath
Projects
None yet
Development

No branches or pull requests

1 participant