Idea: parse argument list of kernels for safer launching
還沒有人認領這個 Issue。
評估
研究方向
首先檢視提議的 cust::module::Module、cust::function::Function 和 Stream 進入點,以及 issue 中描述的 runtime 和 build.rs 替代方案。在就一種方案、其 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
- 分支
- 256
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Rust-GPU/rust-cuda 的其他 Issue
-
`dynamic_shared_mem` overlaps a kernel's static shared memory (the extern symbol is declared with a size)可能已有人在做 @shubhamkapoor01 於 13 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
-
Default NvvmArch::Compute75 silently produces InvalidPtx on pre-Turing GPUs (Pascal/Maxwell/Volta)未關閉
難度 4/5 3-5 天 新手友好度 48/100
-
A `#[address_space(shared)]` static is stored with a generic `st.u32` instead of `st.shared`, corrupting memory — two identically-declared siblings lower differently可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 5/5 一週以上 新手友好度 30/100
-
Array parameters lose alignment metadata and ICE on >16 byte alignments可能已有人在做 @Snehal-Reddy 於 190 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 45/100
-
難度 4/5 3-5 天 新手友好度 35/100
查看 Rust-GPU/rust-cuda 的全部 Issue
相似的 Issue
-
crate: spate-kafka documentation priority: medium
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
balovess/aria2_rust#88 ·
-
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆
-
agent-self
難度 1/5 1 小時以內 新手友好度 88/100
yologdev/yoyo-evolve#1154 ·