Skip to content

Conversation

clementval
Copy link
Contributor

findloc.cpp is causing memory exhaustion with higher compute capabilities. Also it is a very expensive file to build. Remove it from the supported_sources for CUDA build until we can lower its memory footprint.

@clementval clementval requested a review from vzakhari September 2, 2025 22:00
Copy link
Contributor

@vzakhari vzakhari left a comment

Choose a reason for hiding this comment

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

Thank you, Valentin!

@clementval clementval merged commit e57cb26 into llvm:main Sep 2, 2025
10 checks passed
@clementval clementval deleted the cuda_flangrt_findloc branch September 2, 2025 22:22
modiking added a commit that referenced this pull request Oct 3, 2025
…ful compilation (#161760)

NVCC does more aggressive inlining than Clang/GCC causing the exported
functions in extrema.cpp and findloc.cpp to become extremely large from
function specializations leading to compilation timeouts. Marking the 2
functions in this change as noinline for NVCC alleviates this problem as
it removes the worst of the cross-matrix argument specializations.

Also remove the workaround in
#156542 that opted out
findloc.cpp from the CUDA flang-rt build

Testing:
ninja flang-rt builds in ~30 minutes, these 2 files build in ~3 minutes
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Oct 3, 2025
…for successful compilation (#161760)

NVCC does more aggressive inlining than Clang/GCC causing the exported
functions in extrema.cpp and findloc.cpp to become extremely large from
function specializations leading to compilation timeouts. Marking the 2
functions in this change as noinline for NVCC alleviates this problem as
it removes the worst of the cross-matrix argument specializations.

Also remove the workaround in
llvm/llvm-project#156542 that opted out
findloc.cpp from the CUDA flang-rt build

Testing:
ninja flang-rt builds in ~30 minutes, these 2 files build in ~3 minutes
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.

2 participants