rmch
3e0639707b
feat(inductor): add TE ComboKernel support
Co-authored-by: rmch<chenruimin2@huawei.com>
# message auto-generated for no-merge-commit merge:
!47085 merge te-combo-kernel into master
feat(inductor): add TE ComboKernel support
Created-by: rmch
Commit-by: rmch
Merged-by: ascend-robot
Description: ## 变更摘要
完成 TE 后端 ComboKernel 适配第 5-9 步,将满足约束的多个 Triton Experimental pointwise kernel 合并为一次 TEComboKernel 调用,减少 kernel launch 次数并保持不满足条件时的原有 fallback 行为。
### 主要改动
- 新增 `TEComboKernel` 和 `TEComboSubKernel` codegen,共享 `XBLOCK=256`,按成员 kernel 的 block 数和前缀和执行分组 dispatch。
- 增加 `te_combo_meta` 元数据和 launcher grid 处理,支持一次 launch 内按 combo slot 分发成员 kernel。
- 增加 TE 专用准入检查:当前阶段仅合并静态、连续、同 shape、同 dtype、pointwise-only 的 kernel;不满足条件时回退到普通 kernel。
- 修复 combo fallback 生命周期,保留独立 fallback kernel 仍需要的 buffer,待所有 combo source 生成和注册成功后再提交 `mark_run`、buffer removal 等状态更新。
- 为 combo 成员变量和共享 tile constexpr 名称增加 slot 后缀,避免多个成员之间发生命名冲突。
- 保持 ComboKernel 与现有 `foreach`/Triton Experimental 调度路径兼容,并补充配置开关。
## 测试
- ComboKernel 定向测试:`4 passed`
- TE Triton Experimental 完整测试目录:`39 passed`
- 变更 Python 文件 `py_compile` 通过
- `git diff --check` 通过
- Ascend 910B3 数值验证通过:1024、10001、0、1、255、256、257 元素场景;combo disabled 和混合 dtype fallback 场景均正确。
## 当前边界
- 当前 phase-one 仅覆盖静态 contiguous、同 shape、同 dtype 的 pointwise kernel。
- 动态 shape、不同 dtype/shape、非 pointwise 操作和不满足 ABI/资源约束的场景继续使用普通 kernel 或显式 fallback。
**关联 issue:**
Fixes https://gitcode.com/Ascend/pytorch/issues/5093
**RFC设计文档:**
https://gitcode.com/Ascend/pytorch/issues/5325
See merge request: Ascend/pytorch!47085
2026-10-10 15:45:27 +08:00
..
2026-06-22 16:47:27 +08:00
2026-10-09 10:56:11 +08:00
2025-12-10 15:08:06 +08:00
2026-10-10 15:45:27 +08:00
2026-09-30 18:22:36 +08:00
2026-09-23 11:17:05 +08:00
2026-09-16 16:23:31 +08:00
2026-10-10 09:28:27 +08:00
2026-10-10 11:07:11 +08:00
2026-09-30 15:36:53 +08:00
2026-09-11 17:41:22 +08:00
2026-05-21 16:41:18 +08:00
2026-07-03 11:21:09 +08:00
2026-10-10 11:07:11 +08:00
2026-03-19 14:54:41 +08:00
2026-06-27 10:29:18 +08:00
2026-09-26 21:50:32 +08:00
2026-08-03 11:04:16 +08:00
2026-10-08 11:45:34 +08:00
2026-09-24 20:23:09 +08:00
2025-09-02 11:01:15 +00:00
2025-08-25 08:52:25 +00:00