已开启
支持纯 Torch DSL 算子构建 custom 和 builtin 包 #7
zyh_gitcode创建于 3 天前
支持纯 Torch DSL 算子构建 custom 和 builtin 包 #7
已开启
zyh_gitcode创建于 3 天前
zyh_gitcode
zyh_gitcode成员
3 天前

描述

支持纯 Torch DSL 算子独立生成 custom 和 builtin RUN 包。用从 PR #15301 提取的 Add 验证,该算子提供 Torch 和 DSL Native 入口,无需 ACLNN 实现。

  • custom 的 cust_proto 在 infer-shape 对象目标存在时才链接该目标。
  • builtin 从实际存在的对象目标组装 opapi_transformer,并在库目标存在时安装它。已有 ASC ACLNN 和显式 DSL ACLNN 对象仍是 OpAPI 的有效输入。
  • DSL Native Host 归档仍链接进现有 Host 库,Device 对象与 OPP 索引随 RUN 交付。

测试

在 Ascend 950 上分别为纯 DSL Add、已有 ASC StemIndexer 和两者同包构建 custom 与 builtin。六组 RUN 均生成并解包检查。ASC 场景保留 StemIndexer 内核及 aclnnStemIndexer 导出。纯 DSL builtin 跳过没有输入的 OpAPI 库。

四个包含 Add 的包均用独立 Torch wheel 执行 Meta 和 NPU 检查。强制使用包内 Native 二进制,每组均记录一次 installed_hit,128 个 FP32 输出与 torch.add 完全一致。选算子时的 builtin Torch wheel 仍单独交付。

类型标签

likedislike
合并受阻
zyh_gitcodezyh_gitcode成员
3 天前 推送  1 个提交:9255f813-fix(build): allow Native DSL operators without ACLNN targets
zyh_gitcodezyh_gitcode成员
3 天前 修改标题为 “支持纯 Torch DSL 算子构建 custom 和 builtin 包”,原标题为“验证纯 Torch DSL Add 的 custom 和 builtin 构建”
zyh_gitcodezyh_gitcode成员
3 天前 修改了pull request 的描述