Repository navigation
Fix Eigen ABI pin when a parent project shadows the Eigen recipe - #300
Merged
Merged
Conversation
- Call ipc_toolkit_pin_eigen_abi() from CMakeLists.txt after include(eigen); a parent's eigen.cmake earlier in CMAKE_MODULE_PATH replaces ours, so the pin in the recipe never ran - Restore cmake/recipes/eigen.cmake to its pre-#297 form - Fail the build in eigen_abi.cpp when the pin is missing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #300 +/- ##
=======================================
Coverage 96.86% 96.86%
=======================================
Files 229 229
Lines 23047 23047
Branches 1619 1619
=======================================
Hits 22324 22324
Misses 723 723
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Eigen ABI pin from #297 now applies even when a parent project's own
eigen.cmakerecipe shadows the toolkit's. A guard in the library fails the build if the pin is ever lost.CMakeLists.txtcallsipc_toolkit_pin_eigen_abi(Eigen3::Eigen ...)right afterinclude(eigen), andcmake/recipes/eigen.cmakegoes back to its pre-Pin Eigen's ABI on the Eigen target #297 form.include(eigen)loads the firsteigen.cmakeonCMAKE_MODULE_PATH. Parents such as CloIPC and PolyFEM put their own recipe first, so code in the toolkit's recipe never runs.ipc_toolkit_eigen_abi.cmakehas a name no parent will reuse, so the pin now runs whichever recipe createdEigen3::Eigen.src/ipc/utils/eigen_abi.cppraises an#errorwhenIPC_TOOLKIT_WITH_SIMDis set withoutEIGEN_DONT_VECTORIZE, orIPC_TOOLKIT_WITH_CUDAis set withoutEIGEN_MAX_ALIGN_BYTES=0andEIGEN_MAX_STATIC_ALIGN_BYTES=0.eigen_abi_matches_library()cannot catch a missing pin, because the library and its consumers then agree on the wrong ABI.Impact
-march=nativeand nvcc does not, soTestAirDampingEnergyaborted infree()with heap corruption.Type of change
How Has This Been Tested?
feature/internal-damping, which shadowseigen.cmake) as the parent project, with SIMD and CUDA on. I checkedCXX_DEFINES/CUDA_DEFINESin everyflags.makethat includes Eigen:main(f388443): 0 of 8 Eigen-linking targets have the definitions.eigen_abi.cppwithmain's unpinnedipc_toolkitflags from that build. Both#errors fire.[AirDampingEnergy], which aborted onmain.testpreset (Debug, CUDA on): 485 of 485 ctest tests pass (6 skipped by design).Test Configuration:
Checklist