Skip to content

Update to Work with Eigen 5.0.0#536

Open
EricaCMitchell wants to merge 3 commits intomasterfrom
emitchell/upgrade/eigen-5.x.x
Open

Update to Work with Eigen 5.0.0#536
EricaCMitchell wants to merge 3 commits intomasterfrom
emitchell/upgrade/eigen-5.x.x

Conversation

@EricaCMitchell
Copy link

@EricaCMitchell EricaCMitchell commented Feb 2, 2026

Description

Eigen 5.0.0 changes where version is located. Needs to find version header for Eigen 5.x.x and Eigen 3.x.x. Same change as Libint PR 395.

Details

  • Changes FindEigen3.cmake to try finding version for Eigen 5.x.x in new file Eigen/Version or try finding version for Eigen 3.x.x in old location Eigen/src/Core/util/Macros.h
  • Introduces macro EIGEN_HAS_CXX17, which is set if EIGEN_MAJOR_VERSION > 4
  • Checks range and matrix dimensions before inheritance in EigenSparseTile
  • Check if data is nullptr after inheritance in TensorInterface

This comment was marked as outdated.

This comment was marked as outdated.

@EricaCMitchell
Copy link
Author

Eigen3 5.x.x makes a change in its allocation if size == 0 (libeigen L217) compared to Eigen3 4.x.x.

For an empty TiledRange1, this results in a nullptr being returned instead of the previous static_cast<pointer>(std::malloc(0)), which screws up the data_ in tensor.h.

@EricaCMitchell EricaCMitchell force-pushed the emitchell/upgrade/eigen-5.x.x branch from f2695c6 to b79f4ca Compare February 4, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant