Title: Make `cuda-bindings` buildable against CTK wheels? · Issue #692 · NVIDIA/cuda-python · GitHub
Open Graph Title: Make `cuda-bindings` buildable against CTK wheels? · Issue #692 · NVIDIA/cuda-python
X Title: Make `cuda-bindings` buildable against CTK wheels? · Issue #692 · NVIDIA/cuda-python
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 s...
Open Graph 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 d...
X 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 d...
Opengraph URL: https://github.com/NVIDIA/cuda-python/issues/692
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Make `cuda-bindings` buildable against CTK wheels?","articleBody":"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.\n\nThis 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.\n\nThe whole thing relies on the fact that building bindings just need a host compiler; no NVCC is needed. The steps is as follows:\n- We [list needed CTK wheels](https://github.com/NVIDIA/nvmath-python/blob/1cbc60be436fe98e8a08f38e9867bc6fba90f007/pyproject.toml#L8-L10) in the `[build-system.requires]` session. They will provide the needed headers.\n- Since `setuptools` does not provide a way for us to programmatically query the path to the isolated build environment at build time, [we search the potential paths](https://github.com/NVIDIA/nvmath-python/blob/1cbc60be436fe98e8a08f38e9867bc6fba90f007/builder/utils.py#L12-L41) based on the assumption that `sys.path` must be updated for `setuptools` to find the build env.\n- We [pass `\u003cbuild env path>` to `setuptools`](https://github.com/NVIDIA/nvmath-python/blob/1cbc60be436fe98e8a08f38e9867bc6fba90f007/builder/utils.py#L118) so that the CUDA headers can be found by gcc/msvc.\n\nI 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.","author":{"url":"https://github.com/leofang","@type":"Person","name":"leofang"},"datePublished":"2025-06-07T01:32:45Z","url":"https://github.com/NVIDIA/cuda-python/issues/692"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b5c21695-d4ef-3c78-3359-4e207e4f7f0f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C580:1E4EA2:39AB21:4F0E5D:6AF83A6D |
| html-safe-nonce | b11af9a281ede9e8b901303953ed76aab960774d311617fa6e1008c43f4f8983 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTgwOjFFNEVBMjozOUFCMjE6NEYwRTVEOjZBRjgzQTZEIiwidmlzaXRvcl9pZCI6Ijc3Mzc3NDk3NTI5NzU0NzMyNjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 89843ab456d8337e1d5d472964b701df45ecb7160a1b4374ec0353a64d577c45 |
| hovercard-subject-tag | issue:3126250727 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NVIDIA/cuda-python/692/issue_layout |
| twitter:image | https://opengraph.githubassets.com/432644d16d50f889c929cd0914a9d28c6165bf07f9ee7d6d8bf4a1da936523a3/NVIDIA/cuda-python/issues/692 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/432644d16d50f889c929cd0914a9d28c6165bf07f9ee7d6d8bf4a1da936523a3/NVIDIA/cuda-python/issues/692 |
| og:image:alt | 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 d... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | leofang |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5713ecd83001b2f55c3509fb7a292bf7d66d0f167c7ae87a9f7eaec5a52bf8db |
| turbo-cache-control | no-preview |
| go-import | github.com/NVIDIA/cuda-python git https://github.com/NVIDIA/cuda-python.git |
| octolytics-dimension-user_id | 1728152 |
| octolytics-dimension-user_login | NVIDIA |
| octolytics-dimension-repository_id | 381173759 |
| octolytics-dimension-repository_nwo | NVIDIA/cuda-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 381173759 |
| octolytics-dimension-repository_network_root_nwo | NVIDIA/cuda-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 653be32ff5c755082a4db662491bfbbcfc9112c1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width