已合并
[feat]Inductor Autotuning Optimization for Triton Ascend Compilation #37655
[feat]Inductor Autotuning Optimization for Triton Ascend Compilation #37655
已合并
yanf81创建于 6月5日
yanf81
6月5日

The following PR includes optimizations and enhancements for Inductor's autotuning mechanism. The goal is to reduce the autotuning time by 50%, without degrading kernels latency.
The enhancements in this project are delivered for the FASTAUTOTUNE=1 / ‘Expert’ mode, where the baseline version is v2.7.1.
Final performance verifications were done on Ascend910_957 (90.90.93.32 station) with triton_ascend=3.2.2; torch_npu=2.7.1.post4.dev20260509; cann-9.1.0.

Main features added:

1. Configs Static Pruning: Prune a significant part of the original configs based on technics of UB-aware Filter, MFU Cache, NPU-Aware Config Generation and Diversity Filter
2. Dynamic Filter: Adaptive tiling config selection driven by predictive models.
3. Profiling Enhancement: Use the most optimal profiling method to speed up stats collection time without compromising quality
4. Logging and Stats collection for performance analisys and benchmarking.

Environment params to be set by a user to enable the feature:

1. FASTA_CONFIG_OPTIMIZER=1 (enables static pruning mechanism - default=0)
2. FASTA_DYNAMIC_FILTER=1 (activate the dynamic filter algo - default=0)
3. FASTA_MSPTI_EN=1 (defines mspti as an optimal profiling method - default=0)

Additional feature params

Statistics gathering

1. FASTA_AUTOTUNE_STATS=1 (activate autotune stats gathering - default=0)

Dynamic Filter algo

2. FASTA_R1_PCT (activate autotune stats gathering - default=0.3)
3. FASTA_BASE_BUDGET (Base measurement budget as a fraction of total configs (N) - default=0.35)
4. FASTA_HIGH_BUDGET (Controls the total R2 exploration budget - default=0.4)
5. FASTA_LOW_BUDGET (Trade-off between exploration and measurement cost - default=0.25)
6. FASTA_MAX_ROUNDS (Maximum number of optimization rounds - default=2)

【合入来源】

如有社区issue,请关联issue链接
请勿携带内部流程信息(需求链接、问题单、内部issue等)

【修改方案】

请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列
如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容)

【资料变更】

请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及”

【接口变更】

请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及”

【功能验证】

说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤
新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图

【CheckList】

PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 yanf81 的贡献)
Yyanf81
6月5日 创建了 pull request,commit fd82a739
ascend-robotascend-robot成员
6月5日 添加了label:stat/needs-squash
ascend-robotascend-robot成员
6月5日 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
6月5日 评论:

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 crazyDannyBoy, TonyYA (2/2) crazyDannyBoy (1/1)
torch_npu/_inductor crazyDannyBoy, TonyYA (2/2) crazyDannyBoy (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
此处折叠了608条消息 查看更多
ascend-robot
ascend-robot成员
7月15日 评论:
流水线 PR-pipeline_pytorch#45774 [ commitID:6e217858 ] 已完成
>>>代码风格自动修复执行成功(无修复内容)
阶段 任务名 状态 详情
编译构建 Build_X86 >>>
Build_ARM >>>
Build_LibTorch_x86 >>>
Build_LibTorch_ARM >>>
Build_X86_torchair 🛑 >>>
Build_ARM_torchair 🛑 >>>
patch_test 🛑 >>>
恶意代码检查 Antipoison >>>
编码安全与规范检查 CodeCheck >>>
check_error >>>
CodeCheck_lintrunner >>>
开源片段检查 SCA >>>
开发者测试 UT_X86_Part_01 >>>
UT_X86_Part_02 >>>
UT_ARM_A3_Part_01 >>>
UT_ARM_A3_Part_02 >>>
UT_ARM_A2_Part_01 >>>
UT_ARM_A2_Part_02 >>>
UT_ARM_A2_Part_03 >>>
UT_inductor_Part_01 >>>
UT_inductor_Part_02 >>>
UT_inductor_Part_03 >>>
UT_inductor_Part_04 >>>
UT_DIST_ARM_Part_01 🛑 >>>
UT_DIST_ARM_Part_02 🛑 >>>
UT_DIST_ARM_Part_03 🛑 >>>
UT_DIST_ARM_Part_04 🛑 >>>
UT_ARM_A2_Select_Part_01 >>>
UT_ARM_A2_Select_Part_02 >>>
流水线 PR-pipeline_pytorch >>>
此流水线已支持下列评论快捷指令,仅PR创建者和白名单成员[wujinyuan1, huangjingwei, liangsongwei, yashi999, culechan, Dring, wuyouqi1, L1919_snow, qq_52711437, WhiteNight12, nomiz, xiu_21, ffmh, wanglijun55, hss-shuai, husichao, smallsilly, lanshaozuishuai, jimmyisme1, lzy0920232, alpha-junh, Sunshine_Youngster, wei_zhuoyi, zhangyihuiben, zyw-hw, zzzkeke, rmch, yangch0324, LucciC, AACAES, renyujin, wjlflyer, senzhen-town, pengjingyou, qsc97, limuan, yule100, xiaoqi-zhou, kuhn7, chenxingying, hanye02, zichun_ye, anyrenwei, kkjocker, wangzili121, Lu_G, yvjc, puddingfjz, HandsoemLemon, bigprestigee1, huawuyi, zhenyu10, dairenjie, du-jin-hang, zou-jieyu, adelaideliu, TrHan, wanlinan, Windwindzzz, pengqihw, kisnwang, yuheng_wang, honghao_wang, jizewei, zhangguoguang, sunyu-xuan, chenrayray, hbhu_bin, liujunzhu, c_34, LiNuoh, maoyuanpeng1, zzhongmin, zhaoyu65, bellatan, jiabaolin, zhuofanshen, wencaiwen, lu_zhuge, caoshuyang, molly12, lyx324521, LQ1206, gitcode-chenjiao, cai-weiwei1989, CHDong, ogqin, yuanlipingGit, xuqinglin1, lqz2, zouwei1, chaoluoa, paradox325, jackzhang1116, yaoyao, akh, yujiacheng, dengjie0116, Hubert11111, Shine_Ws, wslhj555, longqiand, OYtao666, JiaqingQiang, luyyyy, Kingbelial, zhanghaiyu0101, wenxp1018, yanliu-luoluo, ksun_sekiro, liyong328, wgzheng, tangky, vivi_is_coding, aoiaoisola, weixin_44494597, wangmengmengwang65667, hid57809721, qq_35468730, comeonup, C547032, gcw_m5OQChA4, yao_yao_ling_xian, cnnbwcy, szqfes_12, cora_19, cann_lilin, can, shawnylee233, fanglanyue0916, hhz0, LiNuohang, taohuoquan]评论有效
  • compile、compile_inductor、compile_torchair : 运行流水线
  • retry : 重试流水线所有失败子任务
  • retry <任务名> : 仅重试指定失败子任务
  • stop : 停止流水线
likedislike
ascend-robotascend-robot成员
7月15日 关闭了关联的issue
ascend-robotascend-robot成员
7月15日 合入了pull request
ascend-robot
ascend-robot成员
7月15日 评论:

Pull Request 已合并或已关闭。

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

likedislike
ascend-robot
ascend-robot成员
7月15日 评论:
流水线 pytorch_gitcode_PR_multiVersion#12653 [ commitID:6e217858 ] 已完成
likedislike