Closed
[mainline/master] SIMT 编译路径不应固定注入 simt_stack_limit #5045
stonexxxAdd on Sep 23Closed at Sep 29
Sep 23 Added label: triage-reviewmodule: graph-mode
TorchNPU-Bot
Sep 23 Comments:
Sep 23 Comments:
问题涉及 NPU Inductor 编译路径(SIMT 模式)中固定注入 simt_stack_limit 的逻辑,属图编译/图模式问题
添加分类标签:module: graph-mode。
当前分类由社区bot提供,如分类有误请在评论中回复。


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


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


Sep 29 Close issue
Sep 29 changed custom state from TODO to DONE
Sep 29 Added label: resolved
问题描述
mainline/master分支的 NPU Inductor 在纯 SIMT 编译模式下,会在 TTIR 生成和配置预编译两条路径中固定注入simt_stack_limit=8192。这会覆盖 Triton 编译器或后端对栈大小的默认管理。本问题由 v2.10.0 修复 PR https://gitcode.com/Ascend/pytorch/merge_requests/46494 同步发现。
影响范围
mainline/mastertorch_npu._inductorNPUCachingAutotuner._make_ttir_module_from_cfg、NPUCachingAutotuner._precompile_configSIMT_ONLY编译模式根因
torch_npu/_inductor/config.py定义了固定的simt_default_warp_stacksize = 256 * 32,两条编译路径在纯 SIMT 模式下无条件将其写入 Triton 编译选项。期望行为
torch_npu不再固定设置simt_stack_limit,由 Triton 编译器或后端使用其默认策略管理栈大小。修改与验证
python3 -m py_compile torch_npu/_inductor/config.py torch_npu/_inductor/runtime/triton_heuristics.py:通过。git diff --check mainline/master...HEAD:通过。495e5401e7d86ac029a774bf2a108054f2db9d5e。