Closed
[Requirement] Keep host constant folding independent of the AICPU device switch #5438
wby50065566Add on Sep 18Closed at 1 day ago
wby50065566
Sep 18 Comments:
Sep 18 Comments:
/assign


Sep 18 Assign hid29204727 as responsible person
周云飞
Oct 14 Comments:
Oct 14 Comments:
你好,后续PR合入是否有计划


周云飞
1 day ago Comments:
1 day ago Comments:
感谢反馈!Host 常量折叠构建与设备侧 ENABLE_AICPU 开关的解耦已通过 !14376 实现并合入主线,两套 Host 构建入口均已调整。本仓相关需求已完成,现关闭本 Issue;后续如有问题欢迎继续反馈


1 day ago changed custom state from 进行中 to 已完成
1 day ago Close issue
周云飞
1 day ago Comments:
1 day ago Comments:
PR #14376 已合入,补充了 Host 常量折叠的注册和构建基础设施:
- 新增 AICPU 注册包装宏,Host 构建优先使用 V2 注册,不可用时回退 V1;其他构建沿用 V1。
- 两套 CMake 入口均支持
HOSTCPU参数,在满足 built-in 构建条件时创建 Host AICPU OBJECT,不受设备侧ENABLE_AICPU开关控制。 - 本次未为具体算子开启 Host 常量折叠,
AttentionWorkerScheduler和FfnWorkerScheduler保持原有注册方式。
关联 PR:PR #14376


Backgroud(背景信息)
Host-side constant folding reuses AICPU kernel sources, but it is a built-in host capability. Gating host constant-folding OBJECT creation with
ENABLE_AICPUcouples it to the device-side AICPU build switch and can prevent the host constant-folding library from being generated as designed.Origin(信息来源)
PR #10680: https://gitcode.com/cann/ops-transformer/pull/10680
Benefit / Necessity(价值/作用)
HOSTCPU TRUEintegration path for future migrated operators.Design(设计方案)
Remove
ENABLE_AICPUfrom the two host constant-folding CMake gates inadd_modules_sourcesandadd_modules_sources_with_soc. Keep all existing device/custom AICPU conditions unchanged.