Skip to content

RFC: Statically link to cudart #100

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

Closed
leofang opened this issue Sep 11, 2024 · 2 comments · Fixed by #517
Closed

RFC: Statically link to cudart #100

leofang opened this issue Sep 11, 2024 · 2 comments · Fixed by #517
Assignees
Labels
P0 High priority - Must do! RFC Plans and announcements

Comments

@leofang
Copy link
Member

leofang commented Sep 11, 2024

Currently CUDA Python has a Cython-based reimplementation of CUDA runtime on top of the CUDA driver APIs. This is significant effort in terms of maintenance, requiring a lot of engineering time, as we have to catch up with every new cudart APIs indefinitely.

This RFC reflects the team's plan that we will switch to statically linking to cudart on all platforms (Linux & Windows) instead, starting from the next CUDA major release. That is, for cuda-python X.Y.Z we statically link to libcudart_static.a on Linux (or cudart_static.lib on Windows) from CUDA Toolkit X.Y.Z.

By doing this, the benefits include:

  • We can remove tens of thousands of lines of Cython code
  • We can avoid chasing indefinitely after latest cudart APIs
  • We can avoid potential possibilities of misaligned reimplementation, in favor of directly using the "official" cudart implementation
  • We can reduce significantly the build time of cuda-python wheels and conda packages
  • We continue offering CUDA minor version compatibility as well as all other functionalities and expectations that the current implementation offers, e.g.

Please let us know if this could be a concern to your project, as we do not anticipate any issue or any user-visible effects. Thanks!

@github-actions github-actions bot added the triage Needs the team's attention label Sep 11, 2024
@leofang leofang added P0 High priority - Must do! RFC Plans and announcements and removed triage Needs the team's attention labels Sep 11, 2024
@leofang leofang pinned this issue Sep 16, 2024
@leofang leofang unpinned this issue Sep 26, 2024
@vyasr
Copy link

vyasr commented Oct 30, 2024

Presumably since this is static linking it completely gets around the original issues that led to the reimplementation of the runtime, which IIRC was something to do with cudart DLL load orders on Windows?

@vyasr
Copy link

vyasr commented Oct 30, 2024

#16 (comment) looks like it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority - Must do! RFC Plans and announcements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants