Make `cuda-bindings` buildable against CTK wheels?
Nobody has claimed this yet.
- Dominant language
- Cython
- Stars
- 3.4k
- Forks
- 329
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 116
Description
The meaning of the title is that pip install . from source can work without a local CTK environment (no need to set CUDA_PATH and all that). Everything is purely pip-wheel based.
This is actually doable, I just don't believe there is a serious use case because we really want users to not build from source, nor do I want to spend my time on enabling it, but I can be convinced. Anyway it's worth writing this up somewhere in the public.
The whole thing relies on the fact that building bindings just need a host compiler; no NVCC is needed. The steps is as follows:
- We list needed CTK wheels in the
[build-system.requires]session. They will provide the needed headers. - Since
setuptoolsdoes not provide a way for us to programmatically query the path to the isolated build environment at build time, we search the potential paths based on the assumption thatsys.pathmust be updated forsetuptoolsto find the build env. - We pass
<build env path>tosetuptoolsso that the CUDA headers can be found by gcc/msvc.
I enabled this for nvmath-python and it did worked like a charm, but the situation was a lot simpler than driver/runtime modules that we have here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing cuda-python's build configuration with the referenced nvmath-python pyproject.toml and builder/utils.py approach. Determine whether pip-wheel-only source installation can locate CTK headers without CUDA_PATH; done means pip install . succeeds without a local CTK environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100