已合并
[fix]tiling_key_error #32336
cuiduo创建于 3月25日
[fix]tiling_key_error #32336
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 cuiduo 的贡献)AtlasAccount
3月25日 评论:
3月25日 评论:
ascend-robot
3月25日 评论:
3月25日 评论:
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 | ✅ zichun_ye, adrian07110 (2/2) | ✅ zichun_ye, adrian07110 (2/1) |
| torch_npu/_inductor | ✅ zichun_ye, adrian07110 (2/2) | ✅ zichun_ye, adrian07110 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
cuiduo, thanks for your pull request. All authors of the commits have signed the CLA. 👍


3月25日 添加了label:ascend-cla/yes
3月25日 update merge request[project id: 7404318, iid: 32336, commit_id: f7935b35b09aa90b70d39464c5713e78e2bdf640] virtual merging success
3月25日 update merge request[project id: 7404318, iid: 32336, commit_id: f7935b35b09aa90b70d39464c5713e78e2bdf640] virtual merging success
此处折叠了61条消息 查看更多
torch_npu/_inductor/codegen/triton.py
@@ -786,6 +786,21 @@ class NPUIndexTritonKernel(TritonKernel):
786786 dtype = None
787787 if axis is None:
788788 return None
789+
790+ def _lookup_dim(sym) -> Optional["IterationRangesEntryNPUIndex"]:
791+ dim = self.range_tree_nodes.get(sym)
792+ if dim is not None:
793+ return dim
794+ return self.range_tree_nodes_removed.get(sym)
795+
796+ def _iter_candidate_syms(key):
797+ # indexing_map keys can be sympy.Symbol (common) or sympy.Expr (e.g. linearized indexing)
798+ # Try direct lookup first, then fall back to free_symbols for Expr.
799+ yield key
800+ if isinstance(key, sympy.Expr) and not isinstance(key, sympy.Symbol):
801+ for s in key.free_symbols:
802+ yield s
803+
789804 for node in self.node_schedule:
790805 if node in (EnableReduction, DisableReduction):
791806 continue
@@ -800,10 +815,13 @@ class NPUIndexTritonKernel(TritonKernel):
800815 if node in (EnableReduction, DisableReduction):
801816 continue
802817 for key, _ in node._body.indexing_map.items():
803- if key in self.range_tree_nodes:
可将if dim is None修改为else,不用预定义dim=None


ZhihaoLi
3月30日 评论:
3月30日 评论:
/approve


3月30日 添加了label:lgtm
ascend-robot
3月30日 评论:
3月30日 评论:
Review Guide
This pull-request passes review.
Committers who wrote a comment of /approve are: zichun_ye, adrian07110.
Reviewers who wrote a comment of /lgtm are: zichun_ye, adrian07110.


3月30日 合入了pull request
【合入来源】
【修改方案】
【资料变更】
【接口变更】
【功能验证】
【CheckList】