cuda.core: VirtualMemoryResource.deallocate() unmaps without ordering on the stream
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
VirtualMemoryResource.deallocate() から始め、ストリームの検証と cuMemUnmap の処理を _SynchronousMemoryResource および LegacyPinnedMemoryResource と比較してください。次に、Buffer.close() のストリーム順序に関するドキュメントを確認し、解放時にアンマッピングの前にストリームが同期されること、また slow-path での拡張動作が引き続き正しいことを検証してください。
索引モデルが issue の本文から書いたものです。
説明
Summary
VirtualMemoryResource.deallocate() validates its stream argument and then calls cuMemUnmap at once. The VMM unmap does not synchronize, so work still in flight on the buffer accesses an unmapped range.
Buffer.close() documents stream-ordered deallocation, and the two synchronous resources (_SynchronousMemoryResource, LegacyPinnedMemoryResource) call stream.sync() before they free. VirtualMemoryResource is the only synchronous resource that skips this.
Suggested fix
Sync the stream before cuMemUnmap, as the siblings do. After #2880 the slow-path grow closes the old buffer through deallocate(), so a grow will sync once; that is the correct cost for a synchronous resource.
Refs: found while analyzing #2882.
- 主要言語
- Cython
- スター
- 3.4k
- フォーク
- 329
- 平均マージ
- 1日 21時間
- マージ済み PR(30日)
- 113
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/cuda-python のほかの issue
-
triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
NVIDIA/cuda-python#2717 ·
-
triage
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
NVIDIA/cuda-python#2712 ·
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA/cuda-python#2646 · リアクション 1 件 ·
-
cuda.core triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
NVIDIA/cuda-python#2435 · コメント 1 件 ·
-
CI/CD
NVIDIA/cuda-python#2926 · 担当者 1 名 ·
NVIDIA/cuda-python の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
avniproject/avni-client#2135 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
use-agent-os/agent-os#3276 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
good first issue refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100