Skip to content

[FEA]: support system ctk install for python package #7328

@ZzEeKkAa

Description

@ZzEeKkAa

Is this a duplicate?

Area

Not sure

Is your feature request related to a problem? Please describe.

I was recently building docker image where I need to use ctk both at C++ level and python level. At python level I was also using cuda.cccl and current docs does not provide a way to reuse system install ctk, only packages installed through pypi. That results into duplicate package install and blows container size.

Describe the solution you'd like

Support for system install packages. At nvmath python we have [sysctk1*] subpackage support that installs all the requirements, but does not install pypi ctk. https://github.com/NVIDIA/cuda-python suppose to work with system install.

Describe alternatives you've considered

I was able to hack system ctk support together by using this:

pypi dependencies:

sysctk13 = [
  "cuda-bindings>=13.0.0,<14.0.0",
  "numba-cuda>=0.23.0",
]

with

apt install -y cuda-nvrtc-13-1 libnvjitlink-13-1 cuda-cudart-13-1 cuda-nvcc-13-1 libnvvm-13-1

and setting CUDA_PATH=/usr/local/cuda-13.1 to help cuda.pathfinder find headers from system install.

based on the

cu13 = [
  "cuda-bindings>=13.0.0,<14.0.0",
  "cuda-toolkit[nvrtc,nvjitlink,cudart,nvcc,nvvm]==13.*",
  "numba-cuda[cu13]>=0.23.0",
]

Additional context

Nvmath reference:
https://github.com/NVIDIA/nvmath-python/blob/main/pyproject.toml#L87-L94

sysctk12 = [
    "cuda-bindings >=12.9.2,<13",
    "cutensor-cu12 >=2.3.1",
]
sysctk13 = [
    "cuda-bindings >=13.0.1,<14",
    "cutensor-cu13 >=2.3.1",
]
# ...
sysctk12-dx = [
    "nvmath-python[sysctk12]",
    "nvmath-python[dx]",
]
sysctk13-dx = [
    "nvmath-python[sysctk13]",
    "nvmath-python[dx]",
]

Note: test-cu1* optional dependencies may be moved to [dependency-groups] to avoid distributing them with wheels.

Metadata

Metadata

Assignees

Labels

cuda.computeFor all items related to the cuda.parallel Python module

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions