Make `cuda-bindings` buildable against CTK wheels?
まだ誰も着手していません。
- 主要言語
- Cython
- スター
- 3.4k
- フォーク
- 329
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 116
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、cuda-python のビルド設定を、参照されている nvmath-python の pyproject.toml および builder/utils.py のアプローチと比較します。pip-wheel-only のソースインストールで CUDA_PATH なしに CTK ヘッダーを見つけられるかを判断します。完了条件は、ローカルの CTK 環境なしで pip install . が成功することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- build-system
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100