| feat: 新增AscIR适配
Co-authored-by: zqmin<zengqingmin2@huawei.com>
# message auto-generated for no-merge-commit merge:
!510 merge ascir_adapt into develop
feat: 新增AscIR适配
Created-by: zqmin
Commit-by: zqmin
Merged-by: cann-robot
Description:
# Pull Request
## 描述
本次 PR 适配 AscIR v35 special math 相关算子,补充 AscIR 注册、ATT/Codegen 实现、AscendC regbase API 注册、Python API、share graph 构图入口,以及 backend e2e codegen/runtime 用例。
新增 AscIR:
- ModifiedBesselI0
- ModifiedBesselI1
- ModifiedBesselK0
- ModifiedBesselK1
- LaguerrePolynomialL
- LegendrePolynomialP
- AiryAi
- Erfinv
增加类型支持:
- Remainder 新增 DT_INT32 支持
- FloorDiv 新增 DT_UINT16、DT_UINT32、DT_INT32、DT_INT64、DT_UINT64 支持
补充说明:
- Remainder 复用 BinaryApiTmpCall 生成 RemainderExtend 调用。
- Erfinv 按接口确认适配无 sharedTmpBuffer 重载,生成 Erfinv(dst, src, calCount)。
- Python API 函数名保持与既有 AscIR API 风格一致,使用 AscIR OpType 命名。
## 变更类型
请选择本次引入的变更类型:
<!-- [x] 表示选中 -->
- [ ] 🐛 Bug 修复
- [x] ✨ 新功能
- [ ] 💄 代码风格更新(格式化,局部变量)
- [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动)
- [ ] 📦 构建过程或辅助工具的变动
- [ ] 📝 文档内容更新
## 关联的Issue
Closes #79
Issue: https://gitcode.com/cann/graph-autofusion/issues/79
## 如何测试
1. source /mnt/workspace/gitCode/cann/venv/venv/bin/activate
2. source /mnt/workspace/data/ascend/cann/set_env.sh
3. cmake --build build_verify --target load_modified_bessel_i0_store_test_codegen_v2 load_modified_bessel_i1_store_test_codegen_v2 load_modified_bessel_k0_store_test_codegen_v2 load_modified_bessel_k1_store_test_codegen_v2 laguerre_polynomial_l_store_test_codegen_v2 legendre_polynomial_p_store_test_codegen_v2 load_airy_ai_store_test_codegen_v2 load_erfinv_store_test_codegen_v2 remainder_int32_store_test_codegen_v2 floor_div_int32_store_test_codegen_v2 -j 16
## 核对清单
<!-- [x] 表示选中 -->
- [x] 我的代码遵循了项目的代码风格
- [x] 我已对代码进行了自测
- [ ] 我已更新了相关的文档
- [x] 我在标题中使用了合适的类型标签(如:feat:, fix:)
- [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等
## 其他信息
当前本地 TmSim 环境对部分 special math/Reg 指令支持不完整,Erfinv、ModifiedBessel、Log2 等 backend runtime e2e 可能出现 unknown instr;本 PR 已覆盖并通过相关 codegen 目标构建验证。
See merge request: cann/graph-autofusion!510 | 1 天前 |