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

Document requirements for using bindings at the Cython layer #245

Open
leofang opened this issue Nov 15, 2024 · 1 comment
Open

Document requirements for using bindings at the Cython layer #245

leofang opened this issue Nov 15, 2024 · 1 comment
Assignees
Labels
cuda.bindings Everything related to the cuda.bindings module documentation Improvements or additions to documentation P0 High priority - Must do!

Comments

@leofang
Copy link
Member

leofang commented Nov 15, 2024

Since CUDA Python 11.7.1 (cfa118a), the way we build the bindings has changed to parsing CTK headers at build time. The parsed AST is analyzed to determine what bindings we should include for a certain platform, and the Cython template files (.pxd.in, .pyx.in) are populated accordingly.

This change has two profound impacts:

  1. For users building CUDA Python from source, the requirement is that the headers must come from the same CTK major.minor version as the CUDA Python version
  2. For users cimport'ing CUDA symbols in Cython, the same requirement also applies when building such user projects (since the CTK headers are included in the .pxd files via cdef intern from). The CTK headers becomes a transitive dependency of downstream projects (through CUDA Python).

Both requirements should be documented.

Note: These only apply to cydriver/cyruntime/cynvrtc (old ccuda/ccudart/cnvrtc) users; other modules have a more relaxed requirement.

@leofang leofang added cuda.bindings Everything related to the cuda.bindings module documentation Improvements or additions to documentation P0 High priority - Must do! labels Nov 15, 2024
@leofang leofang added this to the cuda-python 12-next, 11-next milestone Nov 15, 2024
@leofang
Copy link
Member Author

leofang commented Nov 15, 2024

(added a note)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda.bindings Everything related to the cuda.bindings module documentation Improvements or additions to documentation P0 High priority - Must do!
Projects
None yet
Development

No branches or pull requests

2 participants