Open
feat(changwei): 完善 ACLNN 通路校验并新增 ApplyCamePart3 交付件 #4
陈思Add on Aug 20
feat(changwei): 完善 ACLNN 通路校验并新增 ApplyCamePart3 交付件 #4
Open
Total: 32 files changed+1341-98
| @@ -28,11 +28,11 @@ | |||
| 28 | | 步 | GATE(动手前必确认) | 做什么 | 指导 | | 28 | | 步 | GATE(动手前必确认) | 做什么 | 指导 | |
| 29 | |---|---|---|---| | 29 | |---|---|---|---| |
| 30 | | **0 环境** | GPU 连接就绪? | 激活 CANN(A 本地 NPU)+ B 竞品 GPU 就绪自检 | `pipeline/step0-env.md` | | 30 | | **0 环境** | GPU 连接就绪? | 激活 CANN(A 本地 NPU)+ B 竞品 GPU 就绪自检 | `pipeline/step0-env.md` | |
| 31 | -| **1 需求** | A2 支持面核实? A5 相对 A2 有无差异?(有→step3 必 soc 隔离) | 01(六节)+03 spec | `pipeline/step1-requirement.md` | | 31 | +| **1 需求** | A2 支持面核实? ACLNN 已逐仓判手写/自动生成/无接口并查 CANN 包? | 01(六节)+03 spec | `pipeline/step1-requirement.md` | |
| 32 | | **2 设计** | 范式选型?(查参照算子地图) | 算法→arch35/tiling → 02 | `pipeline/step2-design.md` | | 32 | | **2 设计** | 范式选型?(查参照算子地图) | 算法→arch35/tiling → 02 | `pipeline/step2-design.md` | |
| 33 | | **3 开发** | R2 不碰 A2 / R6 校验用宏 / regbase 必 __VEC_SCOPE__ | kernel/tiling/host+通路+检视 | `pipeline/step3-develop.md` | | 33 | | **3 开发** | R2 不碰 A2 / R6 校验用宏 / regbase 必 __VEC_SCOPE__ | kernel/tiling/host+通路+检视 | `pipeline/step3-develop.md` | |
| 34 | | **4 出包** | freshness | `build.sh --pkg`→装 vendor | `pipeline/step4-build-deploy.md` | | 34 | | **4 出包** | freshness | `build.sh --pkg`→装 vendor | `pipeline/step4-build-deploy.md` | |
| 35 | -| **5 验证** | R7 **通路先于泛化**; 每腿守 freshness | 通路→泛化→精度三方→性能→DFX | `pipeline/step5-verify.md` | | 35 | +| **5 验证** | R7 **通路先于泛化**; 每个验证项守 freshness | 通路→泛化→精度三方→性能→DFX | `pipeline/step5-verify.md` | |
| 36 | | **6 交付件** | 7 项齐? | 01-07 逐条产出 | `pipeline/step6-deliverables.md` | | 36 | | **6 交付件** | 7 项齐? | 01-07 逐条产出 | `pipeline/step6-deliverables.md` | |
| 37 | | **7 终检** | **先跑机器守卫脚本(失败即停)** + 人工 gate | 放行 | `pipeline/step7-final-check.md` | | 37 | | **7 终检** | **先跑机器守卫脚本(失败即停)** + 人工 gate | 放行 | `pipeline/step7-final-check.md` | |
| 38 | 38 | ||
| @@ -72,6 +72,9 @@ changwei-op-dev/ | |||
| 72 | ├── check_a2_untouched.sh # 🆕 守卫 R2:A2 flat 内核 vs HEAD 无污染 | 72 | ├── check_a2_untouched.sh # 🆕 守卫 R2:A2 flat 内核 vs HEAD 无污染 |
| 73 | ├── check_arch35_config.py # (已知 ascendc_config 非 binary 闸门,见 common-issues) | 73 | ├── check_arch35_config.py # (已知 ascendc_config 非 binary 闸门,见 common-issues) |
| 74 | ├── check_gpu_env.sh # 竞品 GPU 就绪自检 | 74 | ├── check_gpu_env.sh # 竞品 GPU 就绪自检 |
| 75 | + ├── classify_aclnn_source.py # ACLNN 开源仓三种形态判定 | ||
| 76 | + ├── inspect_aclnn_api.sh # 开源仓+canndev+CANN 包只读证据探测 | ||
| 77 | + ├── check_invoke_path.py # GE/e2e/ACLNN 通路结果门禁 | ||
| 75 | └── gen_func_xlsx.py # 泛化功能 xlsx 报告 | 78 | └── gen_func_xlsx.py # 泛化功能 xlsx 报告 |
| 76 | ``` | 79 | ``` |
| 77 | 80 | ||
| @@ -99,5 +102,6 @@ changwei-op-dev/ | |||
| 99 | | 2026-07-23 | **自查册补"已开发算子 op_list 说明别留占位符"**:占位符"暂无AscendC实现,欢迎贡献"只留给真未实现算子;算子已开发就要替换成本算子真实功能描述(别因 54 个兄弟都留就跟着留——mml 已开发就该改)。mml op_list/op_api_list 描述已修正(NLL→multilabel margin loss + 占位符→功能描述) | handover §8.3 / lookup/recurring-mistakes | | 102 | | 2026-07-23 | **自查册补"已开发算子 op_list 说明别留占位符"**:占位符"暂无AscendC实现,欢迎贡献"只留给真未实现算子;算子已开发就要替换成本算子真实功能描述(别因 54 个兄弟都留就跟着留——mml 已开发就该改)。mml op_list/op_api_list 描述已修正(NLL→multilabel margin loss + 占位符→功能描述) | handover §8.3 / lookup/recurring-mistakes | |
| 100 | | 2026-0723 | **nzv/mml/gnsq 检视意见沉淀 5 条进 §8.3+自查册**:①公共README调用说明只呈现aclnn+GE图模式(不呈现torch/tf,归转测06/07) ②公共文档无冗余空格(中文/英文/数字/符号间,产品名除外) ③列表项(计算公式)下内容缩进2空格 ④产品支持表6个产品齐+按CANN包维度写 ⑤新增产品支持同步刷op_api_list确定性列 | handover §8.3 / lookup/recurring-mistakes | | 103 | | 2026-0723 | **nzv/mml/gnsq 检视意见沉淀 5 条进 §8.3+自查册**:①公共README调用说明只呈现aclnn+GE图模式(不呈现torch/tf,归转测06/07) ②公共文档无冗余空格(中文/英文/数字/符号间,产品名除外) ③列表项(计算公式)下内容缩进2空格 ④产品支持表6个产品齐+按CANN包维度写 ⑤新增产品支持同步刷op_api_list确定性列 | handover §8.3 / lookup/recurring-mistakes | |
| 101 | | 2026-07-23 | **nzv/mml/gnsq 检视闭环再沉淀 4 条**:①确定性值必核实实现(别照抄兄弟;查 tiling `isDeterministicKey`+确定/非确定双实现,内核无条件 `SetAtomicAdd`=非确定→只写"默认非确定性实现",mml 反例) ②产品支持 √/× 权威判据(canndev op_info_cfg 逐 SOC `[Op]` 段 + npu-hardware-params SOC↔产品名映射) ③arch35 支持面/dtype 看 op_info_cfg **实机**非 IR proto 宽松契约 + proto `Type`/def `Int` 是 CANN 两层约定别乱修 ④A5 逐字 mirror A2 已评审代码不引偏离改(tf_plugin 反例) | handover §8.3 / development §3 / red-lines R2 / recurring-mistakes | | 104 | | 2026-07-23 | **nzv/mml/gnsq 检视闭环再沉淀 4 条**:①确定性值必核实实现(别照抄兄弟;查 tiling `isDeterministicKey`+确定/非确定双实现,内核无条件 `SetAtomicAdd`=非确定→只写"默认非确定性实现",mml 反例) ②产品支持 √/× 权威判据(canndev op_info_cfg 逐 SOC `[Op]` 段 + npu-hardware-params SOC↔产品名映射) ③arch35 支持面/dtype 看 op_info_cfg **实机**非 IR proto 宽松契约 + proto `Type`/def `Int` 是 CANN 两层约定别乱修 ④A5 逐字 mirror A2 已评审代码不引偏离改(tf_plugin 反例) | handover §8.3 / development §3 / red-lines R2 / recurring-mistakes | |
| 105 | +| 2026-08-20 | **ACLNN 校验闭环**:逐开源仓判手写 `op_api`/CMake 自动生成/无公开接口;明确 `aclnn_exclude` 仅表示 A5 不自动生成;区分自动、手写、wrapper、复用的交付物;ACLNN 门禁强制核验真实 API/SoC、三个返回码、加载库和全部输出 | aclnn-workflow / step1·3·5·7 / classify+inspect+invoke scripts | | ||
| 102 | 106 | ||
| 103 | **近期主线**:从「写完出包」→「上库门禁」→「流水导航重构」→「**双轴重排 + 机器守卫红线**」——薄入口带走 0→7,红线做成脚本硬卡,经验单源+触发挂钩确保不丢且真被用。 | 107 | **近期主线**:从「写完出包」→「上库门禁」→「流水导航重构」→「**双轴重排 + 机器守卫红线**」——薄入口带走 0→7,红线做成脚本硬卡,经验单源+触发挂钩确保不丢且真被用。 |
Achangwei-op-dev/references/crosscut/aclnn-workflow.md+158-0File content is under review, please try again later
Mchangwei-op-dev/references/lookup/error-index.md+1-1File content is under review, please try again later
Mchangwei-op-dev/references/lookup/recurring-mistakes.md+7-2File content is under review, please try again later
Mchangwei-op-dev/references/lookup/red-lines.md+2-2File content is under review, please try again later
Mchangwei-op-dev/references/manuals/development.md+8-7File content is under review, please try again later
Mchangwei-op-dev/references/manuals/handover-deliverables.md+22-14File content is under review, please try again later
Mchangwei-op-dev/references/manuals/verification.md+17-9File content is under review, please try again later
Mchangwei-op-dev/references/pipeline/step0-env.md+4-4File content is under review, please try again later
Mchangwei-op-dev/references/pipeline/step1-requirement.md+1-0File content is under review, please try again later
Mchangwei-op-dev/references/pipeline/step3-develop.md+1-1File content is under review, please try again later
Mchangwei-op-dev/references/pipeline/step5-verify.md+14-11File content is under review, please try again later
Mchangwei-op-dev/references/pipeline/step6-deliverables.md+3-1File content is under review, please try again later
Mchangwei-op-dev/references/pipeline/step7-final-check.md+5-3File content is under review, please try again later
Mchangwei-op-dev/scripts/check_invoke_path.py+136-15File content is under review, please try again later
Achangwei-op-dev/scripts/classify_aclnn_source.py+302-0File content is under review, please try again later
Achangwei-op-dev/scripts/inspect_aclnn_api.sh+109-0File content is under review, please try again later
Achangwei-op-dev/scripts/tests/test_aclnn_validation.py+138-0File content is under review, please try again later
Mchangwei-op-dev/templates/01_requirement.template.md+5-1File content is under review, please try again later
Mchangwei-op-dev/templates/02_design.template.md+1-1File content is under review, please try again later
Mchangwei-op-dev/templates/06_operator_info.template.md+2-1File content is under review, please try again later
Mchangwei-op-dev/templates/07_self_verification.template.md+1-0File content is under review, please try again later
Mchangwei-op-dev/templates/golden_spec.template.py+24-16File content is under review, please try again later
Achangwei_deliverables/august/ApplyCamePart3/01_requirement.md+103-0File content is under review, please try again later
Achangwei_deliverables/august/ApplyCamePart3/02_design.md+97-0File content is under review, please try again later
Achangwei_deliverables/august/ApplyCamePart3/03_spec.yaml+148-0File content is under review, please try again later
| @@ -0,0 +1,19 @@ | |||
| 1 | +# ApplyCamePart3 golden标杆 | ||
| 2 | + | ||
| 3 | +- 仓内实现:`ops-nn/optim/apply_came_part3/tests/assets/golden.py`。 | ||
| 4 | +- kernel 与内部 ACLNN 注册:`__golden__` 分别登记 `apply_came_part3` 和 `aclnnApplyCamePart3`。 | ||
| 5 | +- 三方 TestSpec 注册:`__spec__` 对两个入口登记对应 spec;竞品为 `ApplyCamePart3TorchBenchmark`。 | ||
| 6 | +- 输入约束:`u`与`m`为相同shape的非空二维Tensor;`global_shape`缺省时使用本地shape。 | ||
| 7 | +- 计算域:`u`和`m`转FLOAT32完成裁剪、一阶矩和统计量计算,输出`m`按输入`m` dtype转换或透传。 | ||
| 8 | +- 特殊值:仅当`scale > 1`时替换裁剪除数;`0/0`保留除数1,正数除0得到无穷除数。 | ||
| 9 | +- 输出:`m_out`、`sum(stat, axis=1)`、`sum(stat, axis=0)`、`sum(stat)`。 | ||
| 10 | +- 主 golden:计算公式使用 PyTorch Tensor 算子表达,NumPy 只用于 TTK 输入输出边界。 | ||
| 11 | +- 三方提升:kernel/GEIR 的 cross_check 输入若由 TTK 提升到 FP64,golden 保留 FP64;仅 FP16/BF16 输入兜底到 FP32。 | ||
| 12 | +- ACLNN 判据:TTK 对该通路不派发三方,spec 使用本地 `stat_rel_err`;内部 ACLNN 由统一验收工具校验 `GetWorkspaceSize`、Execute、Sync 和四路输出。 | ||
| 13 | +- GPU竞品:`ApplyCamePart3TorchBenchmark` 的三方精度入口使用 eager PyTorch,不强制 `torch.compile`;倒数后乘、两路 moment 乘法后相加、平方加 epsilon 的 FP32 算术边界与 NPU 对齐。性能验收由统一工具显式启用 `torch.compile(fullgraph=True)`。 | ||
| 14 | +- 三方精度:104 个 case 使用同一输入比较 Ascend950 release binary、CPU PyTorch FP64 golden 与 A100 eager PyTorch,四路输出共 416 项;正式 `cross_check` L1 为 416/416 PASS,case 104/104 PASS,最大 RMSE 比 1.136475984。 | ||
| 15 | +- 精度诊断:对 CPU FP64 的 dtype-isclose 为 416/416 PASS,但仅作诊断,不替代 GPU 已存在时的三方 L1。 | ||
| 16 | +- release-kernel 泛化:固定 800 组用例为 800/800 PASS。 | ||
| 17 | +- GEIR 结果:使用同源 release binary 通过 gpu-20102 A100 执行 TTK GEIR,eager 同序精度路径 50/50 连通且四输出 cross_check L1 共200/200 PASS;`torch.compile(fullgraph=True)` 最优性能路径 folded G/N 均值 0.721579、最小 0.104950,未满足全局门槛 mean>=1.2、min>=0.5,结果 FAIL;raw G/N 仅作观测值。GEIR 结果未产出 binary OOB token,OOB 结论来自800例 kernel 泛化。 | ||
| 18 | +- 性能结果:固定 200 个同名 case;NPU 使用单设备单进程 release binary,A100 竞品使用 `torch.compile(fullgraph=True)` 并通过 CUDA Events 计时。200/200 PASS;raw G/N 均值 10.327233、最小 1.941898;folded G/N 均值 10.036780、最小 1.887283,性能门禁 PASS。 | ||
| 19 | +- 内部 ACLNN ABI 没有公共 op_api 文档或仓级公开接口列表项。统一验收工具覆盖合法调用和非法 `sum_u_rc=[]` 负例。 | ||
Binary files do not support preview
Binary files do not support preview