Closed bdice closed 1 year ago
Would the cuda-cudart
package be sufficient? Or is more needed than that?
@jakirkham I think building the package requires CUDA headers (so -dev
packages for cuda-cudart-dev
and cuda-nvrtc-dev
). At runtime, perhaps only cuda-cudart
and cuda-nvrtc
are needed?
The features depending on cudaProfiler.h
are not brought in as a dependency of cuda-cudart
and thus must be explicitly depended on via cuda-profiler-api
at build time.
cuda-cudart
is not needed at runtime, as currently the cudart layer in CUDA Python is a reimplementation of cudart. So just NVRTC.
Thanks all! That sounds reasonable. Let's see if @vzhurba01 & @m3vaz have more thoughts 🙂
As pointed out, building the package requires CUDA headers. The headers parsed are: https://github.com/NVIDIA/cuda-python/blob/9ac2d31eaf5ba5aee3ff4a0b70df0dc81ccf83fb/setup.py#L37
For building, the headers can be categorized into 3 groups:
(1) Referenced by extern from
, list by @bdice looks complete
(2) Not used right now
(3) cuda_profiler_api.h and graphics APIs (EGL, GL, VDPAU)
For runtime, the requirements are:
(2) Many types are built-in though, but not all. One of the ported examples/samples encounter such a scenario.
Perhaps (2) can be limited to only the built-in types, and remaining dependency if needed can be added by users?
I would be happy to keep cudart and nvrtc as “hard” runtime dependencies to ensure the package is fully functional. The main parts I want to strip out are the rest of cuda-toolkit that make it very large, like math libraries.
How should we go about making this change? The conda-forge side can simply use this dependency list. We’ll want to reflect the same set of dependencies for the nvidia
channel version and issue a new version (or a new build of the same version).
Release v12.1.0 trims Conda dependencies to only require NVRTC and CUDART (excluding math libraries). Closing.
Thanks Vlad! 🙏
Conda packages released for
cuda-python
to thenvidia
channel depend oncuda-toolkit
, i.e. the entire CUDA Toolkit.https://anaconda.org/nvidia/cuda-python/files?version=12.0.0
The
cuda-python
package should declare dependencies only on components that are actually used, which might be a more limited subset like these, which I found by readingextern from
declarations:cuda.h
,cuda_runtime.h
,driver_types.h
, and other headers in https://github.com/NVIDIA/cuda-python/blob/main/cuda/ccudart.pxd.innvrtc.h
https://github.com/NVIDIA/cuda-python/blob/9ac2d31eaf5ba5aee3ff4a0b70df0dc81ccf83fb/cuda/cnvrtc.pxd.in#L11cudaProfiler.h
https://github.com/NVIDIA/cuda-python/blob/9ac2d31eaf5ba5aee3ff4a0b70df0dc81ccf83fb/cuda/ccuda.pxd.in#L1868