3#include "onnx_proto3.pb.h"
6namespace Experimental {
9template <EComparisionOperator Op>
14 for (
int i = 0; i < 2; ++i) {
15 auto input_name = nodeproto.input(i);
23 std::runtime_error(
"TMVA::SOFIE ONNX parser Comparision op has input tensors of different types");
26 throw std::runtime_error(
"TMVA::SOFIE ONNX Parser Comparision op has input tensor " + input_name +
27 " but its type is not yet registered");
31 std::unique_ptr<ROperator> op;
32 std::string output_name = nodeproto.output(0);
39 throw std::runtime_error(
"TMVA::SOFIE - Unsupported - Comparision Operator does not yet support input type " +
40 std::to_string(
static_cast<int>(input_type)));
53 return ParseComparision<EComparisionOperator::Eq>(parser, nodeproto);
58 return ParseComparision<EComparisionOperator::Less>(parser, nodeproto);
63 return ParseComparision<EComparisionOperator::LessEq>(parser, nodeproto);
68 return ParseComparision<EComparisionOperator::Greater>(parser, nodeproto);
73 return ParseComparision<EComparisionOperator::GreaterEq>(parser, nodeproto);
bool IsRegisteredTensorType(const std::string &)
void RegisterTensorType(const std::string &, ETensorType)
ETensorType GetTensorType(const std::string &name)
ParserFuncSignature ParseGreater
ParserFuncSignature ParseEq
ParserFuncSignature ParseLess
std::function< std::unique_ptr< ROperator >(RModelParser_ONNX &, const onnx::NodeProto &)> ParserFuncSignature
ParserFuncSignature ParseGreaterEq
ParserFuncSignature ParseLessEq
std::unique_ptr< ROperator > ParseComparision(RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto)
create variable transformations