cuda.core: grown VMM buffers record the requested size, not the aligned size
まだ誰も着手していません。
- 主要言語
- Cython
- スター
- 3.4k
- フォーク
- 329
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 116
説明
modify_allocation records new_size on the returned Buffer (slow path: Buffer.from_handle(ptr=new_ptr, size=new_size); fast path: buf._size = new_size), while allocate() records the granularity-aligned size. For a grow to a size that is not a multiple of the granularity (2 MiB on current GPUs), close() calls cuMemUnmap with an end inside the last mapping, which the driver rejects, so the reservation, the mappings, and the physical memory leak and the Buffer deleter reports a CUDAWarning. The equal-size branch hits the same alignment rule in cuMemSetAccess and raises. Reachable today through the slow path. No test grows to an unaligned size. Fix belongs to the ownership redesign (epic #2906).
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
modify_allocation から開始し、スローパスの Buffer.from_handle のサイズを、ファストパスの buf._size および allocate() のアライン済みサイズと比較します。アラインされていない拡張と、サイズが等しい場合の分岐を実行し、その後、警告やリークを発生させずに close() が cuMemUnmap と cuMemSetAccess に到達することを確認します。epic #2906 の所有権の再設計を考慮し、これらのケースの回帰テストカバレッジを追加します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100