Skip to content

Document requirements for using bindings at the Cython layer #245

@leofang

Description

@leofang

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.

Metadata

Metadata

Assignees

Labels

P0High priority - Must do!cuda.bindingsEverything related to the cuda.bindings moduledocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions