Merged
Add engram_gate_bwd/fwd torch.compile support and torch.compile skill. #49
hanxu88Add on 16 days ago
Add engram_gate_bwd/fwd torch.compile support and torch.compile skill. #49
Merged
hanxu88Add on 16 days ago
hanxu88
hanxu88
16 days ago

当前PR是否有AI参与:

[x] 否

[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :

PR功能描述 / 为什么需要这个合入**:

以 engram_gate_fwd 和 engram_gate_bwd 为例,增加 torch.compile 支持,通过 npugraph_ex 实现固定形状的 ACL Graph 图接入;

另外,修改:

  1. 拆分真实执行与元信息校验,注册 custom_op 和 fake 实现,避免追踪阶段执行环境检查或编译内核;
  2. 适配前向可选统计量返回,以及反向依赖硬件核数的权重梯度分片形状推导;
  3. 同时支持 eager 和 compile 调用与测试,覆盖统计量开关、空输入、原存储更新和新输入替换,并统一前后向图执行的 inference_mode 上下文。

此外,增加 ops-tilelang-graph-mode skill,指导 agent 为本仓库其它算子实现 torch.compile / ACL Graph 入图改造。

该PR关联的issue

无。

希望检视人员了解:

改动类型 / Change Type

测试信息 / Testing

检查清单 / Checklist

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for hanxu88's contribution.)
hanxu88hanxu88
16 days ago Created pull request, commit 33ff41cb
CANN-robot
CANN-robotCollaborators
16 days ago Comments:

Hi @hanxu88, welcome to submitting your first PR to CANN!

PR Merge Steps

1. CLA Signing

If the current PR label includes cann-cla/yes, it means you have signed the CLA and can proceed to the next step. If the label includes cann-cla/no, please sign the CLA first. If you have any questions, please refer to the FAQ.

2. CI Check

Please comment /compile to trigger the CI pipeline check. If the CI run is successful, the PR will be tagged with ci-pipeline-passed and you can proceed to the next step. If the CI run fails, the PR will be tagged with ci-pipeline-failed, please check the CI logs to fix the issues in the PR. If you have any questions, please refer to the FAQ.

3. Code Review

After CI passes, please refer to the PR Approval Progress and proactively @ the committers in the table to review the code. After approval, committers will comment /lgtm and /approve. Once the lgtm and approved labels are successfully added, the PR will be merged automatically.

likedislike
CANN-robotCANN-robotCollaborators
16 days ago Added label: stat/needs-squash
CANN-robotCANN-robotCollaborators
16 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
16 days ago Comments:

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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

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

Module Approval Details

module lgtm status approve status
repo-cann/ops-tilelang ✅ kevin365, ChaoyangJi (2/2) ✅ kevin365 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
158 messages are collapsed here。 See more
wangkaiCollaborators
10 days ago Comments:

/approve
/lgtm

likedislike
CANN-robotCANN-robotCollaborators
10 days ago Added label: lgtmapproved
CANN-robot
CANN-robotCollaborators
10 days ago Comments:

The MR can not be merged, because of CodeReview discussion not resolved

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
ChaoyangJiChaoyangJiCollaborators
10 days ago Resolved final issue
CANN-robotCANN-robotCollaborators
10 days ago Merged pull request