Skip to content

eigen: Update to upstream version 5.0.1#10712

Open
kopperp wants to merge 1 commit into
cms-sw:IB/CMSSW_20_1_X/masterfrom
kopperp:eigen5
Open

eigen: Update to upstream version 5.0.1#10712
kopperp wants to merge 1 commit into
cms-sw:IB/CMSSW_20_1_X/masterfrom
kopperp:eigen5

Conversation

@kopperp

@kopperp kopperp commented Jul 8, 2026

Copy link
Copy Markdown

Eigen 3.5.0/5.0.0 added the necessary device header for CMSSW. Test to see if the CMS eigen fork can be dropped in favor of upstream.

Note:
Eigen 3.5.0/5.0.0 made fixed size matrices and arrays trivially_default_constructible. This uncovered two unused Eigen::Vector/Matrix variables in RecoTracker/PixelTrackFitting and is fixed in CMSSW!51453.

@cmsbuild

cmsbuild commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

A new Pull Request was created by @kopperp for branch IB/CMSSW_20_1_X/master.

@akritkbehera, @cmsbuild, @iarspider, @raoatifshad, @smuzaffar can you please review it and eventually sign? Thanks.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.
cms-bot commands are listed here

@cmsbuild

cmsbuild commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

cms-bot internal usage

@fwyzard

fwyzard commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

please test with cms-sw/cmssw#51453

Comment thread eigen.spec Outdated
@@ -2,14 +2,12 @@

@fwyzard fwyzard Jul 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kopperp please change this line to

-### RPM external eigen c1d637433e3b3f9012b226c2c9125c494b470ae6
+### RPM external eigen 5.0.1

and below use %{realversion} in place of %{tag}.

@cmsbuild

cmsbuild commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

-1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a56970/54619/summary.html
COMMIT: c303b49
CMSSW: CMSSW_20_1_X_2026-07-08-1100/el9_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmsdist/10712/54619/install.sh to create a dev area with all the needed externals and cmssw changes.

Failed External Build

I found compilation error when building:

