Closed
[benchmarks/torchbench] fambench_dlrm 模型无法在 NPU 上运行:canary 白名单缺失 + 设备迁移门只认 cuda #4658
huyuchaoAdd on  Sep 7Closed at  Sep 29
huyuchao
huyuchaoCollaborators
Sep 7 Create

问题现象

  1. torchbench.py --only fambench_dlrm 选不中模型:fambench_dlrm 位于 canary_models 目录,runner 的 CANARY_MODELS 白名单未包含(默认仅 torchrec_dlrm)。
  2. 加入白名单后 eager 直接失败:RuntimeError: Expected all tensors to be on the same device, but got index is on npu:0, different from other tensors on cpu(canary_models/fambench_dlrm/__init__.py 的 if device == "cuda" 门未覆盖 npu,use_gpu=False 时 dlrm.to(device) 不执行,模型留 CPU)。
  3. --accuracy 下两个流程问题:
    • 模型常驻 ~12.8GB(26 张 555693 行 embedding 表),fp64 golden + 两份 eager deepcopy 叠加爆 60GB HBM(eager_2nd_run_OOM)
    • deterministic 模式下 torch._inductor.runtime.benchmarking.may_ban_benchmarking 拦截 NPU autotuner 的 benchmark_gpu 计时调用(fail_to_run)

问题根因

  • runner 侧:canary 白名单不含 fambench_dlrm;accuracy 流程未释放阶段性模型副本
  • benchmark 仓侧(pytorch/benchmark.git,用户按 README 第 6 步自行 clone,不进本仓 git):设备迁移/校验代码 cuda-only
  • torch_npu runtime 侧:autotuner 计时调用未带 is_vetted_benchmarking 声明

环境

master 36a38cc + torch 2.13.0+cpu + triton-ascend 3.2.2 + CANN 9.1.0-beta.1(910B2)

likedislike
TorchNPU-BotTorchNPU-BotCollaborators
Sep 7 Added label: triage-review
TorchNPU-Bot
TorchNPU-BotCollaborators
Sep 7 Comments:

issue待分派,添加triage-review标签

likedislike
huyuchaohuyuchaoCollaborators
Sep 7 Associated pull request
TorchNPU-BotTorchNPU-BotCollaborators
Sep 7 Added label: bot-triaged; Removed label: triage-review
TorchNPU-Bot
TorchNPU-BotCollaborators
Sep 7 Comments:

检测到当前 issue 已关联 PR,自动添加标签:bot-triaged

likedislike
chenrayray
chenrayrayCollaborators
Sep 29 Comments:

因为本单相关实施 PR 已全部结束(1 个已合入、0 个已关闭),按照本轮 issue 整理规则,先关闭此单。

核对的 PR:

如仍有问题或需要继续推进,请重新打开,并补充当前 PyTorch / TorchNPU / CANN 版本、硬件环境、复现步骤及相关日志;需求类请补充尚未完成的具体内容。

likedislike
chenrayraychenrayrayCollaborators
Sep 29 Close issue
chenrayraychenrayrayCollaborators
Sep 29 changed custom state from TODO to DONE
ascend-robotascend-robotCollaborators
Sep 29 Added label: resolved