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

[tmva][sofie] Fix compilation warnings due to missing override #18030

Merged
merged 1 commit into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions tmva/sofie/inc/TMVA/ROperator_Conv.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@
// Generate code for Session data members (e.g. internal vectors)
virtual std::string GenerateSessionMembersCode(std::string opName) override {

size_t outputChannelSize = fShapeY[2]; // size/channel = D * H * W

Check warning on line 306 in tmva/sofie/inc/TMVA/ROperator_Conv.hxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

variable 'outputChannelSize' set but not used [-Wunused-but-set-variable]

Check warning on line 306 in tmva/sofie/inc/TMVA/ROperator_Conv.hxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

variable 'outputChannelSize' set but not used [-Wunused-but-set-variable]

Check warning on line 306 in tmva/sofie/inc/TMVA/ROperator_Conv.hxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

variable 'outputChannelSize' set but not used [-Wunused-but-set-variable]

Check warning on line 306 in tmva/sofie/inc/TMVA/ROperator_Conv.hxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

variable 'outputChannelSize' set but not used [-Wunused-but-set-variable]

Check warning on line 306 in tmva/sofie/inc/TMVA/ROperator_Conv.hxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

variable 'outputChannelSize' set but not used [-Wunused-but-set-variable]
size_t kernelSize = fAttrKernelShape[0];

Check warning on line 307 in tmva/sofie/inc/TMVA/ROperator_Conv.hxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

variable 'kernelSize' set but not used [-Wunused-but-set-variable]

Check warning on line 307 in tmva/sofie/inc/TMVA/ROperator_Conv.hxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

variable 'kernelSize' set but not used [-Wunused-but-set-variable]

Check warning on line 307 in tmva/sofie/inc/TMVA/ROperator_Conv.hxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

variable 'kernelSize' set but not used [-Wunused-but-set-variable]

Check warning on line 307 in tmva/sofie/inc/TMVA/ROperator_Conv.hxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

variable 'kernelSize' set but not used [-Wunused-but-set-variable]

Check warning on line 307 in tmva/sofie/inc/TMVA/ROperator_Conv.hxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

variable 'kernelSize' set but not used [-Wunused-but-set-variable]
for (size_t i = 1; i < fDim; i++) {
outputChannelSize *= fShapeY[2 + i];
kernelSize *= fAttrKernelShape[i];
Expand Down Expand Up @@ -345,10 +345,6 @@

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

// create first matrix with convolution kernels
if (!fUseSession)
out << SP << fType << " tensor_" << fNX << "_f[" << fShapeW[0] * fShapeW[1] * fAttrKernelShape[0] * fAttrKernelShape[1] << "] = {0};\n";

// vectorize the (dilated)convolution kernels into a matrix
// no need to transpose the matrix
// to fix for 1d and 3d
Expand Down Expand Up @@ -401,11 +397,6 @@
out << SP << "float " << OpName << "_alpha = 1.0;\n";
out << SP << "float " << OpName << "_beta = 0.0;\n";

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

// Loop on batch size
out << SP << "for (size_t n = 0; n < " << bsize << "; n++) {\n";
Expand Down
2 changes: 1 addition & 1 deletion tmva/sofie/inc/TMVA/ROperator_Elu.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public:
return ret;
}

void Initialize(RModel& model){
void Initialize(RModel& model) override {
if (model.CheckIfTensorAlreadyExist(fNX) == false){ //input must be a graph input, or already initialized intermediate tensor
throw std::runtime_error("TMVA SOFIE Elu Op Input Tensor is not found in model");
}
Expand Down
2 changes: 1 addition & 1 deletion tmva/sofie/inc/TMVA/ROperator_Range.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public:
if (model.Verbose()) {
std::cout << "Range -> output is " << fNOutput << " ";
if (fIsOutputConstant) std::cout << ConvertDynamicShapeToString(fShape) << std::endl;
else std::cout << ConvertShapeToString(model.GetTensorShape(fNOutput)) << std::endl;
else std::cout << ConvertDynamicShapeToString(model.GetDynamicTensorShape(fNOutput)) << std::endl;
}
}

Expand Down
2 changes: 1 addition & 1 deletion tmva/sofie/inc/TMVA/ROperator_Reduce.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public:
model.AddNeededStdLib("algorithm");
}

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