from tensorflow/lite/kernels/conv.cc:38:
external/eigen_archive/include/eigen3/unsupported/Eigen/CXX11/../src/Tensor/TensorRef.h: In instantiation of 'EigenForTFLite::TensorRef::TensorRef(const Expression&) [with Expression = EigenForTFLite::TensorMap, 16>; PlainObjectType = EigenForTFLite::Tensor]':
external/local_tsl/tsl/framework/convolution/eigen_spatial_convolutions-inl.h:1609:7:   required from 'std::conditional_t<(EigenForTFLite::internal::traits::Layout == EigenForTFLite::ColMajor), EigenForTFLite::TensorReshapingOp::Index, EigenForTFLite::internal::traits::NumDimensions>, const EigenForTFLite::TensorContractionOp::Index>, 1>, const EigenForTFLite::TensorReshapingOp::Index, 2>, const Kernel>, const EigenForTFLite::TensorReshapingOp::Index, 2>, const EigenForTFLite::TensorImagePatchOp<-1, -1, const Derived> >, const OutputKernel> >, EigenForTFLite::TensorReshapingOp::Index, EigenForTFLite::internal::traits::NumDimensions>, const EigenForTFLite::TensorContractionOp::Index>, 1>, const EigenForTFLite::TensorReshapingOp::Index, 2>, const EigenForTFLite::TensorImagePatchOp<-1, -1, const Derived> >, const EigenForTFLite::TensorReshapingOp::Index, 2>, const Kernel>, const OutputKernel> > > EigenForTFLite::SpatialConvolution(const Input&, const Kernel&, Index, Index, PaddingType, Index, Index, const OutputKernel&, Index, Index, Index, Index) [with Input = TensorMap, 16>; Kernel = TensorMap, 16>; OutputKernel = const NoOpOutputKernel; std::conditional_t<(internal::traits::Layout == EigenForTFLite::ColMajor), TensorReshapingOp::Index, internal::traits::NumDimensions>, const TensorContractionOp::Index>, 1>, const TensorReshapingOp::Index, 2>, const Kernel>, const TensorReshapingOp::Index, 2>, const TensorImagePatchOp<-1, -1, const Derived> >, const OutputKernel> >, TensorReshapingOp::Index, internal::traits::NumDimensions>, const TensorContractionOp::Index>, 1>, const TensorReshapingOp::Index, 2>, const TensorImagePatchOp<-1, -1, const Derived> >, const TensorReshapingOp::Index, 2>, const Kernel>, const OutputKernel> > > = TensorReshapingOp, const TensorContractionOp, 1>, const TensorReshapingOp, const TensorImagePatchOp<-1, -1, const TensorMap, 16> > >, const TensorReshapingOp, const TensorMap, 16> >, const NoOpOutputKernel> >; typename internal::traits::Index = long int; typename internal::traits::Index = long int; Index = long int]'
./tensorflow/lite/kernels/internal/optimized/multithreaded_conv.h:130:36:   required from 'void tflite::multithreaded_ops::EigenTensorConvFunctor::operator()(const EigenForTFLite::ThreadPoolDevice&, const T*, int, int, int, int, const T*, int, int, int, int, int, int, int, tflite::PaddingType, T*, int, int) [with T = float]'
./tensorflow/lite/kernels/internal/optimized/multithreaded_conv.h:171:15:   required from here
external/eigen_archive/include/eigen3/unsupported/Eigen/CXX11/../src/Tensor/TensorRef.h:254:5: error: static assertion failed: "Expression must be mutable to create a mutable TensorRef.  Did you mean " "TensorRef?)"
254 |     EIGEN_STATIC_ASSERT(internal::is_lvalue::value,
|     ^~~~~~~~~~~~~~~~~~~
external/eigen_archive/include/eigen3/unsupported/Eigen/CXX11/../src/Tensor/TensorRef.h:254:5: note: 'std::integral_constant::value' evaluates to false
Target //tensorflow/tools/pip_package:wheel failed to build
INFO: Elapsed time: 472.446s, Critical Path: 26.94s


@cmsbuild

cmsbuild commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Pull request #10712 was updated.

@fwyzard

fwyzard commented Jul 9, 2026 via email

Copy link
Copy Markdown
Contributor

@fwyzard

fwyzard commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

I found compilation error when building: ...

OK, so one problem is that the version of Tensorflow that we use does not like the new version of Eigen.

@fwyzard fwyzard mentioned this pull request Jul 9, 2026
@cmsbuild

cmsbuild commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

-1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a56970/54623/summary.html
COMMIT: e3bcaa0
CMSSW: CMSSW_20_1_X_2026-07-08-2300/el9_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmsdist/10712/54623/install.sh to create a dev area with all the needed externals and cmssw changes.

Failed External Build

I found compilation error when building:

from tensorflow/lite/kernels/conv.cc:38:
external/eigen_archive/include/eigen3/unsupported/Eigen/CXX11/../src/Tensor/TensorRef.h: In instantiation of 'EigenForTFLite::TensorRef::TensorRef(const Expression&) [with Expression = EigenForTFLite::TensorMap, 16>; PlainObjectType = EigenForTFLite::Tensor]':
external/local_tsl/tsl/framework/convolution/eigen_spatial_convolutions-inl.h:1609:7:   required from 'std::conditional_t<(EigenForTFLite::internal::traits::Layout == EigenForTFLite::ColMajor), EigenForTFLite::TensorReshapingOp::Index, EigenForTFLite::internal::traits::NumDimensions>, const EigenForTFLite::TensorContractionOp::Index>, 1>, const EigenForTFLite::TensorReshapingOp::Index, 2>, const Kernel>, const EigenForTFLite::TensorReshapingOp::Index, 2>, const EigenForTFLite::TensorImagePatchOp<-1, -1, const Derived> >, const OutputKernel> >, EigenForTFLite::TensorReshapingOp::Index, EigenForTFLite::internal::traits::NumDimensions>, const EigenForTFLite::TensorContractionOp::Index>, 1>, const EigenForTFLite::TensorReshapingOp::Index, 2>, const EigenForTFLite::TensorImagePatchOp<-1, -1, const Derived> >, const EigenForTFLite::TensorReshapingOp::Index, 2>, const Kernel>, const OutputKernel> > > EigenForTFLite::SpatialConvolution(const Input&, const Kernel&, Index, Index, PaddingType, Index, Index, const OutputKernel&, Index, Index, Index, Index) [with Input = TensorMap, 16>; Kernel = TensorMap, 16>; OutputKernel = const NoOpOutputKernel; std::conditional_t<(internal::traits::Layout == EigenForTFLite::ColMajor), TensorReshapingOp::Index, internal::traits::NumDimensions>, const TensorContractionOp::Index>, 1>, const TensorReshapingOp::Index, 2>, const Kernel>, const TensorReshapingOp::Index, 2>, const TensorImagePatchOp<-1, -1, const Derived> >, const OutputKernel> >, TensorReshapingOp::Index, internal::traits::NumDimensions>, const TensorContractionOp::Index>, 1>, const TensorReshapingOp::Index, 2>, const TensorImagePatchOp<-1, -1, const Derived> >, const TensorReshapingOp::Index, 2>, const Kernel>, const OutputKernel> > > = TensorReshapingOp, const TensorContractionOp, 1>, const TensorReshapingOp, const TensorImagePatchOp<-1, -1, const TensorMap, 16> > >, const TensorReshapingOp, const TensorMap, 16> >, const NoOpOutputKernel> >; typename internal::traits::Index = long int; typename internal::traits::Index = long int; Index = long int]'
./tensorflow/lite/kernels/internal/optimized/multithreaded_conv.h:130:36:   required from 'void tflite::multithreaded_ops::EigenTensorConvFunctor::operator()(const EigenForTFLite::ThreadPoolDevice&, const T*, int, int, int, int, const T*, int, int, int, int, int, int, int, tflite::PaddingType, T*, int, int) [with T = float]'
./tensorflow/lite/kernels/internal/optimized/multithreaded_conv.h:171:15:   required from here
external/eigen_archive/include/eigen3/unsupported/Eigen/CXX11/../src/Tensor/TensorRef.h:254:5: error: static assertion failed: "Expression must be mutable to create a mutable TensorRef.  Did you mean " "TensorRef?)"
254 |     EIGEN_STATIC_ASSERT(internal::is_lvalue::value,
|     ^~~~~~~~~~~~~~~~~~~
external/eigen_archive/include/eigen3/unsupported/Eigen/CXX11/../src/Tensor/TensorRef.h:254:5: note: 'std::integral_constant::value' evaluates to false
Target //tensorflow/tools/pip_package:wheel failed to build
INFO: Elapsed time: 579.271s, Critical Path: 42.75s


@akritkbehera

Copy link
Copy Markdown
Contributor

Running tests here #10724 with the changes for eigen and tensorflow 2.21.
Let's see how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants