Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link-time optimizations in CUDA 11 - what are they and how to use them?

The CUDA 11 features announcement, it's said that there are now:

New link time optimization capabilities

what link-time optimizations does nvcc actually employ (e.g. relative to the LTO capabilities in host-side code with g++ or clang++)?

Also - is there something one needs to do to get LTO enabled, or does it always occur (unlike with host-side code where you need to compile with an -flto switch?

like image 249
einpoklum Avatar asked Nov 05 '25 18:11

einpoklum


1 Answers

Partial answer:

To enable link-time optimization, use --dlink-time-opt (or dlto) when invoking the NVCC compiler, both for compilation and for device-side code linking. No (link-time) optimization will be applied if the compiler can't find the relevant intermediate information.

like image 85
einpoklum Avatar answered Nov 07 '25 12:11

einpoklum