Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make rmm a compiled rather than header-only library #1779

Open
vyasr opened this issue Jan 8, 2025 · 0 comments
Open

Make rmm a compiled rather than header-only library #1779

vyasr opened this issue Jan 8, 2025 · 0 comments

Comments

@vyasr
Copy link
Contributor

vyasr commented Jan 8, 2025

rmm is currently a header-only library. This design has been convenient for a long time, but so far as we know it is not a hard requirement for any consumer. Conversely it has some drawbacks.

  • Using rmm as a header-only library limits our ability to manage symbol visibility due to inline symbols, something that is becoming increasingly important as we distribute more general packages.
  • Since we attempt to also keep our dependency tree header-only, the same symbol limitations apply to our dependencies, specifically spdlog and fmt.
  • With a header-only library we are also effectively tied to the ABI (in)stability of the projects that we depend on, whereas with a precompiled library we could hide those details behind a suitable implementation firewall.
  • Our reliance on the uniqueness of function-local statics across shared library boundaries precludes the possibility of building rmm on Windows.

Many of these issues are made particularly evident by the ongoing work on rapids-logger, which is in large part motivated by a desire to insulate RAPIDS from both spdlog's ABI changes and exposing its symbols publicly. As we are upstreaming much of rmm's core functionality into CCCL, which is header-only, I anticipate that converting rmm to a precompiled library will not be a major long-term issue, and it will help resolve these classes of problems.

I propose that we start shipping rapids-logger artifacts in 25.04, at which point rmm may still be header-only but will have a library dependency. Depending on the timing of other work, we can convert rmm to a precompiled library in either 25.04 or 25.06.

rapids-bot bot pushed a commit that referenced this issue Jan 8, 2025
See discussion in rapidsai/rapids-logger#10 (comment) and #1779. spdlog will remain a requirement for 25.02, but we will remove it in favor of a precompiled rapids-logger library in 25.04 (and that library will completely hide everything related to spdlog: APIs, package requirements, symbols, etc).

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #1780
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To-do
Development

No branches or pull requests

1 participant