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

未关闭
#726 0 条评论 0 个 reaction 已指派 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 小时
30 天内合并 PR
113

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/cuda-python 的其他 Issue

查看 NVIDIA/cuda-python 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。