NVIDIA / NVIDIA/cuda-python

Make `cuda-bindings` buildable against CTK wheels?

オープン
#692 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

cuda.bindings P1 packaging
主要言語
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 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 based on the assumption that sys.path must be updated for setuptools to find the build env.
  • We pass <build env path> to setuptools so 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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。