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:
- 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
- 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.
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:
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 viacdef 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(oldccuda/ccudart/cnvrtc) users; other modules have a more relaxed requirement.