Benchmark using pinned CUDA memory in data loaders

未关闭
#21 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python, pytorch

调研方向

从现有的 data-loader 内存复制更改以及链接的 PyTorch DataLoader 和 CUDA pinned memory 文档开始。在使用 pinned memory 和异步或非阻塞传输的情况下,对训练和预测都进行基准测试,同时检查所提到的 PyTorch 内部死锁。完成的标准是:行为经过测试、基准测试结果可用,并且证明该方案值得采用或予以否决。

由索引模型根据 Issue 内容生成。

描述

At the moment the data loaders load up images from the dataset, do pre-processing (like normalization), and then convert the images into tensors. Then we copy the data from CPU memory to GPU memory. This can be made more efficient by putting data into page-locked memory and using DMA to the data onto the GPU in async. fashion.

Look into functionality for pinning memory and async and non-blocking data transfers:

Note: the last time we used this we ran into some PyTorch-internal deadlocks. We need to carefully evaluate this, benchmark it, and figure out if it makes sense to go this route.

Tasks:

  • Check out docs for cuda semantics
  • Change memory copying behavior
  • Benchmark and test for both training as well as prediction
主要语言
Python
星标
2.1k
派生
384
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

mapbox/robosat 的其他 Issue

查看 mapbox/robosat 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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