Provide a nice wrapper over `DeviceMemoryResource` and `_SynchronousMemoryResource`

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

@shwina がすでに取り組んでいます。

2025年6月25日 から。

評価

この issue はまだ評価されていません。

説明

cuda.core enhancement P1

Need to check against Device().properties.memory_pools_supported to decide if we use DeviceMemoryResource or _SynchronousMemoryResource

Any chance we can turn this into a wrapper function, or just have DeviceMemoryResource() return the appropriate type when constructed?

Originally posted by @shwina in https://github.com/NVIDIA/cuda-python/pull/717#discussion_r2167323036

We could consider adding a helper function under the cuda.core.experimental.utils module. Later we might reimplement DeviceMemoryResource using cudax::device_memory_resource or cuda::device_memory_pool, so if we make DeviceMemoryResource to wrap both cudaMallocFromPoolAsync and cudaMalloc now, the re-implementation would become harder later.

主要言語
Cython
スター
3.4k
フォーク
329
平均マージ
1日 21時間
マージ済み PR(30日)
113

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/cuda-python のほかの issue

NVIDIA/cuda-python の issue をすべて見る

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

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