Skip to content

Commit 3701ae2

Browse files
committed
[tmva][sofie] Fix compilation warnings due to missing override
- remove also some warning happening by variable re-declaration when not using Session in generated code - fix issue in operator Range when using verbose mode
1 parent 31b9680 commit 3701ae2

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

tmva/sofie/inc/TMVA/ROperator_Conv.hxx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,6 @@ public:
345345

346346
out << "\n//---- operator Conv " << OpName << "\n";
347347

348-
// create first matrix with convolution kernels
349-
if (!fUseSession)
350-
out << SP << fType << " tensor_" << fNX << "_f[" << fShapeW[0] * fShapeW[1] * fAttrKernelShape[0] * fAttrKernelShape[1] << "] = {0};\n";
351-
352348
// vectorize the (dilated)convolution kernels into a matrix
353349
// no need to transpose the matrix
354350
// to fix for 1d and 3d
@@ -401,11 +397,6 @@ public:
401397
out << SP << "float " << OpName << "_alpha = 1.0;\n";
402398
out << SP << "float " << OpName << "_beta = 0.0;\n";
403399

404-
if (!fUseSession) {
405-
out << SP << fType << " tensor_" << fNX << "_xcol["
406-
<< fShapeX[1] * fAttrKernelShape[0] * fAttrKernelShape[1] * fAttrKernelShape[2] * oDepth * oHeight * oWidth
407-
<< "] = {0};\n";
408-
}
409400

410401
// Loop on batch size
411402
out << SP << "for (size_t n = 0; n < " << bsize << "; n++) {\n";

tmva/sofie/inc/TMVA/ROperator_Elu.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public:
4949
return ret;
5050
}
5151

52-
void Initialize(RModel& model){
52+
void Initialize(RModel& model) override {
5353
if (model.CheckIfTensorAlreadyExist(fNX) == false){ //input must be a graph input, or already initialized intermediate tensor
5454
throw std::runtime_error("TMVA SOFIE Elu Op Input Tensor is not found in model");
5555
}

tmva/sofie/inc/TMVA/ROperator_Range.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public:
9292
if (model.Verbose()) {
9393
std::cout << "Range -> output is " << fNOutput << " ";
9494
if (fIsOutputConstant) std::cout << ConvertDynamicShapeToString(fShape) << std::endl;
95-
else std::cout << ConvertShapeToString(model.GetTensorShape(fNOutput)) << std::endl;
95+
else std::cout << ConvertDynamicShapeToString(model.GetDynamicTensorShape(fNOutput)) << std::endl;
9696
}
9797
}
9898

tmva/sofie/inc/TMVA/ROperator_Reduce.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public:
120120
model.AddNeededStdLib("algorithm");
121121
}
122122

123-
std::string Generate(std::string opName){
123+
std::string Generate(std::string opName) override {
124124
opName = "op_" + opName;
125125
if (fShapeX.empty() || fShapeY.empty()) {
126126
throw std::runtime_error("TMVA SOFIE Reduce Op called to Generate without being initialized first");

0 commit comments

Comments
 (0)