Open
feat(opdev): add compiler-neutral external op task SPI #1
su-yuemingAdd on Aug 30
feat(opdev): add compiler-neutral external op task SPI #1
Open
Merged fromcodex/aclnn-package-devintomaster
Merge blocked
Sep 1 Force-pushed 14 commits:c924162b-batch一致性tilingkey修改,6e322523-feat: 非连续广播模板多核反推优化及shape[1]广播/合轴精度修复,de807b02-feat: broadcast 5维以上特殊场景路由至UB BRC模板,c362be6c-aclnn自动框架支持pcie_through算子,f8354519-feat: add provider ACLNN launcher,a7f44c3e-feat: bind provider registries to ACLNN frames,c9fa37c3-feat: expose provider workspace tensors,59a90499-fix: align provider registry workspace ABI,90b77a7c-feat: expose provider runtime ABI marker,f3508887-feat(opdev): add compiler-neutral compiled artifact ABI,45402823-feat(opdev): add compiler-neutral external task SPI,c0e62c8f-refactor(opdev): trim entry-specific launcher macro,3bb9dd52-refactor(opdev): keep external task SPI additive per review,3ee20063-fix(opdev): address external task SPI review findings
Sep 1 Force-pushed 14 commits:c924162b-batch一致性tilingkey修改,6e322523-feat: 非连续广播模板多核反推优化及shape[1]广播/合轴精度修复,de807b02-feat: broadcast 5维以上特殊场景路由至UB BRC模板,c362be6c-aclnn自动框架支持pcie_through算子,f8354519-feat: add provider ACLNN launcher,a7f44c3e-feat: bind provider registries to ACLNN frames,c9fa37c3-feat: expose provider workspace tensors,59a90499-fix: align provider registry workspace ABI,90b77a7c-feat: expose provider runtime ABI marker,f3508887-feat(opdev): add compiler-neutral compiled artifact ABI,45402823-feat(opdev): add compiler-neutral external task SPI,c0e62c8f-refactor(opdev): trim entry-specific launcher macro,3bb9dd52-refactor(opdev): keep external task SPI additive per review,3ee20063-fix(opdev): address external task SPI review findings
Sep 1 Pushed 1 commits:741f38f0-docs(opdev): document each external task SPI interface
Sep 1 Pushed 1 commits:a8c83e58-feat(opdev): rework external task SPI before V1 release
Sep 1 Pushed 1 commits:66f5e117-feat(opdev): attribute external task profiling by engine kind
Sep 1 Pushed 1 commits:66f5e117-feat(opdev): attribute external task profiling by engine kind
Sep 1 Pushed 1 commits:71b88e2b-docs(opdev): add architecture and call flow diagrams
docs/zh/api/nnopbase/opdev/external_op_task_integration_architecture.md
Outdated
@@ -0,0 +120,4 @@
120+using ExternalOpPrepareFn = aclnnStatus (*)(
121+ const void* taskConfig,
122+ const OpArgContext* args,
123+ ExternalOpWorkspaceRequest* workspaceRequest,
给一个大小就可以


Sep 2 Pushed 1 commits:8dc1cc00-feat: support single external op workspace arena
Sep 2 Pushed 1 commits:9463695d-remove external task launcher macro
Sep 3 Pushed 1 commits:e8ae7df2-docs: define external op dfx and cache behavior
Sep 3 Pushed 1 commits:03b9bf06-docs: add standard design diagrams for external op task integration
Sep 3 Pushed 1 commits:03b9bf06-docs: add standard design diagrams for external op task integration
Sep 8 Pushed 1 commits:43131683-docs: design external op DFX capability extensions
Sep 17 Pushed 1 commits:97958c08-feat: restore multi-workspace request for external op tasks
Sep 17 Pushed 1 commits:97958c08-feat: restore multi-workspace request for external op tasks
Sep 17 Pushed 1 commits:bc553f64-Revert "fix: reject destroy of executors torn down inside run"
Sep 17 Pushed 1 commits:bc553f64-Revert "fix: reject destroy of executors torn down inside run"
Sep 17 Pushed 1 commits:0ab06b6c-feat: add external op task profiling correlation
Sep 17 Pushed 1 commits:cb220a4d-refactor: keep external task launch independent of device DFX
Sep 17 Pushed 1 commits:cb220a4d-refactor: keep external task launch independent of device DFX
Sep 17 Pushed 1 commits:2f03fba9-fix: validate external sample profiling by framework summary
Sep 17 Pushed 1 commits:2f03fba9-fix: validate external sample profiling by framework summary
Sep 17 Force-pushed 73 commits:995fd2e8-feat(platform): platform_util.h新增NpuArch系列constexpr常量定义,740c5c88-fix: reduceSum非连续精度问题修改,62cb6002-增加对opType是否越界的校验,4e1eebe1-修复BlockStore数组索引越界的问题,8e2843e5-修复PCIe需求开发引入的SC静态检查,55c02472-新增MaxPoolV3GradFusionPass融合pass配置,161b1af2-fix: widen static json runInfo exception catch,e13eb805-优化PCIe through特性相关的日志,e8fa42cb-feat(arch): 新增ArchConfigHelper支持按NpuArch批量注册aicore config,f09beaf7-fix: 303 LastTranspose 路由增加并行度门限,ff1f77ae-[bugfix] 修复opbase的log问题,0a83b915-refactor(arch): 将NpuArch常量定义迁移至新增op_const_def.h头文件,dba0bc2f-fix(build): 替换已下线头文件graph/ge_error_codes.h为graph/error_codes.h,b4cc397d-fix: rm the sync constexpr,1b9418b4-1. 修改SetTensorAddr相关接口的pcie地址刷新约束;2.资料增加pcie地址刷新约束说明,b9fe5d29-fix(op_graph): 修复CANN_OPS_OPB_SYN_EXEC_ACLNN宏中int(-1)赋值给uint32_t的符号转换问题,ceadd30d-data_type_utils.h: CheckType/ToString 扩展支持 std::vector 与 std::array 重载,f52badfa-feat: broadcast tiling 模板支持 PcieThrough 场景识别与 UB BRC 强制调度,245f557d-[20260905] Clean code,53e13a45-refactor(fusion_config): 融合规则MaxPoolV3GradFusionPass重命名为MaxPoolGradFusionPass,3410a305-ops-base安装权限统一,e7de4bff-fix opbase action,0c55600f-test: remove StaticKernelFindFallbacksToStrideWithoutPcie,34922519-clean code 2026.9.8:1. 编译告警整改;2. 日志整改,0d60012d-日志问题整改:1. 首字母大写;2. 语法问题修改,7f086b3c-MC2 KFC场景下将aicpu从流设置为不阻塞,适配LAUNCH BLOCKING场景,10d77be7-修改shape打印两个中括号的的问题,3ae4cdba-Revert: 撤销MC2 KFC从流不阻塞特性迭代,36bb10c0-aclnn框架缓存场景日志维测能力增强,3e090c89-feat: 新增ops_deliverables.json交付件配置并安装到opp/conf,70cb955a-fix: Reduce非连续搬出地址计算修改,3ab2fd85-fix: 1.越界问题;2.Clean Code;3. memset二级指针场景不展开,19441568-[master] docs: 更新算子库架构图及CANNLab指导链接,37f0841d-refactor(package): 排除7个aicpu公共头在pkg_inc/aicpu_common下的重复安装,227cf872-refactor(package): 排除7个aicpu公共头在pkg_inc/aicpu_common下的重复安装,4017a6de-算子信息落盘黑名单仅在910B/910_93生效,950及以后芯片放开黑名单,893ec692-MC2 KFC场景下将aicpu从流设置为不阻塞,适配LAUNCH BLOCKING场景,1cc94d9d-fix(package): 排除7个aicpu公共头在pkg_inc/aicpu_common下的重复安装,bf729989-fix: load individual op packages through gert,e4b3e1ec-fix: 算子编译信息落盘黑名单按芯片区分,eae0fb45-fix: 算子信息落盘黑名单增加FusedInferAttentionScore,e7e69838-feat: ops_deliverables.json补充插件类交付件并将opimpl改名opsrc,d908e2b1-fix:浮点类NaN数据转bool返回true,233ee24c-Modify threshold value for op Precision Standard,3b724b16-action上线适配:checkout改allow-unsafe-pr-checkout,revise-img改comment+TESTTOKEN,4e481d1b-feat: add provider ACLNN launcher,3bed8a59-feat: bind provider registries to ACLNN frames,43115471-feat: expose provider workspace tensors,f6e9d591-fix: align provider registry workspace ABI,f8c89714-feat: expose provider runtime ABI marker,91e2e479-feat(opdev): add compiler-neutral compiled artifact ABI,72b39787-feat(opdev): add compiler-neutral external task SPI,67609755-refactor(opdev): trim entry-specific launcher macro,3164266d-refactor(opdev): keep external task SPI additive per review,345bd209-fix(opdev): address external task SPI review findings,21c1afc7-docs(opdev): document each external task SPI interface,e6bf3788-feat(opdev): rework external task SPI before V1 release,eb63effe-feat(opdev): attribute external task profiling by engine kind,ca312bb0-docs(opdev): add architecture and call flow diagrams,260c98ae-feat: support single external op workspace arena,d5bc06b5-remove external task launcher macro,5c864336-docs: define external op dfx and cache behavior,4bd9ea0e-docs: add standard design diagrams for external op task integration,0225cdc8-docs: design external op DFX capability extensions,1f97616d-docs: simplify external op DFX to producer-owned correlation,ddbec042-fix: reject destroy of executors torn down inside run,b24b08a6-feat: add explicit external op cache policy,1ce9e0a1-docs: clarify OpArgContext requirement and drop unused include,5738f711-feat: restore multi-workspace request for external op tasks,6088b4ae-Revert "fix: reject destroy of executors torn down inside run",cbb5bc0c-feat: add external op task profiling correlation,86434276-refactor: keep external task launch independent of device DFX,86c66fc1-fix: validate external sample profiling by framework summary
Sep 17 Force-pushed 73 commits:995fd2e8-feat(platform): platform_util.h新增NpuArch系列constexpr常量定义,740c5c88-fix: reduceSum非连续精度问题修改,62cb6002-增加对opType是否越界的校验,4e1eebe1-修复BlockStore数组索引越界的问题,8e2843e5-修复PCIe需求开发引入的SC静态检查,55c02472-新增MaxPoolV3GradFusionPass融合pass配置,161b1af2-fix: widen static json runInfo exception catch,e13eb805-优化PCIe through特性相关的日志,e8fa42cb-feat(arch): 新增ArchConfigHelper支持按NpuArch批量注册aicore config,f09beaf7-fix: 303 LastTranspose 路由增加并行度门限,ff1f77ae-[bugfix] 修复opbase的log问题,0a83b915-refactor(arch): 将NpuArch常量定义迁移至新增op_const_def.h头文件,dba0bc2f-fix(build): 替换已下线头文件graph/ge_error_codes.h为graph/error_codes.h,b4cc397d-fix: rm the sync constexpr,1b9418b4-1. 修改SetTensorAddr相关接口的pcie地址刷新约束;2.资料增加pcie地址刷新约束说明,b9fe5d29-fix(op_graph): 修复CANN_OPS_OPB_SYN_EXEC_ACLNN宏中int(-1)赋值给uint32_t的符号转换问题,ceadd30d-data_type_utils.h: CheckType/ToString 扩展支持 std::vector 与 std::array 重载,f52badfa-feat: broadcast tiling 模板支持 PcieThrough 场景识别与 UB BRC 强制调度,245f557d-[20260905] Clean code,53e13a45-refactor(fusion_config): 融合规则MaxPoolV3GradFusionPass重命名为MaxPoolGradFusionPass,3410a305-ops-base安装权限统一,e7de4bff-fix opbase action,0c55600f-test: remove StaticKernelFindFallbacksToStrideWithoutPcie,34922519-clean code 2026.9.8:1. 编译告警整改;2. 日志整改,0d60012d-日志问题整改:1. 首字母大写;2. 语法问题修改,7f086b3c-MC2 KFC场景下将aicpu从流设置为不阻塞,适配LAUNCH BLOCKING场景,10d77be7-修改shape打印两个中括号的的问题,3ae4cdba-Revert: 撤销MC2 KFC从流不阻塞特性迭代,36bb10c0-aclnn框架缓存场景日志维测能力增强,3e090c89-feat: 新增ops_deliverables.json交付件配置并安装到opp/conf,70cb955a-fix: Reduce非连续搬出地址计算修改,3ab2fd85-fix: 1.越界问题;2.Clean Code;3. memset二级指针场景不展开,19441568-[master] docs: 更新算子库架构图及CANNLab指导链接,37f0841d-refactor(package): 排除7个aicpu公共头在pkg_inc/aicpu_common下的重复安装,227cf872-refactor(package): 排除7个aicpu公共头在pkg_inc/aicpu_common下的重复安装,4017a6de-算子信息落盘黑名单仅在910B/910_93生效,950及以后芯片放开黑名单,893ec692-MC2 KFC场景下将aicpu从流设置为不阻塞,适配LAUNCH BLOCKING场景,1cc94d9d-fix(package): 排除7个aicpu公共头在pkg_inc/aicpu_common下的重复安装,bf729989-fix: load individual op packages through gert,e4b3e1ec-fix: 算子编译信息落盘黑名单按芯片区分,eae0fb45-fix: 算子信息落盘黑名单增加FusedInferAttentionScore,e7e69838-feat: ops_deliverables.json补充插件类交付件并将opimpl改名opsrc,d908e2b1-fix:浮点类NaN数据转bool返回true,233ee24c-Modify threshold value for op Precision Standard,3b724b16-action上线适配:checkout改allow-unsafe-pr-checkout,revise-img改comment+TESTTOKEN,4e481d1b-feat: add provider ACLNN launcher,3bed8a59-feat: bind provider registries to ACLNN frames,43115471-feat: expose provider workspace tensors,f6e9d591-fix: align provider registry workspace ABI,f8c89714-feat: expose provider runtime ABI marker,91e2e479-feat(opdev): add compiler-neutral compiled artifact ABI,72b39787-feat(opdev): add compiler-neutral external task SPI,67609755-refactor(opdev): trim entry-specific launcher macro,3164266d-refactor(opdev): keep external task SPI additive per review,345bd209-fix(opdev): address external task SPI review findings,21c1afc7-docs(opdev): document each external task SPI interface,e6bf3788-feat(opdev): rework external task SPI before V1 release,eb63effe-feat(opdev): attribute external task profiling by engine kind,ca312bb0-docs(opdev): add architecture and call flow diagrams,260c98ae-feat: support single external op workspace arena,d5bc06b5-remove external task launcher macro,5c864336-docs: define external op dfx and cache behavior,4bd9ea0e-docs: add standard design diagrams for external op task integration,0225cdc8-docs: design external op DFX capability extensions,1f97616d-docs: simplify external op DFX to producer-owned correlation,ddbec042-fix: reject destroy of executors torn down inside run,b24b08a6-feat: add explicit external op cache policy,1ce9e0a1-docs: clarify OpArgContext requirement and drop unused include,5738f711-feat: restore multi-workspace request for external op tasks,6088b4ae-Revert "fix: reject destroy of executors torn down inside run",cbb5bc0c-feat: add external op task profiling correlation,86434276-refactor: keep external task launch independent of device DFX,86c66fc1-fix: validate external sample profiling by framework summary
概述
为 opbase 新增编译器中立的 External Op Task SPI,提供
AddExternalOpTask/ADD_TO_LAUNCHER_LIST_EXTERNAL_OP适配入口,允许外部生产者在 ACLNN phase 1 挂载已选中的 task,phase 2 通过回调完成 launch。改动说明(纯新增,既有 AI Core / AI CPU 路径零改动)
include/nnopbase/opdev/external_op_task.h:对外 ABI(ExternalOpTask描述符 + prepare/launch/destroy 回调),含 structSize/abiVersion/reserved 严格校验;文档明确函数指针所属模块须在 executor 生命周期内保持加载external_op_task.cpp:参数校验与框架构图器行为对齐(null 输入视为缺省可选输入;输出与 workspace 必须非空,workspace 须经 executor 分配);ExternalOpKernelLauncher恒 DisableRepeat,不进入 cache 路径launcher_registration.h/.cpp:新增通用注册辅助(当前仅 external 路径使用),完成构图与 executor 注册,失败路径统一释放 launcher/argsmake_op_executor.h:新增ADD_TO_LAUNCHER_LIST_EXTERNAL_OP宏;op_arg_def.h:新增 constGetOpArg重载(对存量调用点决议无影响)test_external_op_task.cpp覆盖正常 launch、畸形 task 拒绝、prepare/launch 失败状态销毁、workspace 校验、null optional 输入等场景🤖 Generated with Claude Code