已合并
test: gate NPU dataloader IPC scenario #35684
test: gate NPU dataloader IPC scenario #35684
已合并
jiangna1111创建于 5月14日
jiangna1111
jiangna1111成员
5月14日

【合入来源】

如有社区issue,请关联issue链接
请勿携带内部流程信息(需求链接、问题单、内部issue等)

社区 issue 链接:https://gitcode.com/Ascend/pytorch/issues/1953

【修改方案】

test/test_dataloader.py::TestDataLoader.test_multiprocessing_contexts 中,非虚拟内存场景下不再让 DataLoader worker 返回 NPU tensor,避免 worker 退出后主进程继续访问已失效的 NPU IPC 共享内存。

虚拟内存场景 PYTORCH_NPU_ALLOC_CONF=expandable_segments:True 保持原 NPU tensor 路径不变。

【资料变更】

不涉及。

【接口变更】

不涉及。

【功能验证】

非虚拟内存场景验证:

python /home/jn/pta_work/pytorch-dataloader-ipc-v271-verify/test/test_dataloader.py TestDataLoader.test_multiprocessing_contexts

虚拟内存场景验证:

PYTORCH_NPU_ALLOC_CONF=expandable_segments:True \
python /home/jn/pta_work/pytorch-dataloader-ipc-v271-verify/test/test_dataloader.py TestDataLoader.test_multiprocessing_contexts

验证结果:

8a97ca2acc71d04c19f423d1d5ee8e7e.png

【CheckList】

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 jiangna1111 的贡献)
jiangna1111jiangna1111成员
5月14日 创建了 pull request,commit ca6a2e8e
jiangna1111jiangna1111成员
5月14日 关联了issue:[Usage]:
ascend-robot
ascend-robot成员
5月14日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
test renyujin, liujunzhu, wanglijun55 (3/2) renyujin (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

jiangna1111, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
ascend-robotascend-robot成员
5月14日 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
5月14日 评论:

当前仓库存在以下 保护分支

Protected Branch Version Release
master
v2.11.0
v2.7.1
v2.10.0
v2.9.0
v2.12.0

评论 /sync <branch1> <branch2> ... 可将当前 PR 修改同步到其它分支(创建同步 PR):
a) 如果当前 PR 是 Open 状态,同步操作将延迟到 PR 被合并时执行
b) 如果当前 PR 已经 Merged,将立即执行同步操作

注意:

  1. /sync 命令可以指定同步到多个分支,仅最后一个 /sync 命令生效
  2. 如果创建的同步 PR 不正确,可通过向同步 PR 的源分支提交轻量级 PR 完善,或使用 /close 命令关闭
likedislike
此处折叠了93条消息 查看更多
renyujin成员
5月19日 评论:

/lgtm
/approve

likedislike
ascend-robotascend-robot成员
5月19日 添加了label:approved
ascend-robot
ascend-robot成员
5月19日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: renyujin.
Reviewers who wrote a comment of /lgtm are: renyujin, liujunzhu, wanglijun55.

likedislike
ascend-robotascend-robot成员
5月19日 关闭了关联的issue
ascend-robotascend-robot成员
5月19日 合入了pull request