[FEA] Add LTO-IR infrastructure for JIT compilation to reduce compilation time #19579
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.
This PR implements experimental LTO-IR (Link Time Optimization Intermediate Representation) support for cuDF's JIT compilation system to address the significant compilation time overhead identified in NVRTC profiling.
Problem
Current cuDF JIT compilation uses NVRTC to compile CUDA C++ code at runtime, with profiling showing that ~90% of compilation time is spent in the CUDA C++ frontend. This makes JIT compilation prohibitively expensive for latency-sensitive workloads with dynamic expressions.
Solution
This implementation adds LTO-IR support that:
Key Features
Build System Integration
CUDF_USE_LTO_IR=ON
to enable LTO-IR support--device-lto
flags for CUDA compilationRuntime Infrastructure
CUDF_JIT_COMPILATION_MODE
,CUDF_JIT_AGGRESSIVE_DETECTION
)Integration Points
src/transform/transform.cpp
)src/binaryop/binaryop.cpp
)Usage
Current Status
This PR provides a complete foundation with:
Performance Impact
When fully implemented, this is expected to provide:
Future Work
The infrastructure is designed to be forward-compatible and provides immediate value through improved organization of JIT compilation logic and comprehensive fallback mechanisms.
Fixes #19578.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.