Skip to content

Support precompiled LTO-IR in librtcx - #22704

Closed
vyasr wants to merge 4 commits into
NVIDIA:mainfrom
vyasr:feat/rtcx-fragment-sdk
Closed

Support precompiled LTO-IR in librtcx#22704
vyasr wants to merge 4 commits into
NVIDIA:mainfrom
vyasr:feat/rtcx-fragment-sdk

Conversation

@vyasr

@vyasr vyasr commented May 28, 2026

Copy link
Copy Markdown
Contributor

Description

This PR aims to rebuild the support for managing matrices of LTO-IR fragments from #22390 on top of the infrastructure introduced by #21625. It steals some of the earlier concepts present in #21625 (some of which are also now present in #22680). This PR makes some different choices for what is scoped within librtcx and what is part of cudf compared to #22654, and that's something we should discuss.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

vyasr added 4 commits May 28, 2026 15:36
- fragments.cmake: add_fragment(), add_composite_fragment(), get_jit_fragment_architectures()

- compute_matrix_product.cmake/.py: Cartesian product of JSON matrices

- embed.cmake: add OUTPUT_DIRECTORY parameter

- rtcx.hpp: lto_kernel, get_lto_linked_kernel, AlgorithmPlanner, AlgorithmLauncher

- rtcx.cpp: implementation of link-launch API
nvJitLink 12.9 successfully compiles, links, and executes LTO fatbins for sm_70. The guard was speculative — tested empirically on V100 (sm_70) and confirmed working. Arch deprecation is handled by get_jit_fragment_architectures dropping old archs from default lists in future toolkit versions.
@vyasr vyasr self-assigned this May 28, 2026
@vyasr vyasr added feature request New feature or request non-breaking Non-breaking change labels May 28, 2026
@copy-pr-bot

copy-pr-bot Bot commented May 28, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added libcudf Affects libcudf (C++/CUDA) code. CMake CMake build issue labels May 28, 2026
Comment thread cpp/librtcx/rtcx.cpp

} // namespace

lto_kernel get_lto_linked_kernel(cache_t& cache,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Having reviewed #22654 I think I agree with the approach there and get_lto_linked_kernel should be part of cudf proper and not librtcx. All the compiler flags etc should be handled by each library using librtcx. Presumably we can merge this function with the get_kernel function in #22654 once that PR merges.

Comment thread cpp/librtcx/rtcx.hpp
* @param cache Cache used for linked libraries
* @return Type-safe launcher for the linked kernel
*/
[[nodiscard]] AlgorithmLauncher get_launcher(cache_t& cache) const

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Rather than accepting a cache directly we might want to accept a callable wrapping the cache + get_lto_linked_kernel so that more of the logic is deferred to the calling library (libcudf) instead of being embedded inside rtcx's own functions.

@vyasr

vyasr commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

At this point I feel comfortable closing this PR in favor of #22680. We'll probably pull some parts of this PR into a new one just for adding murmurhash support once librtcx + LTO-IR is fully working in libcudf.

@vyasr vyasr closed this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake CMake build issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant