Skip to content

Warnings from Tensorflow in CMSSW_15_0_10

Issue Description

With the switch to CMSSW_15_0_10 (inteded to process also 2024 datasets produced as NanoAODv15), both in the Categorization setp (due to the signal-extraction DNNs) and in PreprocessRDF step (due to HHbtag and VBFtag DNNs) logs we can see a lot of warnings coming from Tensorflow. For example:

In file included from /cvmfs/cms.cern.ch/el9_amd64_gcc12/cms/cmssw/CMSSW_15_0_10/src/PhysicsTools/TensorFlow/interface/TensorFlow.h:11:
In file included from /cvmfs/cms.cern.ch/el9_amd64_gcc12/external/tensorflow/2.12.0-ce8818179b409c7625f54fe10b43fd64/include/tensorflow/core/framework/tensor.h:26:
In file included from /cvmfs/cms.cern.ch/el9_amd64_gcc12/external/tensorflow/2.12.0-ce8818179b409c7625f54fe10b43fd64/include/tensorflow/core/framework/allocator.h:25:
In file included from /cvmfs/cms.cern.ch/el9_amd64_gcc12/external/tensorflow/2.12.0-ce8818179b409c7625f54fe10b43fd64/include/absl/types/optional.h:39:
In file included from /cvmfs/cms.cern.ch/el9_amd64_gcc12/external/tensorflow/2.12.0-ce8818179b409c7625f54fe10b43fd64/include/absl/utility/utility.h:51:
/cvmfs/cms.cern.ch/el9_amd64_gcc12/external/tensorflow/2.12.0-ce8818179b409c7625f54fe10b43fd64/include/absl/meta/type_traits.h:301:36: warning: builtin __has_trivial_destructor is deprecated; use __is_trivially_destructible instead [-Wdeprecated-builtins]
    : std::integral_constant<bool, __has_trivial_destructor(T) &&
                                   ^
/cvmfs/cms.cern.ch/el9_amd64_gcc12/external/tensorflow/2.12.0-ce8818179b409c7625f54fe10b43fd64/include/absl/meta/type_traits.h:99:27: note: in instantiation of template class 'absl::is_trivially_destructible<absl::FunctionRef<void (absl::HashState &)> >' requested here
                    absl::is_trivially_destructible<T>::value> {};

and several similar others.

After some debugging I think the issue comes from the absl version used by Tensorflow, and specifically this file:

/cvmfs/cms.cern.ch/el9_amd64_gcc12/external/tensorflow/2.12.0-ce8818179b409c7625f54fe10b43fd64/include/absl/meta/type_traits.h

Which is automatically included in the TensorFlow version invoked by CMSSW.

So to solve we should investigate how the TF and absl versions are reconciled in CMSSW.