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
[GSOC][TMVA][SOFIE] Cast ONNX Operator implemented with the corresponding unit tests #11033
Conversation
Added the functionality and support of int input type in Cast ONNX Operator
Can one of the admins verify this patch? |
@phsft-bot build just on ROOT-ubuntu2204/default, ROOT-ubuntu2004/default, ROOT-ubuntu18.04/default with flags -Dtmva-sofie=On |
Starting build on |
Build failed on ROOT-ubuntu18.04/default. Errors:
|
Build failed on ROOT-ubuntu2004/default. Errors:
|
Build failed on ROOT-ubuntu2204/default. Errors:
|
@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On |
Starting build on |
Build failed on ROOT-ubuntu2204/default. Failing tests:
|
@phsft-bot build just on ROOT-ubuntu2204/default, ROOT-ubuntu2004/default, ROOT-ubuntu18.04/default with flags -Dtmva-sofie=On |
Starting build on |
Build failed on ROOT-ubuntu2204/default. Errors:
|
Build failed on ROOT-ubuntu18.04/default. Errors:
|
Build failed on ROOT-ubuntu2004/default. Errors:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Neel-Shah-29 , please include the support for the other type of casting.
The generate code has also some issues, from the test one has:
//Code generated automatically by TMVA for Inference of Model file [Cast.onnx] at [Mon Aug 1 16:00:41 2022]
#ifndef TMVA_SOFIE_CAST
#define TMVA_SOFIE_CAST
#include<vector>
#include "TMVA/SOFIE_common.hxx"
#include <fstream>
namespace TMVA_SOFIE_Cast{
struct Session {
Session(std::string filename ="") {
if (filename.empty()) filename = "Cast.dat";
}
infer){
//------ CAST
for (int id = 0; id < 6 ; id++){
tensor_1[id] = (float)(tensor_onnxCast0[id]);
}
std::vector<float> ret (tensor_1, tensor_1 + 6);
return ret;
}
};
} //TMVA_SOFIE_Cast
the infer
function is not correctly defined. This is happening in RModel, because it sees that there is no output tensor. I think in this case a void infer
function should be generated, I will fix this.
However, the input model should have an output tensor. This is maybe a possible problem with the generated test model. Can you please check this too
…Parser for supporting different input types
…operator and added the support to RModel::Generate method also
@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On |
Starting build on |
Build failed on ROOT-ubuntu2204/default. Warnings:
Failing tests:
|
This fixes the new Cast operator. Several changes are needed for Cast since the input tensor can be of a type different than float Also a fix for parsing correctly the attribute of Cast is applied
@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On |
Starting build on |
Build failed on ROOT-ubuntu2204/default. Warnings:
Failing tests:
|
@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On |
Starting build on |
Build failed on ROOT-ubuntu2204/default. Warnings:
Failing tests:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now, Thank you Neel for including all my comments!
This Pull request: Adds the Cast ONNX Operator with the corresponding Unit tests to validate the written code.
Checklist: