You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Further modernization of the build backend to reduce setup.py usage #605
Creating an issue to capture the internal discussions.
Currently both cuda.bindings and cuda.core use setuptools as the build backend and have a mixture of pyproject.toml static declarations and setup.py dynamic logics. We have two choices here:
Keep setuptools but further reduce the amount of code in setup.py:
This has the benefit of reusing CUDA discovery mechanism (FindCUDAToolkit) and other nice build system features provided by CMake (see the relevant discussion in Splayed layout support #46).
The potential downside is to maintain a custom CMakeLists.txt which is arguably a burden for non-C++ (=C & Python) oriented developers. Our Cython extensions are very simple to build.
I guess it is better to revisit this, once #661 is implemented. We need headers path, while building extensions
Not really as once we move to scikit-build-core CMake would find the libraries and headers. You could add prefixes, but at least from my perspective a lot of the motivation was to benefit from all the capabilities that are already present in CMake.
Activity
cuda.core's build backend #606cuda.bindings's build backend #607leofang commentedon May 4, 2025
cc @ZzEeKkAa for vis (since
cuda.bindings'ssetup.pyhas a chunk of code copied from nvmath-python and other Python projects)mdboom commentedon Aug 15, 2025
Unless I'm missing a way to achieve this today, another nice benefit of this change would be parallel builds (utilizing all cores).
leofang commentedon Aug 15, 2025
Setting
CUDA_PYTHON_PARSER_CACHING=1andCUDA_PYTHON_PARALLEL_LEVEL=$(nproc)will make building cuda-bindings reasonably faster!https://nvidia.github.io/cuda-python/cuda-bindings/latest/environment_variables.html
ZzEeKkAa commentedon Aug 18, 2025
I guess it is better to revisit this, once #661 is implemented. We need headers path, while building extensions
cryos commentedon Aug 18, 2025
Not really as once we move to
scikit-build-coreCMake would find the libraries and headers. You could add prefixes, but at least from my perspective a lot of the motivation was to benefit from all the capabilities that are already present in CMake.ZzEeKkAa commentedon Aug 19, 2025
Is CMake aware of different locations of ctk (venv, conda, sysctk) ? Correct CTK location still need to be passed there
bdice commentedon Jul 21, 2026
Yes, CMake will discover the CUDA Toolkit from conda envs or the system. CTK wheels are not discoverable today.