Skip to content

enable IPO/LTO in cmake - #5640

Draft
ikbuibui wants to merge 2 commits into
ComputationalRadiationPhysics:devfrom
ikbuibui:feature/ipo
Draft

enable IPO/LTO in cmake#5640
ikbuibui wants to merge 2 commits into
ComputationalRadiationPhysics:devfrom
ikbuibui:feature/ipo

Conversation

@ikbuibui

@ikbuibui ikbuibui commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

As mentioned in issue #3106 it is worth investigating how link time optimization affects the code. We can simply enable it it for all targets in CMake.
Setting it to draft to see how the CI reacts. Will require some investigation into the effects on performance (if any).

As mentioned in issue ComputationalRadiationPhysics#3106 it is worth investigating how link time
optimization affects the code. We can simply enable it it for all
targets in cmake.
@ikbuibui ikbuibui added this to the 0.9.0 / next stable milestone Mar 3, 2026
@psychocoderHPC psychocoderHPC added component: tools scripts, python libs and CMake refactoring code change to improve performance or to unify a concept but does not change public API labels Mar 4, 2026
@psychocoderHPC

Copy link
Copy Markdown
Member

Note: Most likely this will not enable link time optimization for the nvcc compiler.
But it could be it is only important if we activate cuda device code linking, which we do not need. In the past, activating device code linking without lto was slowing down device code by 6%.

see: https://gitlab.kitware.com/cmake/cmake/-/work_items/26764

I played with LTO for nvcc in the past, but I need to check if I can find my data again.

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

Labels

component: tools scripts, python libs and CMake refactoring code change to improve performance or to unify a concept but does not change public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants