Skip to content

Commit 8c08ef4

Browse files
sanjibansgdpiparo
authored andcommitted
[tmva][sofie] shape inference method need not be pure virtual
1 parent 435c1ee commit 8c08ef4

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

Diff for: tmva/sofie/inc/TMVA/ROperator.hxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class ROperator{
2121
public:
2222
virtual std::vector<std::string> GetBlasRoutines() { return {}; }
2323
virtual std::vector<std::string> GetStdLibs() { return {}; }
24-
virtual std::vector<std::vector<size_t>> ShapeInference(std::vector<std::vector<size_t>>) = 0;
25-
virtual std::vector<ETensorType> TypeInference(std::vector<ETensorType>) = 0;
24+
virtual std::vector<std::vector<size_t>> ShapeInference(std::vector<std::vector<size_t>>) { return {}; };
25+
virtual std::vector<ETensorType> TypeInference(std::vector<ETensorType>) { return {}; };
2626
virtual void Initialize(RModel&) = 0;
2727
virtual std::string Generate(std::string OpName) = 0; //expect unique opName for each operator within the same RModel
2828
// generate initialization code for session constructor

Diff for: tmva/sofie/inc/TMVA/ROperator_Shape.hxx

-10
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@ public:
3535
fOutputTensorNames = { fNY };
3636
}
3737

38-
std::vector<ETensorType> TypeInference(std::vector<ETensorType> input) override {
39-
return input;
40-
}
41-
42-
std::vector<std::vector<size_t>> ShapeInference(std::vector<std::vector<size_t>> input) override {
43-
std::vector<std::vector<size_t>> ret;
44-
ret[0].push_back(input[0].size());
45-
return ret;
46-
}
47-
4838
void Initialize(RModel& model) override {
4939
if (model.CheckIfTensorAlreadyExist(fNX) == false){ //input must be a graph input, or already initialized intermediate tensor
5040
throw std::runtime_error("TMVA SOFIE Shape Op Input Tensor " + fNX + " is not found in model");

0 commit comments

Comments
 (0)