Closed
[Bug] NPU autotuning logs full compiler diagnostics at ERROR level #4714
stonexxxAdd on Sep 9Closed at Sep 29
Sep 9 Added label: bug
Sep 9 Added label: triage-review; Removed label: bug
TorchNPU-Bot
Sep 9 Comments:
Sep 9 Comments:
issue待分派,添加triage-review标签


Sep 9 Added label: bug
Sep 9 Associated pull request
Sep 9 Added label: bot-triaged; Removed label: triage-review
TorchNPU-Bot
Sep 9 Comments:
Sep 9 Comments:
检测到当前 issue 已关联 PR,自动添加标签:bot-triaged


chenrayray
Sep 29 Comments:
Sep 29 Comments:
因为本单相关实施 PR 已全部结束(1 个已合入、0 个已关闭),按照本轮 issue 整理规则,先关闭此单。
核对的 PR:
- pytorch !46117:已合入
如仍有问题或需要继续推进,请重新打开,并补充当前 PyTorch / TorchNPU / CANN 版本、硬件环境、复现步骤及相关日志;需求类请补充尚未完成的具体内容。


Sep 29 Close issue
Sep 29 changed custom state from TODO to DONE
Sep 29 Added label: resolved
问题现象
在
torch_npu: 2.13.0、NPU: Ascend 950环境中开启TORCHINDUCTOR_MAX_AUTOTUNE=1后,部分 autotune 候选会因编译或运行失败被忽略。当前 ERROR 日志直接输出完整异常字符串;毕昇编译异常可能包含完整 MLIR、内存规划 IR 和大量hivm.hir指令,导致单个失败候选产生大量日志,掩盖真正的错误尾部和测试结果。触发条件
以下任一路径获得包含完整编译诊断的异常时会触发:
NPUCompileError。RuntimeError。原因
三个 ERROR 日志入口均直接记录
str(error)或完整msg,没有长度或行数限制。编译器附带的中间 IR 因此被全部提升到默认 ERROR 日志级别。期望行为
验证结果
对 FlexAttention extended test 开启
TORCHINDUCTOR_MAX_AUTOTUNE=1并清空 cache 后全量运行:36 passed, 15 warnings。IR Dump After、module attributes、hivm.hir.anchor和func.func均为 0 次。