Idea: parse argument list of kernels for safer launching
まだ誰も着手していません。
評価
調査の方向性
まず、提案されている cust::module::Module、cust::function::Function、Stream のエントリポイントと、issue で説明されている runtime および build.rs の代替案を確認してください。1つのアプローチ、その PTX/fatbin の範囲、検証に関する期待事項について合意するまでは、作業を完了と定義できる状態ではありません。
索引モデルが issue の本文から書いたものです。
説明
The combination of cuLaunch requiring getting the argument list exactly right and major version changes of PTX ISA can change the argument list makes it close to impossible of being certain that a kernel is launched correctly using the driver API. One way to improve upon this would be to parse the ptx/fatbin for kernel argument list and verify the rust source against it. This would not be possible for cubin, but ptx/fatbin should cover most use cases.
There are basically two approaches to this. The runtime approach would be to add function argument list info to Cust::module::Module which is generated when ptx/fatbin is added to the module. Then it would be passed to the cust::function::Function when it is created.
The other alternative is a static/build.rs alternative. We could create a dev-dependency that parses a .ptx and create rust types containing information about the argument list layout. A generic method on Module would then return the specific type implementing some Kernel trait and the Stream would have a generic launch function that would accept some <Function as Kernel>::ArgList argument.
I'm not promising to implement this, but would love to get some feedback on the idea.
- 主要言語
- Rust
- スター
- 5.4k
- フォーク
- 251
- 平均マージ
- 4日 15時間
- マージ済み PR(30日)
- 4
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Rust-GPU/rust-cuda のほかの issue
-
Default NvvmArch::Compute75 silently produces InvalidPtx on pre-Turing GPUs (Pascal/Maxwell/Volta)オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
-
Array parameters lose alignment metadata and ICE on >16 byte alignments対応中かも @Snehal-Reddy が 164 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
Rust-GPU/rust-cuda の issue をすべて見る
似ている issue
-
Docs: refresh target-app-parity and file-format-parity against main対応中かも @vangel76 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
storytold/photocraft#4417 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
bevyengine/dlss_wgpu#37 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
bherbruck/solvecraft#369 ·
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
alunduil/git-worktree-poi#11 ·