@cannbot-plugin/cannbot-harness 0.0.0-stage → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -3
- package/THIRD_PARTY_NOTICES.md +11 -0
- package/assets/ops-direct-invoke/.cannbot-bundle +1 -0
- package/assets/ops-direct-invoke/.claude-plugin/plugin.json +21 -0
- package/assets/ops-direct-invoke/.codex-plugin/plugin.json +30 -0
- package/assets/ops-direct-invoke/AGENTS.md +93 -0
- package/assets/ops-direct-invoke/LICENSE +38 -0
- package/assets/ops-direct-invoke/QUICKSTART.md +44 -0
- package/assets/ops-direct-invoke/README.md +219 -0
- package/assets/ops-direct-invoke/SKILLS_LICENSE +38 -0
- package/assets/ops-direct-invoke/agents/ops-direct-invoke-architect.md +39 -0
- package/assets/ops-direct-invoke/agents/ops-direct-invoke-developer.md +39 -0
- package/assets/ops-direct-invoke/agents/ops-direct-invoke-verifier.md +38 -0
- package/assets/ops-direct-invoke/init.sh +8 -0
- package/assets/ops-direct-invoke/plugin-install.json +24 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/SKILL.md +88 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/evals/evals.json +207 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-arithmetic.md +399 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-atomic.md +192 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-buffer.md +364 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-cross-gen-fixpipe.md +28 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-cross-gen-migration.md +91 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-crosscore-sync.md +259 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-datacopy.md +405 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-gathermask.md +243 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-gmm.md +260 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-hccl-host.md +187 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-hcomm.md +229 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-host-runtime.md +129 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-loaddata.md +196 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-matmul.md +364 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-mrgsort.md +636 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-pipeline.md +206 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-precision.md +146 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-quickref.md +192 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-reduce-pattern.md +132 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-reduce.md +282 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-repeat-limits.md +144 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-restrictions.md +200 -0
- package/assets/ops-direct-invoke/skills/ascendc-api-best-practices/references/api-transpose.md +234 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/SKILL.md +245 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/block/block_mmad_glu.h +238 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/block/block_scheduler_group_matmul.h +106 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/block/weight_quant_matmul_block_mmad.h +362 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/epilogue/block_epilogue_dequant_swiglu.h +265 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/epilogue/block_epilogue_pertoken_quant_single_pass.h +252 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/epilogue/block_epilogue_pertoken_quant_two_pass_chunked.h +313 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/epilogue/block_epilogue_swiglu.h +171 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/epilogue/cv_sync_constants.h +32 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/epilogue/epilogue_fusion_membase.h +212 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/epilogue/epilogue_fusion_regbase.h +324 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/epilogue/online_softmax_cross_core_epilogue.h +396 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/epilogue/online_softmax_per_tile_epilogue.h +421 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/kernel/group_matmul_kernel_cv1_v2.h +150 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/kernel/group_matmul_kernel_glu_fused.h +345 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/kernel/weight_quant_matmul_kernel.h +611 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/policy/dispatch_policy.h +63 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/utils/common_utils.h +101 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/blaze_custom/utils/integral_constant.h +38 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/op_tiling/matmul/blaze_group_matmul_pertoken_quant_selector.h +119 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/op_tiling/matmul/blaze_group_matmul_tiling_data.h +38 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/op_tiling/matmul/blaze_matmul_tiling.h +457 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/op_tiling/matmul/blaze_matmul_tiling_data.h +50 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/op_tiling/mx/quant_matmul_mx_tiling.h +549 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/op_tiling/mx/quant_matmul_mx_tiling_data.h +47 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/op_tiling/weight_quant/weight_quant_tiling.h +428 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/assets/op_tiling/weight_quant/weight_quant_tiling_data.h +59 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/evals/evals.json +234 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/blaze-investigation/assembly-recovery-method.md +106 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/blaze-investigation/dependency-trace-method.md +140 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/blaze-investigation/design-contract-method.md +78 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/blaze-investigation/investigation-report-template.md +249 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/blaze-investigation/source-investigation-method.md +131 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/fundamentals/blaze-cmake-build-guide.md +184 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/fundamentals/blaze-framework-overview.md +403 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/fundamentals/blaze-matmul-layout.md +322 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/fundamentals/blaze-sync-patterns.md +814 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/fundamentals/tensor-api-reference.md +589 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/kernel-design/blaze-design-template.md +593 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/kernel-design/blaze-plan-template.md +391 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/kernel-design/glu-development.md +755 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/kernel-design/glu-precision-diagnosis.md +113 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/kernel-design/group-matmul-delta.md +299 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/kernel-design/per-token-quant-development.md +450 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/kernel-design/tiling-selection.md +114 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/launcher/launcher-development.md +346 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-elementwise-then-vector-pertoken-quant/cube-matmul-then-vector-elementwise-then-vector-pertoken-quant-design.md +196 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-elementwise-then-vector-pertoken-quant/cube-matmul-then-vector-elementwise-then-vector-pertoken-quant-development.md +104 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-glu/cube-matmul-then-vector-glu-design.md +150 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-glu/cube-matmul-then-vector-glu-development.md +54 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-glu-then-vector-pertoken-quant/cube-matmul-then-vector-glu-then-vector-pertoken-quant-design.md +189 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-glu-then-vector-pertoken-quant/cube-matmul-then-vector-glu-then-vector-pertoken-quant-development.md +52 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-pertoken-quant/cube-matmul-then-vector-pertoken-quant-design.md +138 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-pertoken-quant/cube-matmul-then-vector-pertoken-quant-development.md +45 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-softmax-reduce/cube-matmul-then-vector-softmax-reduce-design.md +205 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-softmax-reduce/cube-matmul-then-vector-softmax-reduce-development.md +99 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-softmax-reduce/cv-sync-and-two-phase-entry.md +156 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-softmax-reduce/cv1-v2-adaptation-for-softmax-reduce.md +331 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-softmax-reduce/online-softmax-reduce-epilogue-design.md +174 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/cube-matmul-then-vector-softmax-reduce/reduce-adaptation-guide.md +204 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/elementwise-broadcast-epilogue-fusion/block-l0c2ub-extension.md +75 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/elementwise-broadcast-epilogue-fusion/elementwise-broadcast-epilogue-fusion-design.md +280 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/elementwise-broadcast-epilogue-fusion/elementwise-broadcast-epilogue-fusion-development.md +202 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/elementwise-broadcast-epilogue-fusion/epilogue-membase-design.md +82 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/elementwise-broadcast-epilogue-fusion/epilogue-regbase-design.md +95 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/elementwise-broadcast-epilogue-fusion/fused-kernel-development.md +71 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/elementwise-broadcast-epilogue-fusion/precision-diagnosis.md +86 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/elementwise-broadcast-epilogue-fusion/splitm-contract-and-debugging.md +86 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/index.md +14 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/scenario-extension-guide.md +84 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/weight-dequant-prologue-fusion/layout-variant-boundary.md +76 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/weight-dequant-prologue-fusion/pitfalls-and-diagnosis.md +124 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/weight-dequant-prologue-fusion/prologue-ub-layout-design.md +135 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/weight-dequant-prologue-fusion/prologue-vf-dequant-design.md +213 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/weight-dequant-prologue-fusion/vc-sync-and-l1-layout-design.md +103 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/weight-dequant-prologue-fusion/weight-dequant-prologue-fusion-design.md +289 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/weight-dequant-prologue-fusion/weight-dequant-prologue-fusion-development.md +232 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/scenarios/weight-dequant-prologue-fusion/weight-quant-tiling-contract.md +83 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/troubleshooting/compile-troubleshooting.md +231 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/troubleshooting/optimized-runtime-hang.md +102 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/workflow/step1-project-setup.md +170 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/workflow/step2-blaze-investigation.md +192 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/workflow/step3-kernel-design.md +246 -0
- package/assets/ops-direct-invoke/skills/ascendc-blaze-best-practice/references/workflow/step4-operator-development.md +166 -0
- package/assets/ops-direct-invoke/skills/ascendc-crash-debug/SKILL.md +67 -0
- package/assets/ops-direct-invoke/skills/ascendc-crash-debug/evals/evals.json +123 -0
- package/assets/ops-direct-invoke/skills/ascendc-crash-debug/references/crash_workflow.md +193 -0
- package/assets/ops-direct-invoke/skills/ascendc-crash-debug/references/memcheck/README.md +137 -0
- package/assets/ops-direct-invoke/skills/ascendc-crash-debug/references/memcheck/automated_workflow.md +418 -0
- package/assets/ops-direct-invoke/skills/ascendc-crash-debug/references/memcheck/mssanitizer_guide.md +181 -0
- package/assets/ops-direct-invoke/skills/ascendc-crash-debug/scripts/memcheck_input.json.template +44 -0
- package/assets/ops-direct-invoke/skills/ascendc-crash-debug/scripts/parse_plog.py +191 -0
- package/assets/ops-direct-invoke/skills/ascendc-crash-debug/scripts/run_memcheck_pre.sh +696 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/SKILL.md +105 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/evals/evals.json +128 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/CMakeLists.txt +131 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/README.md +55 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/op_extension/add_custom_torch.cpp +82 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/op_extension/ops.h +23 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/op_extension/register.cpp +42 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/op_host/add_custom.asc +149 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/op_host/data_utils.h +98 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/op_kernel/add_custom_kernel.asc +136 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/op_kernel/add_custom_tiling.h +31 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/run.sh +86 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/scripts/gen_data.py +49 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/scripts/golden.py +36 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/scripts/test_torch.py +90 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/add_custom/scripts/verify_result.py +54 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kernel_launch_details.md +116 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/CMakeLists.txt +19 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/README.md +214 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/UPSTREAM.md +35 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/add_custom.cpp +99 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/add_custom_tiling.h +25 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/cmake/Modules/CMakeCCECompiler.cmake.in +15 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/cmake/Modules/CMakeCCEInformation.cmake +51 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/cmake/Modules/CMakeDetermineCCECompiler.cmake +119 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/cmake/Modules/CMakeTestCCECompiler.cmake +11 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/cmake/npu/CMakeLists.txt +36 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/data_utils.h +132 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/ext_lib/.gitattributes +1 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/input/.keep +0 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/main.cpp +108 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/output/.keep +0 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/run.sh +141 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/scripts/acl.json +1 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/scripts/gen_data.py +26 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_add_template/scripts/verify_result.py +54 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/kirin_vector_guide.md +172 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_guide.md +348 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/CMakeLists.txt +157 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/common/acl_utils.h +70 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/common/common_utils.h +84 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/common/io_utils.h +163 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/op_extension/matmul_blaze_torch.cpp +55 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/op_extension/ops.h +22 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/op_extension/register.cpp +22 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/op_kernel/include/blaze_custom/.gitkeep +0 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/op_kernel/matmul_blaze_kernel.cpp +33 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/op_kernel/matmul_blaze_kernel.h +99 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/op_tiling/matmul_constant.h +31 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/op_tiling/matmul_tiling_data.h +45 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/op_tiling/matmul_tiling_stub.h +77 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/run.sh +94 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/scripts/gen_data_mxfp4.py +152 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/scripts/gen_data_mxfp8.py +114 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/scripts/verify_result.py +132 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/test_matmul_blaze.cpp +145 -0
- package/assets/ops-direct-invoke/skills/ascendc-direct-invoke-template/references/matmul_blaze_template/test_matmul_blaze_torch.py +141 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-gen/SKILL.md +56 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-gen/evals/evals.json +191 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-gen/references/aclnn-api-doc-template.md +368 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-gen/references/detailed-design-template.md +388 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-gen/references/iteration-plan-template.md +45 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-gen/references/operator-readme-template.md +234 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-gen/references/operator-readme-template_bak.md +165 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-gen/references/requirement-analysis-template.md +131 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-search/SKILL.md +163 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-search/evals/evals.json +197 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-search/references/api-index.md +207 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-search/references/compatibility.md +141 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-search/references/example-catalog.md +197 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-search/requirements.txt +2 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-search/scripts/__init__.py +6 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-search/scripts/ascend_content_fetcher.py +479 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-search/scripts/ascend_search_client.py +201 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-search/scripts/ascend_search_skill.py +163 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-search/scripts/clean_markdown.py +489 -0
- package/assets/ops-direct-invoke/skills/ascendc-docs-search/scripts/find_api_doc.sh +54 -0
- package/assets/ops-direct-invoke/skills/ascendc-env-check/SKILL.md +123 -0
- package/assets/ops-direct-invoke/skills/ascendc-env-check/evals/evals.json +211 -0
- package/assets/ops-direct-invoke/skills/ascendc-env-check/references/asys_commands.md +64 -0
- package/assets/ops-direct-invoke/skills/ascendc-env-check/references/env_config_guide.md +96 -0
- package/assets/ops-direct-invoke/skills/ascendc-env-check/references/kirin_platform_guide.md +11 -0
- package/assets/ops-direct-invoke/skills/ascendc-env-check/references/npu_commands.md +114 -0
- package/assets/ops-direct-invoke/skills/ascendc-env-check/references/troubleshooting.md +177 -0
- package/assets/ops-direct-invoke/skills/ascendc-env-check/scripts/_npu_info.py +763 -0
- package/assets/ops-direct-invoke/skills/ascendc-env-check/scripts/check_env.sh +320 -0
- package/assets/ops-direct-invoke/skills/ascendc-env-check/scripts/get_npu_arch.py +488 -0
- package/assets/ops-direct-invoke/skills/ascendc-env-check/scripts/npu_info.sh +228 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/SKILL.md +370 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/docs/CONTEXT.md +85 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/docs/MC2-CAPABILITY-PLAN.md +111 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/docs/adr/0001-mc2-skill-not-plugin.md +31 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/docs/adr/0002-decision-stack-path-registry.md +33 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/evals/evals.json +315 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/capability-declaration.md +97 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/codebase-analysis.md +34 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/fundamentals/architecture.md +444 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/fundamentals/communication.md +669 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/fundamentals/compute.md +587 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/fundamentals/fusion.md +550 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/operator-design/design-template.md +313 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/operator-design/dev-methodology.md +111 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/operator-design/development-guide.md +445 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/operator-design/host-and-testing.md +285 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/operator-design/operator-anatomy.md +739 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/operator-design/paradigm-mapping.md +93 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/operator-design/plan-template.md +235 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/review-checklist.md +96 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/scenarios/compute-first-reduce-scatter/design.md +107 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/scenarios/compute-first-reduce-scatter/development.md +272 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/scenarios/get-all-gather-quant-matmul/design.md +93 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/scenarios/get-all-gather-quant-matmul/development.md +70 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/scenarios/index.md +47 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/scenarios/put-all-gather-quant-matmul/design.md +83 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/scenarios/put-all-gather-quant-matmul/development.md +62 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/scenarios/put-all-to-all-quant-matmul/design.md +106 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/scenarios/put-all-to-all-quant-matmul/development.md +74 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/troubleshooting/failure-navigation.md +47 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/troubleshooting/optimization-playbook.md +143 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/workflow/step1-project-setup.md +52 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/workflow/step2-investigation.md +89 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/workflow/step3-design.md +69 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/workflow/step4-implementation.md +29 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/apace/workflow_integration.md +122 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/api-rules/dispatch-combine-contracts.md +60 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/api-rules/index.md +71 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/api-rules/mte-address-access.md +374 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/api-rules/sync-and-visibility.md +105 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/reading/combine-reading-guide.md +102 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/reading/common-reading-method.md +226 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/reading/design-overview.md +558 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/reading/dispatch-reading-guide.md +81 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/reading/kernel-execution-units.md +189 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/reading/mega-moe-reading-guide.md +123 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/build-framework.md +177 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/change-routing.md +18 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/combine-dataflow.md +144 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/dispatch-dataflow.md +128 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/index.md +98 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/CMakeLists.txt +51 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/README.md +131 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/build.sh +56 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/include/moe_dispatch_base_compat.h +113 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/include/tiling_data.h +100 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/include/utils.h +57 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/kernel/moe_dispatch.h +524 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/kernel/mte_dispatch_comm.h +324 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/moe_dispatch.cpp +67 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/run.sh +61 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/run_multi_data_test.sh +80 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/scripts/verify_dispatch.py +248 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/moe_dispatch_direct_invoke_sample/test/test_moe_dispatch.cpp +679 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/sample-helper-map.md +47 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/samples/spec-template.md +78 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/tiling-scheme/double-buffer-protocol.md +69 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/tiling-scheme/index.md +111 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/tiling-scheme/multi-core-formulas.md +126 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/tiling-scheme/split-core-design.md +100 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/ascendc-api/moe-dispatch-combine/tiling-scheme/window-memory-layout.md +199 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/CMakeLists.txt +95 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/cmake/ascend.cmake +59 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/cmake/shmem.cmake +75 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/cmake/tensor_api.cmake +48 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/common/host_utils/acl_utils.h +73 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/common/host_utils/common_utils.h +181 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/common/host_utils/io_utils.h +175 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/common/kernel_utils/common_utils.h +99 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/common/kernel_utils/integral_constant.h +36 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/common/kernel_utils/tuple_utils.h +34 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/block/block_mmad.h +27 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/block/block_scheduler_policy.h +35 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/block/block_scheduler_utils.h +27 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/block/quant_matmul_mx_block_mmad_swat.h +392 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/block/quant_matmul_mx_block_scheduler_swat.h +290 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/kernel/all_to_all_comm_udma.h +255 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/kernel/all_to_all_matmul_impl.h +370 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/kernel/heavy_kernels.h +128 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/kernel/qbmm_mx_kernel.h +395 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/policy/dispatch_policy.h +47 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/tile/copy_scale_l1_to_l0a.h +61 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/tile/copy_scale_l1_to_l0b.h +54 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/tile/pad_mx_kl1.h +138 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/tile/tile_mmad_mx.h +34 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/tiling/all_to_all_matmul_tiling_data.h +29 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/tiling/quant_matmul_mx_tiling_swat.h +410 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/tiling/quant_matmul_tiling_base.h +116 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/tiling/quant_matmul_tiling_common.h +101 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/tiling/quant_matmul_tiling_data.h +61 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/include/utils/constant.h +106 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/run.sh +65 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/scripts/extract_perf.py +57 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/scripts/gen_data.py +139 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/scripts/verify_result.py +152 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/src/all_to_all_matmul.cpp +396 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/all_to_all_matmul/src/utils.h +168 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/codebase_map.md +342 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/comm_shmem.md +280 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/matmul_blaze.md +259 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/mc2_architecture.md +199 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/review-checklist.md +29 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/blaze-shmem/workflow_integration.md +215 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/CMakeLists.txt +559 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/build.sh +319 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/cmake/config.cmake +232 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/cmake/func.cmake +478 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/cmake/intf.cmake +4 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/cmake/intf_pub.cmake +67 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/cmake/modules/Findalog.cmake +105 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/cmake/scripts/check_version_compatible.py +94 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/cmake/scripts/prepare.sh +129 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/examples/golden.py +27 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/examples/run_test.sh +33 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/examples/single_server_check_result.py +71 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/examples/single_server_config.ini +17 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/examples/single_server_gen_data.py +91 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/examples/single_server_run.py +116 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/examples/test_golden_cpu.py +63 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/CMakeLists.txt +202 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/mc2_common_infershape.cpp +163 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/mc2_common_infershape.h +49 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/formulaic_tiling_datatype.h +161 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/hccl_formulaic_tiling.cpp +373 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/hccl_formulaic_tiling.h +150 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/hccl_performance.cpp +206 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/hccl_performance.h +118 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/hcom_topo_info.h +81 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/matmul_formulaic_tiling.cpp +338 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/matmul_formulaic_tiling.h +340 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/matmul_performance.cpp +272 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/matmul_performance.h +152 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/mc2_tiling_struct.h +46 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/mc2_tiling_utils.cpp +296 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_host/op_tiling/mc2_tiling_utils.h +269 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_kernel/mc2_matmul_block.h +235 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_kernel/mc2_matmul_block_l2cache.h +165 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_kernel/mc2_matmul_compute.h +218 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_kernel/mc2_nd_to_nz.h +579 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/op_kernel/mc2_tiling_struct.h +164 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/utils/mc2_hcom_topo_info.cpp +390 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/utils/mc2_hcom_topo_info.h +81 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/mc2_common/utils/ops_utils.h +77 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_host/op_api/aclnn_x_all_gather_matmul.cpp +65 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_host/op_api/aclnn_x_all_gather_matmul.h +57 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_host/op_tiling/arch22/x_all_gather_formulaic_tiling_a2a3.cpp +50 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_host/op_tiling/arch22/x_all_gather_formulaic_tiling_a2a3.h +47 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_host/op_tiling/arch22/x_all_gather_matmul_tiling_a2a3.cpp +72 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_host/op_tiling/arch22/x_all_gather_matmul_tiling_a2a3.h +31 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_host/op_tiling/x_all_gather_formulaic_tiling.cpp +82 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_host/op_tiling/x_all_gather_formulaic_tiling.h +55 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_host/op_tiling/x_all_gather_matmul_tiling_base.cpp +508 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_host/op_tiling/x_all_gather_matmul_tiling_base.h +54 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_host/x_all_gather_matmul_def.cpp +79 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_host/x_all_gather_matmul_proto.cpp +39 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_kernel/x_all_gather_matmul.cpp +96 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_kernel/x_all_gather_matmul_base.h +152 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_kernel/x_all_gather_matmul_full_mesh.h +230 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_kernel/x_all_gather_matmul_tiling.h +45 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/all_gather_matmul/x_all_gather_matmul/op_kernel/x_all_gather_matmul_tiling_key.h +47 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/codebase_map.md +281 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/comm_hccl.md +201 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/matmul_fusion.md +50 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/mc2_architecture.md +142 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/op_architecture.md +167 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/pipeline_tuning.md +47 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/review-checklist.md +39 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/foundations/hccl-matmul/workflow_integration.md +152 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/operators/collective-comm.md +145 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/requirement-analysis/classification.md +27 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/requirement-analysis/comm-path-decision.md +51 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/requirement-analysis/grill-protocol.md +202 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/requirement-analysis/quality-checklist.md +57 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/requirement-analysis/template.md +208 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/shared/pipeline_tuning.md +232 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/references/shared/profiling_mc2.md +278 -0
- package/assets/ops-direct-invoke/skills/ascendc-mc2-best-practice/scripts/fetch_apace.sh +96 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/SKILL.md +121 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/evals/evals.json +138 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/broadcast/advanced_tiling.md +92 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/broadcast/broadcast_design.md +160 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/broadcast/code/broadcast_add_kernel.cpp +118 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/broadcast/code/broadcast_add_tiling.cpp +126 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/broadcast/code/broadcast_common.h +344 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/broadcast/code/onedim_add_kernel.cpp +97 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/broadcast/code/onedim_add_tiling.cpp +57 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/broadcast/datacopypad_design.md +46 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/broadcast/nddma_design.md +53 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/broadcast/onedim_design.md +114 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/broadcast/ub_broadcast_design.md +67 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/common/core_shrink_design.md +126 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/common/datacopy_optimization_design.md +351 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/common/tail_block_design.md +268 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/common/ub_resident_design.md +342 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/guide.md +69 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/templates/dav3510/transpose_base.template +81 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/templates/dav3510/transpose_big_dim.template +217 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/templates/dav3510/transpose_cut_one_axis.template +336 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/templates/dav3510/transpose_cut_two_axis.template +781 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/templates/dav3510/transpose_n_last.template +340 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/templates/dav3510/transpose_small_shape.template +321 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/templates/dav3510/transpose_tensor_move.template +102 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/templates/dav3510/transpose_transdata_5hd.template +480 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/templates/dav3510/transpose_transdata_5hd_021axis.template +533 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/templates/dav3510/transpose_with_gather.template +688 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/templates/transpose_tiling_data.template +192 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/transpose_big_dim.md +220 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/transpose_cut_one_axis.md +175 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/transpose_cut_two_axis.md +177 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/transpose_fusion_design.md +398 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/transpose_gather.md +191 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/transpose_n_last.md +276 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/transpose_small_shape.md +315 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/transpose_tensor_move.md +203 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/transpose_tiling_data.md +176 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/transpose_vconv_021.md +206 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/conversion/transpose_vconv_5hd.md +179 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/elementwise/double_buffer_design.md +288 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/elementwise/vector_efficiency_design.md +203 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/matmul/constant_folding_design.md +466 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/matmul/fullload_design.md +344 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/matmul/guide.md +16 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/matmul/mte2_preload_design.md +320 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/matmul/pingpong_design.md +254 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/matmul/scale_coalescing_design.md +282 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/matmul/small_m_wide_n_pipeline_design.md +137 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/matmul/streamk_design.md +374 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/matmul/swat_design.md +423 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/mc2/guide.md +45 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/mc2/local_matmul_design.md +130 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/mc2/pipeline_balancing_design.md +502 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/guide.md +178 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/dav310/kernel_utils.template +75 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/dav310/softmax_v2_ar_full_load.template +429 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/dav310/softmax_v2_ar_recompute.template +485 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/dav310/softmax_v2_ar_small_r.template +348 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/dav310/softmax_v2_ara_full_load.template +574 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/dav310/softmax_v2_ara_online.template +324 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/dav310/softmax_v2_ara_recompute.template +436 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/dav310/softmax_v2_base.template +950 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/fused_attention_online_softmax_design.md +428 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/softmax_v2_ar_full_load.md +137 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/softmax_v2_ar_recompute.md +135 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/softmax_v2_ar_small_r.md +122 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/softmax_v2_ara_full_load.md +144 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/softmax_v2_ara_online.md +185 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/softmax_v2_ara_recompute.md +163 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/softmax_v2_tiling.template +460 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/softmax_v2_tiling_data.template +278 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/state_resident_design.md +337 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/reduce/templates/usage_guide.md +253 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/scalar/coding_principles.md +476 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/scalar/conv_scalar.md +165 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/scalar/guide.md +31 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/simt/optimization-guide.md +110 -0
- package/assets/ops-direct-invoke/skills/ascendc-performance-best-practices/references/sort/radix_sort.md +354 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/SKILL.md +361 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/evals/evals.json +161 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/ascendc-dumptensor-refs/api-reference.md +92 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/ascendc-dumptensor-refs/error-patterns.md +40 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/ascendc-dumptensor.md +205 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/best-practices.md +317 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/binary-search-debug.md +275 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/case-studies.md +459 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/common-traps.md +492 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/data-comparison.md +308 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/debug-summary-template.md +198 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/diagnosis-workflow.md +180 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/printf-debug.md +296 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/simt-precision-debug.md +76 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/references/tools-reference.md +364 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/scripts/error_analysis.py +148 -0
- package/assets/ops-direct-invoke/skills/ascendc-precision-debug/scripts/gen_boundary_test.py +169 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/SKILL.md +47 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/evals/evals.json +115 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/api/arithmetic_and_reduce.md +228 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/api/compute_api_membase_vs_regbase.md +107 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/api/datacopy_best_practices.md +139 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/api/index.md +38 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/api/pipeline_and_buffer.md +105 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/api/regbase_api_reference.md +303 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/api/regbase_api_sync.md +173 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/api/regbase_api_whitelist.md +142 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/dev-experience/index.md +24 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/dev-experience/regbase_build_notes.md +49 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/dev-experience/regbase_performance_practices.md +52 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/dev-experience/regbase_programming_notes.md +120 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/dev-experience/tiling_review_notes.md +86 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/dev-experience/working_vs_failed_dav_3510_cases.md +49 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/README.md +190 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/examples-adam-code/op_host/adam_apply_one_assign_def.cpp +102 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/examples-adam-code/op_host/arch35/adam_apply_one_assign_tiling_arch35.cpp +597 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/examples-adam-code/op_host/arch35/adam_apply_one_assign_tiling_arch35.h +82 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/examples-adam-code/op_kernel/adam_apply_one_assign.cpp +44 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/examples-adam-code/op_kernel/arch35/adam_apply_one_assign_kernel.h +361 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/examples-adam-code/op_kernel/arch35/adam_apply_one_assign_struct.h +27 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/examples-adam-code/op_kernel/arch35/adam_apply_one_assign_tiling_struct.h +53 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/examples-adam-design/adam_apply_one_assign_analysis.md +143 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/examples-adam-design/adam_apply_one_assign_design.md +2865 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/CMakeLists.txt +328 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/README.md +163 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/op_graph/xdivy_graph_infer.cpp +38 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/op_graph/xdivy_proto.h +42 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/op_host/arch35/xdivy_tiling_arch35.cpp +601 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/op_host/arch35/xdivy_tiling_arch35.h +89 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/op_host/xdivy_def.cpp +60 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/op_host/xdivy_infershape.cpp +58 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/op_kernel/arch35/xdivy_kernel.h +331 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/op_kernel/arch35/xdivy_struct.h +28 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/op_kernel/arch35/xdivy_tiling_struct.h +57 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/op_kernel/xdivy.cpp +42 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/tests/aclnn/CMakeLists.txt +67 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/tests/aclnn/run.sh +56 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/tests/aclnn/test_aclnn.cpp +354 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/tests/geir/CMakeLists.txt +69 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/tests/geir/run.sh +58 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/tests/geir/test_geir.cpp +407 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/tests/tiling/CMakeLists.txt +185 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/tests/tiling/run.sh +61 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/example/xdivy_custom_package/tests/tiling/test_tiling.cpp +386 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/patterns.md +324 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/references/broadcast-kernel-entrance.md +95 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/references/broadcast-template-overview.md +252 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/references/broadcast-template-standard/broadcast-standard-compute-flow.md +214 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/references/broadcast-template-standard/broadcast-standard-dag-buffers.md +285 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/references/broadcast-template-standard/broadcast-standard-kernel-helpers.md +209 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/references/broadcast-template-standard/broadcast-standard-kernel-template.md +611 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/references/broadcast-template-standard/broadcast-standard-tiling-preprocess.md +545 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/broadcast/references/broadcast-template-standard/broadcast-standard-tiling.md +471 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/common/broadcast-rules.md +126 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/common/cast-rules.md +414 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/common/datacopypad-rules.md +185 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/common/nddma-rules.md +255 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/common/sync-and-consistency.md +314 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/common/value-depend-process.md +40 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/common/vf-programming-rules.md +150 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/dynamic_shape/knowledge.md +382 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/dynamic_shape/patterns.md +260 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/elewise/patterns.md +46 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/elewise/tiling.md +215 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/example-routes.yaml +17 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/general-methodology.md +94 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/mask_predicate/patterns.md +99 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/numerical_stable/knowledge.md +233 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/numerical_stable/patterns.md +390 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/CMakeLists.txt +289 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/README.md +148 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/op_graph/euclidean_norm_graph_infer.cpp +39 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/op_graph/euclidean_norm_proto.h +54 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/op_host/arch35/euclidean_norm_tiling_arch35.cpp +1040 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/op_host/arch35/euclidean_norm_tiling_arch35.h +28 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/op_host/euclidean_norm_def.cpp +86 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/op_host/euclidean_norm_infershape.cpp +205 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/op_kernel/arch35/euclidean_norm.cpp +46 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/op_kernel/arch35/euclidean_norm_base.h +965 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/op_kernel/arch35/euclidean_norm_empty.h +153 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/op_kernel/arch35/euclidean_norm_group.h +396 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/op_kernel/arch35/euclidean_norm_tiling_data.h +74 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/op_kernel/arch35/euclidean_norm_tiling_key.h +32 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/tests/aclnn/CMakeLists.txt +59 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/tests/aclnn/run.sh +36 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/tests/aclnn/test_aclnn.cpp +227 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/tests/geir/CMakeLists.txt +84 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/tests/geir/run.sh +48 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/tests/geir/test_geir.cpp +297 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/tests/tiling/CMakeLists.txt +143 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/tests/tiling/run.sh +40 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/example/euclidean_norm_package/tests/tiling/test_tiling.cpp +318 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/patterns.md +527 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-binary-sum.md +260 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-highlevel-api.md +146 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-kernel-entrance.md +96 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-survival-node.md +74 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-template-binary-base/reduction-binary-base-dag-buffers.md +612 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-template-binary-base/reduction-binary-base-kernel-template.md +1261 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-template-binary-base/reduction-binary-base-tiling.md +531 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-template-binary-group/reduction-binary-group-dag-buffers.md +209 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-template-binary-group/reduction-binary-group-kernel-template.md +588 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-template-binary-group/reduction-binary-group-tiling.md +203 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-template-empty/reduction-empty-dag-buffers.md +292 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-template-empty/reduction-empty-kernel-template.md +360 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-template-empty/reduction-empty-tiling.md +234 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-template-overview.md +238 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-tiling-preprocess.md +218 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-tuple-reduce.md +72 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/references/reduction-vf-fusion-rules.md +95 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/reduction/validate_gates.py +194 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/resolve_example.py +106 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/routes.yaml +39 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/stateful/patterns.md +146 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/variable_output/knowledge.md +366 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/paradigms/variable_output/patterns.md +203 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/pitfalls/api_misuse.md +50 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/pitfalls/common_traps.md +67 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/pitfalls/index.md +25 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/pitfalls/precision_failures.md +51 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/pitfalls/precision_guide.md +85 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/pitfalls/regbase_vs_membase_confusions.md +52 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/pitfalls/symptom_to_cause.md +38 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/reference-ops/open_source_operator_table.md +740 -0
- package/assets/ops-direct-invoke/skills/ascendc-regbase-best-practice/references/regbase_development_guide.md +334 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/SKILL.md +107 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/evals/evals.json +44 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references/compute-operators.md +34 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references/data-transfer.md +51 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references/debug-api.md +530 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references/index-calculation.md +49 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references/intra-core-shared.md +70 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references/macro-api.md +65 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references/multi-core-sync.md +39 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references/overview.md +128 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references/tensorlist-handling.md +92 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references/thread-stride-pattern.md +49 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references/vf-call.md +51 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references/vf-declaration.md +39 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-best-practices/references//347/274/226/350/257/221/344/270/216/350/277/220/350/241/214.md +158 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-tiling-design/SKILL.md +42 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-tiling-design/evals/evals.json +44 -0
- package/assets/ops-direct-invoke/skills/ascendc-simt-tiling-design/references/guide.md +73 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/SKILL.md +316 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/evals/evals.json +44 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/references/constraint-examples.md +392 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/references/dependency-yaml-spec.md +625 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/references/empty-tensor-guide.md +236 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/references/parameter-definition.md +491 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/references/standards.md +11 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/scripts/generate_empty_tensor_cases_derive.py +815 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/scripts/generate_factor_values.py +1287 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/scripts/generate_implicit_constraints.py +511 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/scripts/generate_solver_config.py +618 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/scripts/generate_test_cases.py +2800 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/scripts/generate_test_factors.py +762 -0
- package/assets/ops-direct-invoke/skills/ascendc-st-design/scripts/utils.py +1931 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/SKILL.md +91 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/evals/evals.json +72 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/broadcast/dynamic-ub-broadcast.md +87 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/broadcast/nddma-broadcast.md +199 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/broadcast/onedim.md +152 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/broadcast/patterns.md +165 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/broadcast/ub-broadcast.md +331 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/conversion/patterns.md +261 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/elewise/patterns.md +46 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/elewise/tiling.md +215 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/design/_governance.md +132 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/design/execution.md +469 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/design/resources.md +339 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/design/shape.md +271 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/foundation/composition.md +138 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/foundation/extension_points.md +173 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/foundation/fundamentals.md +245 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/foundation/roofline.md +227 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/implementation_ref.md +201 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/patterns.md +239 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/specialization/feature_flags.md +216 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/specialization/sparse_design.md +198 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/subfamilies/base_design.md +395 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/flashattention/subfamilies/quantization_design.md +233 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/index/gather.md +273 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/index/index_add.md +434 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/index/index_select.md +185 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/index/patterns.md +199 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/index/repeat_interleave.md +251 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/index/scatter.md +341 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/matmul/ascendc-api-gmm-tiling.md +313 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/matmul/ascendc-api-matmul-tiling.md +408 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/matmul/patterns.md +32 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/alg-dichotomy.md +56 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/alg-group-reduce.md +101 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/alg-welford.md +74 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/algorithms.md +35 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/ar-colsplit.md +149 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/ar-fullload.md +151 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/ara-fullload.md +228 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/ara-rowsplit.md +219 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/multi-axis-transform.md +83 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/multi-output-buffer.md +115 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/patterns.md +212 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/tiling-fields.md +94 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/reduction/with-index.md +247 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/scatter/patterns.md +827 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/sort/alg-two-level-mrgsort.md +681 -0
- package/assets/ops-direct-invoke/skills/ascendc-tiling-design/references/sort/patterns.md +249 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/SKILL.md +109 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/assets/coverage_files_question.json +24 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/assets/csv-refactor/template_cmake.txt +46 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/assets/csv-refactor/template_inferdtype.cpp +139 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/assets/csv-refactor/template_inferdtype.csv +5 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/assets/csv-refactor/template_infershape.cpp +122 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/assets/csv-refactor/template_infershape.csv +5 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/assets/csv-refactor/template_param.h +319 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/assets/csv-refactor/template_tiling.cpp +154 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/assets/csv-refactor/template_tiling.csv +5 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/assets/question.json +100 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/assets/template_report.md +112 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/assets/todo.json +24 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/evals/evals.json +198 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/coverage-guide/coverage-extraction.md +78 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/coverage-guide/test-implementation.md +136 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/custom/custom.md +5 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/ops-transformer/csv-format-spec.md +263 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/ops-transformer/csv-refactor-workflow.md +494 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/ops-transformer/legacy-code-extraction.md +325 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/ops-transformer/ops-transformer.md +75 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/ut-guide/build_ut.md +65 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/ut-guide/op-api-ut-guide.md +237 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/ut-guide/op-host-ut-guide.md +240 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/ut-guide/op-kernel-ut-guide.md +198 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/workflow/step1.md +43 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/workflow/step2.md +26 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/workflow/step3.md +51 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/workflow/step4.md +130 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/references/workflow/step5.md +5 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/scripts/extract_dtype_combinations.py +200 -0
- package/assets/ops-direct-invoke/skills/ascendc-ut-develop/scripts/generate_csv_template.py +270 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/SKILL.md +125 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/evals/evals.json +198 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/S1-input-collection.md +125 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/case-mapper/00-execution-order.md +58 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/case-mapper/01-variable-semantics.md +250 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/case-mapper/02-generate-mapper.md +218 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/case-mapper/S5_case_json_schema.md +373 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/case-mapper/S5_mapped_case_schema.md +131 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/case-mapper/s5_case_mapper_template.py +411 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/design-verifier/00-execution-order.md +114 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/source-analysis/00-execution-order.md +291 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/source-analysis/01-code-analyzer.md +121 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/source-analysis/02-interface-analyzer.md +417 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/source-analysis/03-param-derivation.md +45 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/source-analysis/04-test-design-template.md +231 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/source-analysis/05-network-search.md +154 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/task-a/00-overview.md +66 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/task-a/01-step1-tiling.md +114 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/task-a/02-step2-trace.md +81 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/task-a/03-step3-kernel.md +51 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/task-a/04-path-config-schema.md +342 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/task-d/00-execution-order.md +26 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/task-d/01-step1-merge.md +54 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/task-d/02-step2-group.md +44 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/task-d/03-step3-derive.md +416 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/task-d/04-step4-output.md +122 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/task-d/05-step5-gen-cases.md +156 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/ttk-converter/00-execution-order.md +108 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/ttk-converter/01-csv-common.md +33 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/ttk-converter/02-kernel-fields.md +64 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/ttk-converter/03-kernel-mode.md +142 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/references/workflow.md +193 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/_scout_common.py +53 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/assemble_dim_spec.py +232 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/build_param_def.py +134 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/build_path_list.py +520 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/format_json.py +135 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/gen_cases_template.py +196 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/generate_test_design.py +555 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/normalize_op_name.py +157 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/pick_dims.py +173 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/run_ttk_kernel_module.py +750 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/s2p0_verify.py +302 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/s3_task_d_gate.py +365 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/s5_append_empty.py +180 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/s5_check_mapper_outputs.py +292 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/s5_expand_high.py +208 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/scout_k.py +723 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/scout_t.py +983 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/ttk_generate_kernel_csv.py +346 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/ttk_precheck_env.py +248 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/ttk_validate_csv.py +315 -0
- package/assets/ops-direct-invoke/skills/ascendc-whitebox-design/scripts/update_path_list.py +143 -0
- package/assets/ops-direct-invoke/skills/cann-env-setup/SKILL.md +177 -0
- package/assets/ops-direct-invoke/skills/cann-env-setup/evals/evals.json +144 -0
- package/assets/ops-direct-invoke/skills/cann-env-setup/references/env_dependence.md +77 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/SKILL.md +51 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/references/overall-implementation.md +226 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/references/patterns/aclnn-adaptation.md +34 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/references/patterns/aicpu-load-balance-metadata.md +116 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/references/patterns/channel-buffer.md +36 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/references/patterns/compilation-launch.md +144 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/references/patterns/host-validation.md +34 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/references/patterns/layout-tail.md +53 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/references/patterns/synchronization.md +80 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/references/patterns/torch-registration.md +66 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/references/patterns/vf.md +144 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/references/patterns/workspace.md +67 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-best-practice/references/production-code.md +120 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-code-reviewer/SKILL.md +25 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-code-reviewer/core/methodology.md +104 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-code-reviewer/references/readability-rules.md +280 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-code-reviewer/steps/clause-review.md +59 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-code-reviewer/steps/report-write.md +60 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-code-reviewer/workflows/file-review.md +49 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-code-reviewer/workflows/pr-review.md +58 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-env-check/SKILL.md +97 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-env-check/references/checks-and-troubleshooting.md +96 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-env-check/references/env-selected-soc-schema.md +43 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-env-check/references/environment-schema.md +112 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-env-check/scripts/check_env.sh +34 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-env-check/scripts/env_check.py +946 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-env-check/scripts/probe_compile_stage.py +99 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-env-check/scripts/probe_kernel.py +33 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-env-check/tests/test_env_report.py +90 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/SKILL.md +60 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/references/pipeline-design.md +84 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/references/stage-cost-model.md +77 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/templates/DESIGN-BRANCH.md.templ +119 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/templates/INDEX.md.templ +34 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/templates/design/API.md.templ +67 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/templates/design/DevView.md.templ +67 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/templates/design/HostLaunch.md.templ +119 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/templates/design/InferShapeDtype.md.templ +56 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/templates/design/Interface.md.templ +61 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/templates/design/Kernel.md.templ +183 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/templates/design/LaunchData.md.templ +126 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/templates/design/Overview.md.templ +57 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/templates/design/TemplatePartition.md.templ +69 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-op-design/templates/design/Validation.md.templ +80 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/SKILL.md +64 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/assets/case_contract.py +269 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/assets/test.py +571 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/references/cases.md +29 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/references/evidence.md +67 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/references/golden.md +12 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/scripts/build_blackbox_cases.py +536 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/scripts/build_tdd_cases.py +498 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/scripts/build_whitebox_cases.py +183 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/scripts/casebook.py +71 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/scripts/generator_support.py +95 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/scripts/prepare_golden.py +390 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/scripts/recipe_validation.py +144 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/tests/test_evidence_chain.py +339 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/tests/test_skills.py +547 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-test-generator/tests/test_synthesize_dtype.py +85 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-unit-planner/SKILL.md +35 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-unit-planner/references/decomposition-checks.md +46 -0
- package/assets/ops-direct-invoke/skills/cannbot-dsl-unit-planner/references/unit-format.md +77 -0
- package/assets/ops-direct-invoke/skills/npu-arch/SKILL.md +87 -0
- package/assets/ops-direct-invoke/skills/npu-arch/evals/evals.json +356 -0
- package/assets/ops-direct-invoke/skills/npu-arch/references/npu-arch-guide-triton.md +312 -0
- package/assets/ops-direct-invoke/skills/npu-arch/references/npu-arch-guide.md +454 -0
- package/assets/ops-direct-invoke/skills/npu-arch/references/npu-hardware-params.md +248 -0
- package/assets/ops-direct-invoke/skills/npu-arch/references/simt-arch-guide.md +303 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/SKILL.md +41 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/index.md +32 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/api/arithmetic_and_reduce.md +96 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/api/datacopy_best_practices.md +87 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/api/index.md +37 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/api/pipeline_and_buffer.md +87 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/api/precision_and_runtime.md +98 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/api/regbase_api_reference.md +88 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/api/regbase_api_sync.md +112 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/api/regbase_api_whitelist.md +121 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/dev-experience/complexity_and_route_selection.md +113 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/dev-experience/index.md +55 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/dev-experience/process_memory_cards.md +54 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/dev-experience/regbase_build_notes.md +87 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/dev-experience/regbase_kernel_case_notes.md +103 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/dev-experience/regbase_performance_practices.md +92 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/dev-experience/regbase_programming_notes.md +108 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/dev-experience/requirements_analysis_patterns.md +97 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/dev-experience/small_channel_transpose_notes.md +78 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/dev-experience/tiling_review_notes.md +87 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/dev-experience/working_vs_failed_950_cases.md +85 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/index.md +30 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/patterns/broadcast_patterns.md +132 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/patterns/index.md +48 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/patterns/inplace_operator_patterns.md +182 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/patterns/kernel_design_patterns.md +117 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/patterns/reduction_patterns.md +152 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/patterns/regbase_buffer_partitioning.md +122 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/patterns/regbase_kernel_dataflow_patterns.md +164 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/patterns/regbase_operator_patterns.md +138 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/patterns/regbase_sync_patterns.md +113 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/patterns/tiling_input_validation.md +267 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/patterns/tiling_patterns.md +124 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/pitfalls/api_misuse.md +161 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/pitfalls/common_traps.md +199 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/pitfalls/index.md +41 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/pitfalls/precision_failures.md +176 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/pitfalls/precision_guide.md +190 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/pitfalls/regbase_vs_membase_confusions.md +89 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/pitfalls/symptom_to_cause.md +58 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/knowledge/regbase_development_guide.md +290 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/design_sample/flash_attn-arch35-best-practices.md +80 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/design_sample/quant_flash_attn-arch35-best-practices.md +67 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/design_sample/sparse_flash_attention-arch35-best-practices.md +66 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/design_sample/sparse_flash_mla-arch35-best-practices.md +69 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/patterns.md +65 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/advanced.md +37 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/buffer.md +241 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/compute-flow.md +111 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/load-balancing.md +42 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/pipeline-example.md +173 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/pipeline.md +60 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/pre-knowledge.md +197 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/roofline.md +220 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/selection.md +32 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/stage-cost.md +63 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/trait-mla.md +36 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/trait-quantization.md +51 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/FA/references/trait-sparse.md +35 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/README.md +20 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/capability-mapping.md +41 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/dag-buffers.md +285 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/design-spec.md +24 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/examples-adam-code/op_host/adam_apply_one_assign_def.cpp +104 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/examples-adam-code/op_host/arch35/adam_apply_one_assign_tiling_arch35.cpp +572 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/examples-adam-code/op_host/arch35/adam_apply_one_assign_tiling_arch35.h +86 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/examples-adam-code/op_kernel/adam_apply_one_assign.cpp +46 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/examples-adam-code/op_kernel/arch35/adam_apply_one_assign_kernel.h +343 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/examples-adam-code/op_kernel/arch35/adam_apply_one_assign_struct.h +29 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/examples-adam-code/op_kernel/arch35/adam_apply_one_assign_tiling_struct.h +53 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/examples-adam-design/adam_apply_one_assign_analysis.md +143 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/examples-adam-design/adam_apply_one_assign_design.md +2840 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/CMakeLists.txt +328 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/README.md +162 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/op_graph/xdivy_graph_infer.cpp +40 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/op_graph/xdivy_proto.h +44 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/op_host/arch35/xdivy_tiling_arch35.cpp +582 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/op_host/arch35/xdivy_tiling_arch35.h +94 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/op_host/xdivy_def.cpp +62 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/op_host/xdivy_infershape.cpp +60 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/op_kernel/arch35/xdivy_kernel.h +337 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/op_kernel/arch35/xdivy_struct.h +30 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/op_kernel/arch35/xdivy_tiling_struct.h +57 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/op_kernel/xdivy.cpp +44 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/tests/aclnn/CMakeLists.txt +67 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/tests/aclnn/run.sh +57 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/tests/aclnn/test_aclnn.cpp +353 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/tests/geir/CMakeLists.txt +69 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/tests/geir/run.sh +59 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/tests/geir/test_geir.cpp +409 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/tests/tiling/CMakeLists.txt +185 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/tests/tiling/run.sh +62 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/example/xdivy_custom_package/tests/tiling/test_tiling.cpp +355 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/index.md +48 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/kernel-entrance.md +95 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/kernel-helpers.md +208 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/kernel-template.md +617 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/overview.md +250 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/pitfalls.md +50 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/tiling-preprocess.md +487 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/ascendc/tiling.md +374 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/dsl/capability-mapping.md +50 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/dsl/implementation-guide.md +52 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/adapters/dsl/index.md +33 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/generic/capability-contract.md +41 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/generic/compute-flow.md +216 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/generic/index.md +23 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/generic/liveness-fusion.md +200 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/generic/scene.md +68 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/generic/shape-preprocessing.md +209 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/generic/splitting.md +158 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/generic/sync-model.md +79 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/generic/verification.md +131 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/broadcast/patterns.md +62 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/common/broadcast-rules.md +126 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/common/cast-rules.md +414 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/common/datacopypad-rules.md +186 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/common/nddma-rules.md +257 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/common/sync-and-consistency.md +315 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/common/value-depend-process.md +40 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/common/vf-programming-rules.md +150 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/example-routes.yaml +31 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/general-methodology-dsl.md +11 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/general-methodology.md +94 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/binary-tree.md +260 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/capability-mapping.md +49 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/design-spec.md +26 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/CMakeLists.txt +289 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/README.md +147 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/op_graph/euclidean_norm_graph_infer.cpp +39 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/op_graph/euclidean_norm_proto.h +54 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/op_host/arch35/euclidean_norm_tiling_arch35.cpp +1027 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/op_host/arch35/euclidean_norm_tiling_arch35.h +28 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/op_host/euclidean_norm_def.cpp +85 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/op_host/euclidean_norm_infershape.cpp +211 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/op_kernel/arch35/euclidean_norm_apt.cpp +41 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/op_kernel/arch35/euclidean_norm_base.h +911 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/op_kernel/arch35/euclidean_norm_empty.h +141 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/op_kernel/arch35/euclidean_norm_group.h +381 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/op_kernel/arch35/euclidean_norm_tiling_data.h +65 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/op_kernel/arch35/euclidean_norm_tiling_key.h +30 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/tests/aclnn/CMakeLists.txt +59 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/tests/aclnn/run.sh +37 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/tests/aclnn/test_aclnn.cpp +223 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/tests/geir/CMakeLists.txt +84 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/tests/geir/run.sh +49 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/tests/geir/test_geir.cpp +296 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/tests/tiling/CMakeLists.txt +143 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/tests/tiling/run.sh +41 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/example/euclidean_norm_package/tests/tiling/test_tiling.cpp +320 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/highlevel-api.md +146 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/index.md +48 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/kernel-entrance.md +97 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/overview.md +237 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/survival-node.md +74 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/templates/binary-base/dag-buffers.md +612 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/templates/binary-base/kernel-template.md +1213 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/templates/binary-base/tiling.md +511 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/templates/binary-group/dag-buffers.md +209 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/templates/binary-group/kernel-template.md +577 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/templates/binary-group/tiling.md +199 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/templates/empty/dag-buffers.md +292 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/templates/empty/kernel-template.md +349 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/templates/empty/tiling.md +230 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/tiling-preprocess.md +218 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/tuple-reduce.md +72 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/adapters/ascendc/vf-fusion-rules.md +95 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/generic/axis-preprocessing.md +109 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/generic/capability-contract.md +48 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/generic/index.md +23 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/generic/liveness-fusion.md +111 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/generic/scene.md +92 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/generic/splitting.md +230 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/generic/sync-model.md +86 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/generic/tree-reduction.md +160 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/generic/tuple-reduce.md +53 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/patterns.md +62 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/reduction/validate_gates.py +196 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/resolve_example.py +170 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/paradigms/routes.yaml +39 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/references/reference-ops/open_source_operator_table.md +715 -0
- package/assets/ops-direct-invoke/skills/ops-design-paradigms/tests/test_language_route.py +142 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/SKILL.md +249 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/scripts/assemble_cannbotdsl_design.py +156 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/scripts/assemble_workflow.py +571 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/scripts/build_implementation_subgraph.py +320 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/scripts/generate_workflow_guide.py +94 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/scripts/run_workflow.py +121 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/scripts/validate_unit_contracts.py +228 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/ascendc//344/273/243/347/240/201/344/277/256/345/244/215.yaml +39 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/ascendc//346/212/200/346/234/257/347/251/277/345/210/272.yaml +40 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/ascendc//346/226/207/346/241/243/345/207/206/345/244/207.yaml +27 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/ascendc//346/265/213/350/257/225/345/267/245/347/250/213/345/274/200/345/217/221.yaml +33 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/ascendc//347/231/275/347/233/222/346/265/213/350/257/225/350/256/276/350/256/241.yaml +34 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/ascendc//347/237/245/350/257/206/346/220/234/351/233/206.yaml +36 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/ascendc//347/256/227/345/255/220/345/274/200/345/217/221.yaml +47 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/ascendc//351/273/221/347/233/222/346/265/213/350/257/225/350/256/276/350/256/241.yaml +27 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//344/272/244/344/273/230.yaml +15 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//344/273/243/347/240/201/346/243/200/350/247/206.yaml +18 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//345/210/233/345/273/272/345/267/245/344/275/234/345/214/272.yaml +17 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//345/215/225/345/205/203/344/273/273/345/212/241/346/213/206/345/210/206.yaml +22 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//345/215/225/345/205/203/345/256/236/347/216/260.yaml +27 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//345/215/225/345/205/203/351/233/206/346/210/220/345/244/215/351/252/214.yaml +19 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//345/256/236/347/216/260/344/277/256/345/244/215.yaml +21 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//345/256/236/347/216/260/346/243/200/350/247/206.yaml +20 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//345/256/236/347/216/260/351/227/250/347/246/201.yaml +17 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//346/200/247/350/203/275/344/274/230/345/214/226.yaml +22 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//346/226/207/346/241/243/347/224/237/346/210/220.yaml +15 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//346/226/271/346/241/210/350/256/276/350/256/241.yaml +32 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//346/265/213/350/257/225/347/224/237/346/210/220.yaml +29 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//347/216/257/345/242/203/345/260/261/347/273/252.yaml +25 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//347/262/276/345/272/246/351/252/214/350/257/201.yaml +25 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//350/247/204/346/240/274/347/224/237/346/210/220.yaml +18 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//351/234/200/346/261/202/345/210/206/346/236/220.yaml +16 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/cannbot-dsl//351/273/221/347/233/222/347/224/250/344/276/213/350/256/276/350/256/241.yaml +19 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/tasks/common/.gitkeep +0 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/templates//344/273/243/347/240/201/346/243/200/350/247/206/346/212/245/345/221/212.md +70 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/templates//345/212/237/350/203/275/351/252/214/346/224/266/346/212/245/345/221/212.md +80 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/templates//346/265/213/350/257/225/346/211/247/350/241/214/350/256/260/345/275/225.md +73 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/templates//347/231/275/347/233/222/346/265/213/350/257/225/350/256/276/350/256/241.md +37 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/templates//347/237/245/350/257/206/346/220/234/351/233/206.md +25 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/templates//351/252/214/346/224/266/346/212/245/345/221/212.md +39 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/templates//351/273/221/347/233/222/346/265/213/350/257/225/350/256/276/350/256/241.md +130 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/workflows/ascendc/basic.yaml +57 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/workflows/ascendc/feasibility.yaml +13 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/workflows/cannbot-dsl/op-dev.graph-preview.yaml +18 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke/workflows/cannbot-dsl/op-dev.yaml +142 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/SKILL.md +115 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/reference/agents-entry.md +23 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/reference/documentation.md +52 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/reference/ops-direct-invoke.md +67 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/reference/repo-skills.md +85 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/reference/subagents.md +43 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/reference/task-authoring.md +83 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/reference/tests.md +33 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/test/ut/dsl_generation/test.py +499 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/test/ut/support.py +122 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/test/ut/test_all.py +59 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/test/ut/variables/test.py +100 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/test/ut/workflow_execution/test.py +134 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/test/ut/workflow_generation/test.py +457 -0
- package/assets/ops-direct-invoke/skills/ops-direct-invoke-maintain/test/ut/workflow_guide/test.py +91 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/SKILL.md +22 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/evals/evals.json +120 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/references/benchmark_construction.md +77 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/references/float_compute.md +126 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/references/integer_compute.md +105 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/references/non_compute.md +81 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/references/quantization.md +49 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/references/random_generation.md +198 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/references/test_case_generation.md +61 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/scripts/bitwise_match.py +103 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/scripts/integer_compute_check.py +157 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/scripts/mixed_tolerance_check.py +178 -0
- package/assets/ops-direct-invoke/skills/ops-precision-standard/scripts/random_distribution_check.py +247 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/SKILL.md +185 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/evals/evals.json +196 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/SKILL.md +259 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/VERSION +10 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/evals/evals.json +33 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/references/collection-workflow.md +91 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/references/data-contract.md +63 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/references/environment-and-failure.md +82 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/references/validation-and-performance.md +63 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/references/visualization-contract.md +86 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/collect.py +2209 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/collect_discovery.py +987 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/collect_validate.py +607 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/environment_context.py +723 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/estimate_runtime.py +131 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/run_pipeline.py +339 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/runtime_guard.py +589 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/self_check.py +465 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/visualize.py +1004 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/visualize_common.py +258 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/visualize_parsers.py +1555 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/visualize_render.py +286 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/visualize_resolvers.py +1224 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/scripts/visualize_source.py +1288 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/msopprof-visualization/templates/report_template.html +253 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/references/csv_fields_reference.md +260 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/references/msprof-guide.md +252 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/references/msprof-op-guide.md +241 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/references/optimization_quickref.md +265 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/scripts/msprof_perf_summary.py +2469 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/scripts/msprof_profile_run.sh +400 -0
- package/assets/ops-direct-invoke/skills/ops-profiling/scripts/perf_summary.py +448 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/SKILL.md +233 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/evals/evals.json +128 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/references/pc-source-mapping.md +76 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/references/performance-issues-aic.md +557 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/references/performance-issues-aiv.md +674 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/references/performance-issues-general.md +199 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/references/performance-issues-template.md +143 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/references/performance-metrics-reference.md +350 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/references/pipeline-bubble-analysis.md +269 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/references/simulator-advanced.md +174 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/references/troubleshooting.md +105 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/scripts/map_pc_to_source.py +741 -0
- package/assets/ops-direct-invoke/skills/ops-simulator/scripts/trace_bubble_analyzer.py +971 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/SKILL.md +350 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/evals/evals.json +114 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/README.md +71 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/add/spec.yaml +161 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/complex/spec.yaml +154 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/cumsum/spec.yaml +176 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/dropout/spec.yaml +170 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/fused_quant_matmul/spec.yaml +331 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/matmul/spec.yaml +201 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/nonzero/spec.yaml +174 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/reduce_sum/spec.yaml +151 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/reduce_sum_all/spec.yaml +135 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/reduce_sum_fixed/spec.yaml +143 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/softmax/spec.yaml +231 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/examples/split/spec.yaml +160 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/references/accumulation_order.md +63 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/references/error-codes.md +199 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/references/spec-cheatsheet.md +358 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/references/stage-rules.md +476 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/references/usage-scenarios.md +265 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/anti_pattern_registry.yaml +51 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/boundary_min_cases.yaml +215 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/category_enum.yaml +37 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/category_paradigm_map.yaml +145 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/chip_registry.yaml +82 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/error_code_enum.yaml +25 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/framework_oracle_registry.yaml +22 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/invariant_kind_registry.yaml +130 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/machine_check_kind_registry.yaml +84 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/paradigm_enum.yaml +48 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/primitive_whitelist.yaml +67 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/synthesize_pattern_registry.yaml +58 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/registries/tolerance_defaults.yaml +53 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/schemas/op-spec.json +762 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/check_registry_schema_sync.py +167 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/dump_rule_ids.py +168 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/__init__.py +8 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/_ast_sandbox.py +142 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/broadcast.py +270 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/dtype_eval.py +186 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/extreme_inputs_check.py +355 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/formula_eval.py +431 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/formula_oracle_equiv.py +603 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/invariant_exec.py +569 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/oracle_check.py +465 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/parser.py +71 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/promote.py +254 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/shape_eval.py +368 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/stages.py +995 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/evaluators/types.py +130 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/generate_spec.py +1571 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/scripts/validate_spec.py +1848 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/templates/spec.yaml.tmpl +100 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/conftest.py +21 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_attr_resolve.py +72 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_broadcast.py +85 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_doc_drift.py +45 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_dtype_eval.py +163 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_examples.py +54 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_extreme_inputs_check.py +181 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_formula_eval.py +154 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_formula_oracle_equiv.py +281 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_generate_spec.py +98 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_invariant_exec.py +235 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_main_pipeline.py +419 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_oracle.py +255 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_promote.py +127 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_registry_schema_sync.py +32 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_sandbox_escape.py +90 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_shape_eval.py +220 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_shape_literal.py +82 -0
- package/assets/ops-direct-invoke/skills/ops-spec-gen/tests/test_stage2_constraints.py +213 -0
- package/assets/ops-direct-invoke/skills/repo-build-guide/SKILL.md +10 -0
- package/assets/ops-direct-invoke/skills/repo-build-guide/references/build-guide.md +42 -0
- package/assets/ops-direct-invoke/skills/repo-coding-rules/SKILL.md +10 -0
- package/assets/ops-direct-invoke/skills/repo-coding-rules/references/red-lines.md +42 -0
- package/assets/ops-direct-invoke/skills/repo-env-check/SKILL.md +44 -0
- package/assets/ops-direct-invoke/skills/repo-env-check/references//347/216/257/345/242/203/344/277/241/346/201/257.md +42 -0
- package/assets/ops-direct-invoke/skills/repo-knowledge/SKILL.md +12 -0
- package/assets/ops-direct-invoke/skills/repo-knowledge/references/evaluation-contract.md +48 -0
- package/assets/ops-direct-invoke/skills/repo-op-templates/SKILL.md +15 -0
- package/assets/ops-direct-invoke/skills/repo-op-templates/references/operator-template.md +27 -0
- package/assets/ops-direct-invoke/skills/repo-op-templates/references/project-skeleton.md +41 -0
- package/assets/ops-direct-invoke/skills/repo-requirement/SKILL.md +39 -0
- package/assets/ops-direct-invoke/skills/repo-requirement/references/requirement-checklist.md +70 -0
- package/assets/ops-direct-invoke/skills/repo-test-develop/SKILL.md +17 -0
- package/assets/ops-direct-invoke/skills/repo-test-develop/references/blackbox-design.md +30 -0
- package/assets/ops-direct-invoke/skills/repo-test-develop/references/cannbench-integration.md +75 -0
- package/assets/ops-direct-invoke/skills/repo-test-develop/references/precision-and-perf.md +36 -0
- package/assets/ops-direct-invoke/skills/repo-test-develop/references/test-framework.md +75 -0
- package/assets/ops-direct-invoke/skills/repo-test-develop/references/whitebox-design.md +19 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/README.md +145 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/SKILL.md +84 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/scripts/approve_task.py +98 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/scripts/get_task.py +1133 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/scripts/init_status.py +131 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/scripts/link_agent_config.py +89 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/scripts/orchestrator.py +738 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/scripts/poll_workflow.py +392 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/scripts/task_graph.py +144 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/scripts/update_status.py +149 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/scripts/verdict_common.py +103 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/scripts/verdict_fail.py +22 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/scripts/verdict_pass.py +21 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/templates/basic_workflow.yaml +113 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/tests/test_agent_exit.py +91 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/tests/test_approval.py +490 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/tests/test_link_agent_config.py +202 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/tests/test_nested_subgraphs.py +337 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/tests/test_orchestrator.py +1383 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/tests/test_poll_workflow.py +371 -0
- package/assets/ops-direct-invoke/skills/workflow-orchestrator/tests/test_verdict.py +148 -0
- package/cordis.patch.yml +3 -0
- package/icon.svg +1 -0
- package/lib/client.js +384 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +20 -0
- package/locale/en.json +1 -0
- package/locale/zh.json +1 -0
- package/package.json +63 -3
- package/upstream.json +10 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# 场景开发指导:put-all-gather-quant-matmul
|
|
2
|
+
|
|
3
|
+
> 前置阅读:[`design.md`](design.md)(设计合同)。本文给出实现模板锚点与验收清单。
|
|
4
|
+
|
|
5
|
+
## 1. 文件清单与落点(改自官方 AG 算子)
|
|
6
|
+
|
|
7
|
+
| 文件 | 动作 | 契约 |
|
|
8
|
+
|:---|:---|:---|
|
|
9
|
+
| `kernel/{op}_tiling_data.h` | 新建(改自 `all_gather_mx_matmul_udma_tiling_data.h`) | `AllGatherMxMatmulUdmaTilingData` = `QuantMatmulTilingData mmTile` + `CommTilingData commTile`(**单份**——AG 不像 A2A 有独立 scaleCommTilingData,scale 切分由 kernel 从 mmTile.k 重推导 `scaleKLen = CeilDiv(k,64)×2`);`#pragma pack(push,8)`+`alignas(8)`;CommContext 包装在 `Apace::AivComm` 命名空间 + 全局 using 导出 |
|
|
10
|
+
| `kernel/{op}_udma_impl.h` | 新建(改自 `all_gather_mx_matmul_udma_impl.h`) | Impl 类(Init 见 design.md §6 布局)+ `AllGatherProcess()`(AIV:预触发 SetFlag(0) + 逐轮 Commit/Wait/SyncAll/SetFlag(round+1) + Finalize)+ `MatmulProcess()`(AIC:组 KernelParams 委托 matmul kernel)+ `__global__` 入口(impl 头末尾,`KERNEL_TYPE_MIX_AIC_1_1`) |
|
|
11
|
+
| `kernel/{op}_kernel.h` | 新建(改自 `qmm_mx_kernel_ag_udma.h`) | `QmmMxKernelAgUdma` 模板类:HEAD/MAIN/TAIL 三区 FragmentTensor + `ResolveTileCtx` + 延迟构建/`UpdateMainRoundAddrs` + `SetL2Cache`(design.md §5 双 gate) |
|
|
12
|
+
| `src/main.cpp` | 新建(改自 AG ST) | host 推导(design.md §3 公式);AG 无 head_m_size 参数;RunKernel 封装 launch |
|
|
13
|
+
| `scripts/gen_data.py` / `verify_result.py` | 新建 | 纯 numpy 自实现 FP8 编解码(无 ml_dtypes 依赖);每 rank 独立 seed;bit-exact/1-ULP 判定 |
|
|
14
|
+
|
|
15
|
+
## 2. 关键实现锚点(官方源码,改造时逐一对照)
|
|
16
|
+
|
|
17
|
+
| # | 事实 | 锚点 |
|
|
18
|
+
|:---|:---|:---|
|
|
19
|
+
| A1 | 入口 ABI:`__gm__ CommContext*` 首参 + aGM/aScaleGM/bGM/bScaleGM/cGM + tilingData 按值(7 参) | `all_gather_mx_matmul_udma_impl.h:267-271` |
|
|
20
|
+
| A2 | Init 顺序(**与 A2A 不同**):`InitBaseParams(tilingData)` **先于** ctx 提取;dataRegionBytes/scaleRegionBytes 在 ctx 提取后于 Init 内计算 | 同上 `:128-142` |
|
|
21
|
+
| A3 | AIV 循环:守卫 `GetBlockIdx() < rankSize_` 内 `allGatherScale_.Commit(); allGatherData_.Commit(); allGatherData_.Wait<BARRIER_DEVICE>()`;守卫外 `SyncAll<true>()` + `SetFlag(round+1)`;循环外预触发 `SetFlag(0)` | 同上 `:246-263` |
|
|
22
|
+
| A4 | BarrierMode:data `Init<BARRIER_NONE>` + scale `Init<BARRIER_DEVICE>`(scale 的 Wait 承担跨卡 fence;两对象共 channel) | 同上 `:166-171` |
|
|
23
|
+
| A5 | 三区 FragmentTensor:`MakeFragParam(paddedTailM, tailM, ...)` padding 表达;MAIN 延迟构建 + `UpdateAddrList` 换轮 | `qmm_mx_kernel_ag_udma.h:389-398,523-528,532-555` |
|
|
24
|
+
| A6 | matmul 调用:`mmadFrag(blockA, gmBlockB, blockScaleA, gmBlockScaleB, gmBlockBias, cFragAddrs_, mPerRank, tileM, tileCnt, tailM, rankCnt, Ni, singleShape, regionMPos, nPos, 0, blockC)`(17 参契约详见 [`compute.md`](../../fundamentals/compute.md) §7) | 同上 `:403-406` |
|
|
25
|
+
| A7 | WINDOW_LEN 复定义技巧(调度器窗口=1 非侵入式修改):`#define WINDOW_LEN 1L` → include `block_scheduler_qbmm.h` → `#undef` | 同上 `:24-26` |
|
|
26
|
+
| A8 | 尾块拆分核数守卫:`(sch.GetEndBlockIdx()+1) * mTailTile * nTailTile <= GetBlockNum()` 才 `UpdateTailTile` | 同上 `:346-348` |
|
|
27
|
+
| A9 | AIC 等待:waitedMask 位去重(含预触发 id 0)+ 收尾 drain `t <= commTurn` **含端点** | 同上 `:370-373,410-414` |
|
|
28
|
+
|
|
29
|
+
## 3. 验证矩阵
|
|
30
|
+
|
|
31
|
+
| 维度 | 覆盖 | 判据 |
|
|
32
|
+
|:---|:---|:---|
|
|
33
|
+
| 精度 | rank 2/4/8 × 对齐 M × 非对齐 M(2061/3085 类触发尾块 + paddedTailM padding 路径)× K=32 最小对齐 × m<512 收缩 | bit-exact 或 ≤1 ULP(raw uint16 比较) |
|
|
34
|
+
| golden | 每 rank 独立 seed(`BASE_SEED+rank`);B DN 落盘 `[N,K]` 不转置、scaleB `[N,K/32]`;AllGather=concatenate | gen_data 双侧校验(K%32、scale 偶数) |
|
|
35
|
+
| T 维度 | tileCnt=1 串行基线 → 多 tile(三区布局/flag 配对仅在 T>1 暴露) | R9/R5 |
|
|
36
|
+
| R>8 变体 | 扩数组后专测 R=16(越界回归) | design.md §6 硬约束 |
|
|
37
|
+
| perf | msprof + L2 flush + parse_prof(官方口径 avg of card avgs + skill 投产另报跨 rank max) | R15/R20 |
|
|
38
|
+
|
|
39
|
+
## 4. 常见 FAIL 信号与定位
|
|
40
|
+
|
|
41
|
+
| 现象 | 根因 | 修复方向 |
|
|
42
|
+
|:---|:---|:---|
|
|
43
|
+
| R>8 时数据错乱/越界崩溃 | `cFragAddrs_[8]` 等定长数组静默越界 | 扩数组(design.md §6) |
|
|
44
|
+
| 尾块行数错误/padding 区数据泄漏 | paddedTailM/realFragmentSize 表达错 | FragmentParam 成对设置(A5) |
|
|
45
|
+
| HEAD 区等待挂死 | 预触发 SetFlag(0) 丢失或 AIC 特判跳过 id 0 | 保持统一位掩码路径(A9) |
|
|
46
|
+
| 换轮后读到旧数据 | MAIN 换轮未先 wait 或 UpdateAddrList 顺序错 | 先 wait 再 update(A5) |
|
|
47
|
+
| scale 精度错 | gen_data scaleB 布局/换算错(元素数 vs 字节数) | nonSplitAxisSize 换算 = ka/32;DN 落盘约定 |
|
|
48
|
+
| 照抄 A2A 的 SWAT 开关 | AG 需 `SetOptimizeEnable(false)+SetMTailAlignEnable(true)`(A2A 默认相反) | design.md §3 |
|
|
49
|
+
|
|
50
|
+
## 5. 合规映射(本场景重点红线)
|
|
51
|
+
|
|
52
|
+
| 红线 | 本场景落点 |
|
|
53
|
+
|:---|:---|
|
|
54
|
+
| R1/R2 | 入口无 `__schedmode__`;含 `KERNEL_TYPE_MIX_AIC_1_1` |
|
|
55
|
+
| R3 | 变体 dtype 加入口 + host dispatch(官方 AG 单入口仅 E4M3——照抄会被判 FAIL,须自行补) |
|
|
56
|
+
| R4 | `block/`/`tiling/` 零修改(blaze_ext 属 block 层:新变体组件按 R4 纪律评估,优先参数化复用而非改共享层) |
|
|
57
|
+
| R5 | SetFlag(round+1) ↔ WaitFlag 同 idx 配对(含预触发 0) |
|
|
58
|
+
| R12 | UB 静态布局 512×2+32(MakeMemPtr,无 TPipe) |
|
|
59
|
+
| R13 | 通信对象与 TeamBarrier 均 totalJobs=rankSize(官方前 R 核映射) |
|
|
60
|
+
| R14 | 窗口 rank-major data 在前 scale 在后(winOffset=dataRegionBytes) |
|
|
61
|
+
|
|
62
|
+
> 完整 R1-R21 见 [`review-checklist.md`](../../review-checklist.md)。
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# put-all-to-all-quant-matmul 场景设计指导
|
|
2
|
+
|
|
3
|
+
> **定位**:本文件是 `put-all-to-all-quant-matmul` 定制扩展场景的唯一设计指导。设计前核对记录的官方未覆盖项语义命中本场景判据时,默认查阅本文件(规则见 [`../index.md`](../index.md)),并据此完成 DESIGN.md 的定制设计;跨场景拼接设计元素须在 DESIGN.md 中显式论证。
|
|
4
|
+
>
|
|
5
|
+
> **场景边界(重要)**:标准 PUT AllToAll+QuantMatmul 需求由官方 kernel `all_to_all_quant_matmul` 直接覆盖,应判 `apace_native`,**不读取本场景**。本场景仅服务官方 kernel 未覆盖的**变体需求**(新 dtype 组合、bias/scale 融合、不同切分轴或编排形态等),准入前提是官方未覆盖项非空且语义命中本场景判据。
|
|
6
|
+
|
|
7
|
+
## 1. 场景头
|
|
8
|
+
|
|
9
|
+
| 项目 | 内容 |
|
|
10
|
+
|:---|:---|
|
|
11
|
+
| 场景 ID | `put-all-to-all-quant-matmul` |
|
|
12
|
+
| 支持范围 | PUT 模式 AllToAll+QuantMatmul 的变体扩展,输入 A 按 K 轴按 rank 切分(每卡全 M 行 × 本卡 K 段)、输出按 M 轴分布,UDMA 直调 |
|
|
13
|
+
| 官方参考算子 | `all_to_all_quant_matmul`(`apace/kernel/all_to_all_quant_matmul/`,K 轴切分、UDMA 直调范式来源) |
|
|
14
|
+
| 授权修改范围 | 仅 `kernel/<op>/` 下新建文件;禁止修改 `block/`、`tiling/` |
|
|
15
|
+
| 状态 | 已实现 |
|
|
16
|
+
|
|
17
|
+
### 准入条件(须全部满足,且与其他场景互斥)
|
|
18
|
+
|
|
19
|
+
| # | 条件 | 判据来源 |
|
|
20
|
+
|:--|:---|:---|
|
|
21
|
+
| 1 | 通信原语为 AllToAll | Step 2 `requirement_portrait` |
|
|
22
|
+
| 2 | localMatmul 为 QuantMatmul(含 scale) | Step 2 候选组装事实 |
|
|
23
|
+
| 3 | 通信方向为 PUT(通信→计算) | Step 2 需求四要素 |
|
|
24
|
+
| 4 | 核间数据沿 K 轴切分 | Step 2 切分轴事实 |
|
|
25
|
+
| 5 | 通信走 UDMA(非 HCCL windows 直调) | Step 2 ABI 事实(入口含 `CommContext`) |
|
|
26
|
+
| 6 | 存在官方 kernel 未覆盖的 native gap(变体需求) | 设计前核对非空 |
|
|
27
|
+
|
|
28
|
+
## 2. 消费输入
|
|
29
|
+
|
|
30
|
+
| 输入 | 来源 | 用途 |
|
|
31
|
+
|:---|:---|:---|
|
|
32
|
+
| `matmul 链路事实` | 设计前核对(内联于 DESIGN.md §0.3) | 提供 M/N/K、dtype、scale 编码、Blaze matmul 链(`BlockMmad` + `BlockScheduler` + `MatmulWithScaleMx`)与 tiling 基线事实,是切分/Win 区/轮次推导的前提 |
|
|
33
|
+
| 官方未覆盖项 | 设计前核对 | 授权本场景的唯一依据 |
|
|
34
|
+
| 通信接口事实 / 入口 ABI 事实 | 设计前核对 | Win 区容量、入口签名、`CommContext` 传递方式 |
|
|
35
|
+
|
|
36
|
+
## 3. 设计边界(PUT 模式专属合同)
|
|
37
|
+
|
|
38
|
+
### 3.1 通信与切分合同
|
|
39
|
+
|
|
40
|
+
| 项目 | 设计结论 | 事实源 |
|
|
41
|
+
|:---|:---|:---|
|
|
42
|
+
| 通信方向 | PUT:AIV 先推数据到远端 Win 区,AIC 从 Win 区读取计算(通信→计算) | `../../fundamentals/communication.md` §3.2 |
|
|
43
|
+
| 编排形式 | 严格分离或时分复用(**前 R 核通信**为官方惯例:`GetBlockIdx() < rankSize` 守卫包裹 Commit/Wait,`SyncAll<true>()` 与 SetFlag 在守卫外全 AIV 执行) | `../../fundamentals/communication.md` §2 AIV 分核惯例 |
|
|
44
|
+
| 切分轴 | 输入 A 按 K 轴按 rank 切分:每 rank 持有**全部 M 行 × 本卡 K/rankSize 列段**(`[M_total, Ka]`,M_total = m×rankSize);**B 全量复制**(`[K, N]`,R 个 K 段拼接逻辑布局,PUT 模式 B 不切分,见 [`../../fundamentals/architecture.md`](../../fundamentals/architecture.md) §4 B 分布表) | Step 2 `matmul 链路事实` |
|
|
45
|
+
| 通信原语实现 | `CollectiveComm<AllToAll, PUT, AType, TeamBarrier>` → `AllToAllCommPutImpl` | `apace/block/aiv_comm/all_to_all/all_to_all_udma_put.h` |
|
|
46
|
+
|
|
47
|
+
### 3.2 Win 区布局(两段式)
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
本 rank Win 区(commBufferAddrs[rankId])
|
|
51
|
+
├─ data 段:rankSize × rankDataBytes ← winOffset = 0
|
|
52
|
+
└─ scale 段:rankSize × scaleKaSize × axisM ← winOffset = rankSize × rankDataBytes
|
|
53
|
+
rankDataBytes = axisM × axisKa × sizeof(AType)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- data 与 scale 两个通信对象复用同一 Win 区,经 `winOffset` 分段;各对象独立 UB commBuf(512B × 2 + barrier 32B = 1056B)。
|
|
57
|
+
- host 侧必须校验:Win 区需求(data 段 + scale 段)≤ HCCL 内置 buffer 实测容量。
|
|
58
|
+
- 数据区/元数据区分离红线:官方布局 barrier flag 在独立 BARRIER_BUF,Win 数据区从偏移 0 可用;共享布局须按 host 约定偏移跳过头部,三处偏移同源(`../../fundamentals/communication.md` 陷阱 #12)。
|
|
59
|
+
|
|
60
|
+
### 3.3 通信轮次 T 推导
|
|
61
|
+
|
|
62
|
+
| 项目 | 公式/结论 |
|
|
63
|
+
|:---|:---|
|
|
64
|
+
| T(commTurn) | `T = splitAxisTileCnt + splitAxisTailCnt`(`GetCommTurn()` 返回值) |
|
|
65
|
+
| 切分不变量 | `切分轴总元素数 = splitAxisTileSize × splitAxisTileCnt + splitAxisTailSize × splitAxisTailCnt` |
|
|
66
|
+
| 两阶段策略 | 精度调试 `tileCnt=1` 串行基线;性能调优扫描 `{1,2,4,8,16}`(官方 cases.csv 实测档位 tileCnt∈[2,8];上限受下方 commTurn 约束) |
|
|
67
|
+
| 硬上限 | flagId 直接取轮次 tid 时轮次索引 < FLAG_ID_MAX(16) 且避开 SyncAll 保留区(`SyncAll<true>` 占 14,实际安全上界 13;本场景每轮 `SyncAll<true>`);`waitedMask` 为 uint32 → 通信 tile 总数 ≤ 32 |
|
|
68
|
+
| UDMA 可靠性 | 单轮 PUT 大小**无官方硬上限**(bring-up 期过大单轮曾见间歇失败,边界未定——512KB 量级系 bring-up 经验值;同平台更大单轮亦有稳定实例)。风险提示级:大单轮按 case 复核(连续多轮精度 + 重复 launch 一致性),不作 host 强制拒绝;间歇 FAIL 时优先增大 T(`../../fundamentals/communication.md` 陷阱 #13;R14 口径) |
|
|
69
|
+
|
|
70
|
+
### 3.4 Flag 编排(PUT)
|
|
71
|
+
|
|
72
|
+
| 项目 | AIV(通信侧) | AIC(计算侧) |
|
|
73
|
+
|:---|:---|:---|
|
|
74
|
+
| 逐轮动作 | `Commit(scale) → Commit(data) → Wait<BARRIER_DEVICE>() → SyncAll<true>() → SetFlag<0x2, PIPE_MTE3>(tid)` | `WaitFlag<0x2, PIPE_MTE2>(tid)`(经 `UdmaCommWaitPolicy::WaitTile`)后从 Win 读 A[tid] → Matmul |
|
|
75
|
+
| 依赖计算 | — | `CalcDependTileIdx(mPos + blockM - 1, ...)` 推导依赖 tile,`waitedMask` 按位去重,循环末尾尾部兜底 |
|
|
76
|
+
| self 跳过 | DoCommit 跳过 `targetRankId == rankId`;DoWait 仅非 self 执行 `Drain`,barrier 含 self | self 段经本地 GM/Win 直读 |
|
|
77
|
+
| 回压 | 无(PUT 不需要环形回压) | — |
|
|
78
|
+
|
|
79
|
+
## 4. 联合合同(通信 × 计算组装)
|
|
80
|
+
|
|
81
|
+
| 项目 | 设计结论 |
|
|
82
|
+
|:---|:---|
|
|
83
|
+
| 组装形态 | AIV 驱动 UDMA PUT 与 AIC Blaze matmul 在同一 kernel 内逐 tile 流水;`Commit()` 非阻塞是重叠关键 |
|
|
84
|
+
| localMatmul 模式 | 默认 `0`(REMOTE-only,官网 ST 基线);通算并行选 `1`(LOCAL+REMOTE+AtomicAdd,须加 `PipeBarrier<PIPE_ALL>` 修复);精度优先选 `2`(DEFERRED_SYNC,仅 UDMA impl 可达,L0C 须满足 `baseM × baseN × 4B ≤ 128/256KB`) |
|
|
85
|
+
| 累加语义 | 各 rank 部分和在同一 L0C FP32 累加器累加,计满 `splitKNum` 触发单次 fixpipe → C;L0C 需求与 rankSize 无关 |
|
|
86
|
+
| 核配比 | `KERNEL_TYPE_MIX_AIC_1_1`,禁止 `__schedmode__(1)`;通信核数 = rankSize。TeamBarrier `totalJobs = rankSize`(官方 A2A/AG 惯例:前 R 个通信核各以 `GetBlockIdx()` 作 jobIndex 参与,`teamBarrier_.Init(buf, ctx, rankSize, GetBlockIdx())`,CrossDevice 由 `Wait<BARRIER_DEVICE>` 内建触发,分布式轮询覆盖全部 rank) |
|
|
87
|
+
| 同步面 | 单向通道 AIV→AIC(通信就绪 flag);PUT 无 AIC→AIV 回压 |
|
|
88
|
+
|
|
89
|
+
## 5. Step 3 输入/来源前提
|
|
90
|
+
|
|
91
|
+
| # | 前提 | 不满足时 |
|
|
92
|
+
|:--|:---|:---|
|
|
93
|
+
| 1 | 设计前核对事实已**内联记录于 DESIGN.md §0.3**(含 `matmul 链路事实`、官方未覆盖项非空);独立 `apace-investigation-report.md` 仅在委托方明确要求时才需(见 step2-investigation.md) | 返回 Step 2 补充调查(最多一次) |
|
|
94
|
+
| 2 | 场景语义命中本场景判据 | 零命中/多命中 → `unsupported` |
|
|
95
|
+
| 3 | 官方参考算子 `all_to_all_quant_matmul` 源码可读(UDMA impl、tiling_data、ST) | 停止并澄清 |
|
|
96
|
+
| 4 | 已读 `../../fundamentals/communication.md`、`../../fundamentals/fusion.md` §2/§3/§4/§5、`../../operator-design/operator-anatomy.md` §3 | 补齐后再设计 |
|
|
97
|
+
|
|
98
|
+
## 6. 验证合同摘要
|
|
99
|
+
|
|
100
|
+
| 项目 | 合同要点 |
|
|
101
|
+
|:---|:---|
|
|
102
|
+
| golden 语义 | 设全局逻辑 M 总量 `M_total = m × rankSize`(m 为单卡输出行数)。**输入分布**:每卡持有 A 的本卡 K 段 `[M_total, K/rankSize]`(**全部 M 行 × 本卡 K 列段**,K 轴切分)+ B 全量复制 `[K, N]`(R 段 K 段拼接布局,各卡一致)。**通信语义**:本卡 A 的第 r 个 M 行块(m 行)PUT 给 rank r;收齐后本卡持有自己 m 行对应的全部 K 段。**输出分布**:每卡输出本卡 M 段 `[m, N]`(全局输出 `[M_total, N]` 按 M 轴分布,**不是每卡完整 C**)。golden 公式:`C_r = concat_K(各源 rank 发来的行块) × B`(K 段拼接后单次 matmul,非逐 rank 输出求和)。依据:官方 ST `gen_data.py` `a_local=(M_total, Ka)` + chunk 按 M 行块分发、`main.cpp` 输出 buffer 为 `m×n` |
|
|
103
|
+
| 量化解码 | 设备输入为 MX/FP8 编码字节时,golden 须从最终写入设备的实际字节解码计算;ScaleB 为 DN 布局列主序(host 侧按 `[N, K/32]` C-order 写入,官方 gen_data 已修复此坑) |
|
|
104
|
+
| 精度基线 | 先 `tileCnt=1` 串行基线 PASS,再扫描 tileCnt;nonfinite 门与 dtype 容差按 DESIGN §4.2 |
|
|
105
|
+
| 多卡矩阵 | rankSize 端点 × shape(对齐/非对齐/tail)× tileCnt × dtype 组合 |
|
|
106
|
+
| 性能基线 | 须含 L2 flush 证据;Step 3 不实现、不运行设备、不写设备 PASS |
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# put-all-to-all-quant-matmul 开发指导
|
|
2
|
+
|
|
3
|
+
> **场景 ID**:`put-all-to-all-quant-matmul`(PUT 模式,AllToAll + QuantMatmul 融合,K 轴切分,UDMA 直调)。
|
|
4
|
+
> 本文档在 Step 3 设计冻结后编译进项目级 PLAN:`implementation_route=apace_custom`、`selected_scenario=put-all-to-all-quant-matmul`,生成 `operators/<operator_name>/docs/PLAN.md`(模板见 [`plan-template.md`](../../operator-design/plan-template.md))。
|
|
5
|
+
> 官方参考:`all_to_all_quant_matmul`(CANN 内置 apace `kernel/all_to_all_quant_matmul/`),经 CMake `-I` 直引,零复制。
|
|
6
|
+
|
|
7
|
+
## 1. 有序开发动作(Step 4 只执行 PLAN)
|
|
8
|
+
|
|
9
|
+
Step 4 不重新设计、不切换候选、不扩大支持域,仅按 PLAN §9.3 `ordered_actions` 顺序执行:
|
|
10
|
+
|
|
11
|
+
| 顺序 | 动作 | 要点 | 验证 |
|
|
12
|
+
|:---|:---|:---|:---|
|
|
13
|
+
| A1 | 复用官方参考的 Scheduler/Kernel owner 基座 | 以 `all_to_all_quant_matmul` 的 `BlockScheduler`/`BlockMmad` 编排与 `{op}_udma_impl.h`(`Init`/`Run`/`RunAllToAll`/`RunMatmul`/`SetupParams`)为锚点起手,禁止从零写文件 | 静态走查,锚点逐一核对 |
|
|
14
|
+
| A2 | 适配通信对象 `AllToAllCommPutImpl` | 通信对象数 = 2(A data + A scale)共享同一 channel;scale 对象 winOffset = `rankSize × rankDataBytes`;UB 双 commBuf(各 512B)+ barrierBuf;AIV 先 → AIC 后 | 对照 [`communication.md`](../../fundamentals/communication.md) 四段式契约 |
|
|
15
|
+
| A3 | 适配计算内核(`QuantMatmulMxKernel` 或 FragmentTensor) | PUT 默认 vendor 复用 `QuantMatmulMxKernel`(Blaze `BlockMmad` + `BlockScheduler`);改 FragmentTensor 为例外须 SCALAR 论证([`fusion.md`](../../fundamentals/fusion.md) §6.2.2);K 轴切分:`splitKNum`、`MakeLayoutB{}(rankSize*K, N)`、ProblemShape N = 完整 axisN | kernel 编译通过 |
|
|
16
|
+
| A4 | 在具体 `__mix__` 入口补全 C-ready/V-done/slot/final drain | 入口含 `KERNEL_TYPE_MIX_AIC_1_1`(禁 `__schedmode__(1)`);CrossCore flag idx 配对(C-ready Set ↔ V-done Wait);slot 环形偏移与 `tileMaxByteSize_` 同源;`DoWait` 末轮 final drain(self rank 跳过 Drain 但仍执行 barrier) | 冒烟:单 rank 输出非全 0 |
|
|
17
|
+
|
|
18
|
+
失败回退:实现层问题 Step 4 内修复;需改通信方向/Win/Flag 语义/支持域 → 记录 `design_issue` 回 Step 3。
|
|
19
|
+
|
|
20
|
+
## 2. 文件级契约([MODIFY]/[REUSE])
|
|
21
|
+
|
|
22
|
+
| 文件 | 动作 | 契约 |
|
|
23
|
+
|:---|:---|:---|
|
|
24
|
+
| `kernel/{op}_tiling_data.h` | 新建 | tiling 结构 + `CommContext`(`CommUdmaContext`+`CommUbmemContext`);含 `localMatmul` 字段;`#pragma pack(push, 8)`+`alignas(8)`,字段顺序即 host-device 契约 |
|
|
25
|
+
| `kernel/{op}_udma_impl.h` | 新建(改自参考 impl) | A1/A2 落地处;`localMatmul==1` 时 `RunLocalMatmul()` → `PipeBarrier<PIPE_ALL>()` → `RunMatmul()`(推荐修复,防 aclError:507015) |
|
|
26
|
+
| `kernel/{op}_quant_matmul_mx_kernel.h` | 新建或直引 | A3 落地处;`LocalParams` 含 `localMatmul`/`matmulMode`/`splitKNum` |
|
|
27
|
+
| `src/kernel_launcher.h` | 新建 | 4 个 dtype 变体入口(E4M3E4M3/E5M2E5M2/E4M3E5M2/E5M2E4M3),每个含 `KERNEL_TYPE_MIX_AIC_1_1` |
|
|
28
|
+
| `src/main.cpp` | 新建(改自参考 ST) | 运行期 dtype dispatch(本 skill 新增红线/生产教训——⚠️ 官方参考 ST 本身**硬编码只 launch E4M3E4M3 入口**,4 变体定义未使用,照抄官方会被 R3 判 FAIL,须自行补 dispatch);显式 `localMatmul` 赋值;`splitKNum` 规则:localMatmul=1 → `rankSize-1`,0/2 → `rankSize`;host 前置校验在 fork/建链前 |
|
|
29
|
+
| `src/root_info_exchanger.h`、`src/utils.h` | copy_and_adapt | 从参考算子 ST 复制 |
|
|
30
|
+
| `scripts/gen_data.py` / `verify_result.py` | 新建 | golden 语义先行(输入 K 轴切分:每卡全 M 行 × 本卡 K 段 `[M_total, Ka]`;输出 M 轴分布 `[m, N]`,见 design.md §6);golden float32 高精度路径;固定种子;host 约束双侧校验 |
|
|
31
|
+
| `CMakeLists.txt` / `cases.csv` / `run.sh` | 新建 | `APACE_ROOT` 指 CANN 内置 apace;`hccl_fwk` 用 `--no-as-needed` 包裹;cases.csv 覆盖 T=1/T>1、小 rank、tail 非整除、tile 粒度扫描 |
|
|
32
|
+
| apace 共享层(`block/` `tiling/` `basic/` `utils/`) | [REUSE] 只读 | 禁止复制/篡改,CMake `-I` 直引;算子目录出现共享层副本即 FAIL |
|
|
33
|
+
|
|
34
|
+
## 3. 验证矩阵(PUT AllToAll 专属)
|
|
35
|
+
|
|
36
|
+
| 维度 | 要求 | 达标条件 |
|
|
37
|
+
|:---|:---|:---|
|
|
38
|
+
| 精度标准 | `verify_result.py` | `rtol=atol=1e-2`(all_to_all 系容差),多 rank × 多 shape 全 PASS |
|
|
39
|
+
| localMatmul 三态 | 0 / 1 / 2 分支 | localMatmul=1 含 PipeBarrier;三态精度均过 |
|
|
40
|
+
| dtype 覆盖 | 4 变体 | E4M3/E5M2 四组合各自 PASS(dispatch 错误特征:matched_ratio=0% + 误差 36-59%) |
|
|
41
|
+
| 通信对象 | data + scale 双对象 | winOffset 同源;self rank 跳过 Drain 但 barrier 保留 |
|
|
42
|
+
| 单轮 PUT 大小 | ⚠️ 风险提示(非硬上限) | bring-up 期先用小单轮跑通;放大后按 case 复核(无官方上限,边界未定) |
|
|
43
|
+
| tileCnt 策略 | 精度调试期 tileCnt=1 串行基线 → 性能期扫 {1,2,4,8,16} | 切换 tileCnt 必须重调 `GetTilingData`;档位上限受 R9 口径约束(flagId=tid 时轮次索引 < 16 且避开 SyncAll 保留区 14 → 安全上界 13,见 design.md §3.3) |
|
|
44
|
+
| 性能门槛(R15) | 真实大 shape × R=2/4 双档 × 三路径对标归档 | 仅 toy shape 基线 = FAIL |
|
|
45
|
+
| 性能采集 | msprof + 每轮 L2 flush 实接线 | flush kernel 记录数 == 轮数 |
|
|
46
|
+
|
|
47
|
+
## 4. 常见 FAIL 信号与定位
|
|
48
|
+
|
|
49
|
+
| 现象 | 根因 | 修复方向 |
|
|
50
|
+
|:---|:---|:---|
|
|
51
|
+
| 死锁 aclError:507015 | localMatmul=1 缺 PipeBarrier,或误加 schedmode | 补 `PipeBarrier<PIPE_ALL>()`;删调度属性 |
|
|
52
|
+
| E5M2 变体 matched_ratio=0% | dispatch 硬编码 E4M3 入口,字节流被错误模板解释 | 4 变体入口 + host 运行期 dispatch 宏 |
|
|
53
|
+
| 精度不收敛、golden 全错 | golden 切分轴/每卡语义写错(输入 K 轴切分、输出 M 轴分布——勿把输出当完整 C) | 先修 gen_data 再怀疑 kernel |
|
|
54
|
+
| 精度"假通过"、大 shape 紊乱 | PUT 数据覆盖 Win 区元数据/barrier 区 | 数据/元数据偏移同源(R14) |
|
|
55
|
+
| 通信时间 ≈ R × 单 target | 通信被臆造约束退化为通信对象 totalJobs=1 串行 PUT | 通信对象改 totalJobs=rankSize(R13 前半) |
|
|
56
|
+
| 运行期间歇 FAIL | 单轮 PUT 字节过大(经验阈值 ~512KB 量级,非硬上限) | 按 R14 风险提示复核单轮大小 + 调小 tile 粒度 |
|
|
57
|
+
|
|
58
|
+
## 5. 合规映射(本场景重点红线)
|
|
59
|
+
|
|
60
|
+
| 红线 | 本场景落点 |
|
|
61
|
+
|:---|:---|
|
|
62
|
+
| R1/R2 | 禁 `__schedmode__(1)`/`core_ratio`;每个入口含 `KERNEL_TYPE_MIX_AIC_1_1` |
|
|
63
|
+
| R3 | PUT = 4 dtype 变体入口 + host 运行期 dispatch |
|
|
64
|
+
| R4 | `block/`/`tiling/` 与 CANN 内置版本 diff 一致,零复制 |
|
|
65
|
+
| R5 | C-ready/V-done flag idx 跨核配对(含计数式) |
|
|
66
|
+
| R6 | UDMA 模式入口含 `__gm__ CommContext*` |
|
|
67
|
+
| R7/R8 | 禁 `AscendC::Matmul`、禁 `Hccl::*` 高阶 API |
|
|
68
|
+
| R11 | host 前置校验(整除/对齐/核数下限/Win 容量/flag 峰值),main.cpp 与 gen_data.py 双侧 |
|
|
69
|
+
| R12 | commBuf/barrierBuf 与 TPipe buffer 物理隔离(静态偏移) |
|
|
70
|
+
| R13 | 通信对象 `totalJobs=rankSize` 多核并行 PUT;TeamBarrier `totalJobs` 官方为 `rankSize`(`teamBarrier_.Init(buf, ctx, rankSize, GetBlockIdx())`,前 R 核映射下 CrossDevice 由 `Wait<BARRIER_DEVICE>` 内建触发)。compute-first 后 R 核映射的自研编排可采用 TeamBarrier totalJobs=1 + 显式 CrossDevice 替代,两种映射不得混用 |
|
|
71
|
+
| R14 | Win 数据/元数据偏移 host/kernel 同源(硬红线);单轮 PUT 大小按 case 复核(风险提示) |
|
|
72
|
+
| R15/R20 | 投产级性能门槛 + L2 flush 实接线(见 §3 验证矩阵) |
|
|
73
|
+
|
|
74
|
+
> 完整 R1-R20 与 FAIL 诊断见 [`review-checklist.md`](../../review-checklist.md);改造食谱锚点见 [`development-guide.md`](../../operator-design/development-guide.md) §3.2/§3.3。
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# apace 路线失败导航(Failure Navigation)
|
|
2
|
+
|
|
3
|
+
> 按**现象**定位排查方向。每行给出首个失败层分类与应查阅的文档锚点。
|
|
4
|
+
> 本表只做路由:根因细节、修复手法与红线定义以目标文档为准,不在此重复。
|
|
5
|
+
|
|
6
|
+
## 首个失败层分类
|
|
7
|
+
|
|
8
|
+
| 分类 | 含义 | 典型信号 |
|
|
9
|
+
|:---|:---|:---|
|
|
10
|
+
| 编译 | 编译/链接阶段失败,未进入设备执行 | 编译报错、API 符号缺失、模板实例化失败 |
|
|
11
|
+
| ABI | host/kernel 接口与二进制契约不一致 | 入口变体错配、dtype 分发错误、参数布局漂移、host 前置校验缺失导致非法配置下发 |
|
|
12
|
+
| 通信时序 | 通信与计算的先后/配对时序错误 | 读到未就绪数据、GET/PUT 可见性错乱、框架原语语义错配 |
|
|
13
|
+
| 同步 | CrossCore flag / 事件 / barrier 配对或计数错误 | 死锁(507015/507014)、flagId 溢出、删同步后偶发错误 |
|
|
14
|
+
| 设备精度 | 设备侧输出与 golden 不符 | matched_ratio 不达标、误差不收敛、部分输出为零 |
|
|
15
|
+
| 性能 | 精度已 PASS,性能不达标或数据不可信 | cube_utilization 低、归约耗时高、perf 数据不可复现 |
|
|
16
|
+
| 通信建链 | HCCL/URMA window 资源建链阶段失败 | Win 分配失败、rank 建链超时、CommContext 与引擎不匹配 |
|
|
17
|
+
|
|
18
|
+
## 失败导航表
|
|
19
|
+
|
|
20
|
+
| 现象 | 首个失败层 | 去哪里查 |
|
|
21
|
+
|:---|:---|:---|
|
|
22
|
+
| 死锁(aclError:507015) | 同步 | [`../review-checklist.md`](../review-checklist.md) R1/R5/R12;[`../fundamentals/architecture.md`](../fundamentals/architecture.md) §10 ①(禁 schedmode);[`../fundamentals/communication.md`](../fundamentals/communication.md) 陷阱 #9(UB 静态区被 TPipe 覆盖);[`../fundamentals/fusion.md`](../fundamentals/fusion.md) §5(MTE 未排空路径鉴别) |
|
|
23
|
+
| localMatmul=1 MTE 异常 | 同步 | [`../fundamentals/fusion.md`](../fundamentals/fusion.md) §5.4(RunLocalMatmul 与 RunMatmul 之间补 `PipeBarrier<PIPE_ALL>()`) |
|
|
24
|
+
| 精度不达标 | 设备精度 | [`../fundamentals/fusion.md`](../fundamentals/fusion.md) §5(AllToAll 语义)+ §6.2.6(归约 float32 累加);[`../workflow_integration.md`](../workflow_integration.md) Step 6(精度验收流程);[`../review-checklist.md`](../review-checklist.md) 常见 FAIL 原因 |
|
|
25
|
+
| golden 全错、误差不收敛 | 设备精度 | [`../workflow_integration.md`](../workflow_integration.md) Step 2 §golden 语义(先核对每卡输入/输出与切分轴,再怀疑 kernel);[`../operator-design/host-and-testing.md`](../operator-design/host-and-testing.md)(gen_data 工程侧);先修 golden 再怀疑 kernel |
|
|
26
|
+
| T=1 全 PASS、T>1 精度错 | 设备精度 | [`../fundamentals/fusion.md`](../fundamentals/fusion.md) §3.3/§6.2.3(多 tile 布局与 flag 逐轮计数配对);按 tile/轮次定位超差分布 |
|
|
27
|
+
| 编译失败 / API 符号缺失 | 编译 | [`../operator-design/development-guide.md`](../operator-design/development-guide.md)(工程搭建与依赖);核对 CANN 内置 apace 事实源版本 |
|
|
28
|
+
| Blaze matmul 排错 | 编译 | [`../fundamentals/compute.md`](../fundamentals/compute.md) §8 排错速查;[`../review-checklist.md`](../review-checklist.md) R7(禁 `AscendC::Matmul` 高阶 API) |
|
|
29
|
+
| 通信时序错误 | 通信时序 | [`../fundamentals/communication.md`](../fundamentals/communication.md) 陷阱表;[`../fundamentals/fusion.md`](../fundamentals/fusion.md) §3(GET/PUT flag 编排不变量) |
|
|
30
|
+
| flagId 计数器溢出(硬件异常中断) | 同步 | [`../fundamentals/fusion.md`](../fundamentals/fusion.md) §3.3/§6.2.3(flagId ∈ [0,15] 硬件数量上限 + Set/Wait 严格配对规避;计数深度按 R9 口径不设数值拒绝);[`../review-checklist.md`](../review-checklist.md) R9 |
|
|
31
|
+
| tail tile 非对齐精度问题 | 设备精度 | [`../fundamentals/fusion.md`](../fundamentals/fusion.md) §6.2.7(尾块策略 A:padding 对齐 + realFragmentSize 限读);[`optimization-playbook.md`](optimization-playbook.md) §4 |
|
|
32
|
+
| 归约性能差 | 性能 | [`../fundamentals/fusion.md`](../fundamentals/fusion.md) §6.2.6(多行批量归约 + 2D DataCopyPad);[`optimization-playbook.md`](optimization-playbook.md) §2 |
|
|
33
|
+
| 死锁(aclError:507014,归约路径) | 同步 | [`../fundamentals/fusion.md`](../fundamentals/fusion.md) §6.2.6 纪律 1 + [`../scenarios/compute-first-reduce-scatter/development.md`](../scenarios/compute-first-reduce-scatter/development.md) §5.3 事件模板(四类 HardEvent 同迭代配对 + 残留事件消费);[`../review-checklist.md`](../review-checklist.md) R19 |
|
|
34
|
+
| E5M2 变体精度全错 | ABI | [`../review-checklist.md`](../review-checklist.md) R3;[`../operator-design/development-guide.md`](../operator-design/development-guide.md) §3.5(4 变体入口 + host 运行期 dtype dispatch);[`../operator-design/operator-anatomy.md`](../operator-design/operator-anatomy.md) |
|
|
35
|
+
| N>redUbN 时部分输出为零 | 设备精度 | [`../fundamentals/fusion.md`](../fundamentals/fusion.md) §6.2.6 纪律 3(2D DataCopyPad strided 隐式上限,redUbM ≤ 32 或 1D 退化) |
|
|
36
|
+
| 归约结果系统性错误 | 设备精度 | [`../fundamentals/fusion.md`](../fundamentals/fusion.md) §6.2.6 纪律 2(禁 in-place BF16→FP32 Cast,独立 srcFP32 双缓冲);[`../review-checklist.md`](../review-checklist.md) R18 |
|
|
37
|
+
| perf 数据不可复现 / MTE2 带宽虚高 | 性能 | [`../operator-design/host-and-testing.md`](../operator-design/host-and-testing.md) §4(L2 flush 实接线模板);[`../review-checklist.md`](../review-checklist.md) R20 |
|
|
38
|
+
| 大 shape 无法运行 / 间歇 FAIL | ABI | [`../operator-design/development-guide.md`](../operator-design/development-guide.md) §3.5(host 前置校验:正确性类整除/对齐/核数/Win 容量;单轮 PUT 大小按 R14 风险提示复核,非强制拒绝;R ≤ 32 为 fragment 数上限,R×T 无硬约束);[`../fundamentals/communication.md`](../fundamentals/communication.md) 陷阱 #12/#13 |
|
|
39
|
+
| cube_utilization 低 | 性能 | [`optimization-playbook.md`](optimization-playbook.md) §2(CUBE bound 判据与手法);[`../fundamentals/fusion.md`](../fundamentals/fusion.md) §6.2.2(R×T 子调用 SCALAR 主 bound 特征) |
|
|
40
|
+
| GET 模式 4+rank 不稳定 | 通信时序 | [`../fundamentals/fusion.md`](../fundamentals/fusion.md) §3.4/§6.2(GET 环形回压契约与 4+rank 数据可见性风险,计算在前场景优先 PUT);[`../fundamentals/communication.md`](../fundamentals/communication.md) GET 契约 |
|
|
41
|
+
| 仅非对齐 shape 精度 FAIL | 设备精度 | [`optimization-playbook.md`](optimization-playbook.md) §4(tail 路径排查模式);[`../fundamentals/fusion.md`](../fundamentals/fusion.md) §6.2.7 |
|
|
42
|
+
| 精度误差随 K 放大 | 设备精度 | [`optimization-playbook.md`](optimization-playbook.md) §4(累加位宽不足,先高精度中间累加保底) |
|
|
43
|
+
| 重构后某维度性能退化 | 性能 | [`optimization-playbook.md`](optimization-playbook.md) §4/§2(数同步次数,批量摊薄) |
|
|
44
|
+
| 复用框架通信原语大面积错数据 | 通信时序 | [`optimization-playbook.md`](optimization-playbook.md) §4/§3(work partition 地址偏移语义核对,targetRank vs sourceRank) |
|
|
45
|
+
| 删减 SyncAll 后 NaN/偶发错误 | 同步 | [`optimization-playbook.md`](optimization-playbook.md) §4(同步是正确性保障不可裁剪);[`../fundamentals/fusion.md`](../fundamentals/fusion.md) §3 |
|
|
46
|
+
| 性能优化无从下手/无收益 | 性能 | [`optimization-playbook.md`](optimization-playbook.md) §1(阶段路径,勿跳级)/§2(现象→手法速查)/§5(实验纪律) |
|
|
47
|
+
| 静态分析判定"不可行"但有争议 | 性能 | [`optimization-playbook.md`](optimization-playbook.md) §5(实证复核原则:最小实验复核,"原假设 vs 实测结果"对照归档) |
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# apace 算子优化手册(Optimization Playbook)
|
|
2
|
+
|
|
3
|
+
> 本文档沉淀 apace 算子从"能跑"到"跑好"的通用方法论:开发/优化阶段路径、现象→手法速查、失败案例教训、排查模式与实验纪律。内容来自生产算子的多轮优化演进复盘,已全部泛化——不绑定任何单一算子的实现细节与调参数值。
|
|
4
|
+
>
|
|
5
|
+
> 性能采集方法(msprof/L2 flush/多卡后处理)见 [`../shared/profiling_mc2.md`](../../../shared/profiling_mc2.md);tileCnt 两阶段策略见 [`../shared/pipeline_tuning.md`](../../../shared/pipeline_tuning.md)。本文档不重复,只讲"什么时候用什么手法、怎么验证、怎么避坑"。
|
|
6
|
+
|
|
7
|
+
## 目录
|
|
8
|
+
|
|
9
|
+
1. [开发/优化阶段路径](#1-开发优化阶段路径)
|
|
10
|
+
2. [现象→手法→触发条件速查](#2-现象手法触发条件速查)
|
|
11
|
+
3. [失败案例教训(已证伪的方向)](#3-失败案例教训已证伪的方向)
|
|
12
|
+
4. [通用排查模式(现象→根因→修法)](#4-通用排查模式现象根因修法)
|
|
13
|
+
5. [实验纪律](#5-实验纪律)
|
|
14
|
+
6. [评审意见落地模式](#6-评审意见落地模式)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 1. 开发/优化阶段路径
|
|
19
|
+
|
|
20
|
+
apace 算子的成熟过程遵循固定顺序,**不要跳级**(如在精度未达标时做性能优化,或在串行基线未建立时做流水重叠):
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
① 可运行基线(精度优先,tileCnt=1 串行)
|
|
24
|
+
→ ② 精度修复(多 shape × 多 rank 全量 PASS)
|
|
25
|
+
→ ③ 验收归档基线性能(msprof round_001,作为后续所有对比的锚点)
|
|
26
|
+
→ ④ 架构级优化:通算流水重叠(收益最大,先做)
|
|
27
|
+
→ ⑤ 参数级调优:tiling / tile 粒度 / 通信粒度
|
|
28
|
+
→ ⑥ 热点子模块重写:op_summary 定位占比最高的子模块
|
|
29
|
+
→ ⑦ 微优化:双缓冲、去冗余指令、自适应参数
|
|
30
|
+
→ ⑧ 穷尽分析:确认无剩余空间,失败尝试同样归档
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
各阶段判据:
|
|
34
|
+
|
|
35
|
+
| 阶段 | 进入条件 | 退出条件 |
|
|
36
|
+
|:---|:---|:---|
|
|
37
|
+
| ① 基线 | 工程搭建完成 | 单 rank 冒烟输出非全 0 |
|
|
38
|
+
| ② 精度 | 基线可运行 | 全量用例 PASS(含 tail 非对齐、多 commTurn 场景) |
|
|
39
|
+
| ③ 基线性能 | 精度全 PASS | msprof 数据归档到 `docs/perf/round_001/` |
|
|
40
|
+
| ④ 流水重叠 | 基线性能已归档 | 通信耗时被计算掩盖(AIV time ≤ AIC time) |
|
|
41
|
+
| ⑤ 参数调优 | 流水已建立 | tileCnt/tile 粒度扫描到 Task Duration 最小值 |
|
|
42
|
+
| ⑥~⑦ 模块优化 | op_summary 有明确热点 | 单轮收益 ≥ 噪声水平(否则停止) |
|
|
43
|
+
| ⑧ 穷尽分析 | 连续多轮无收益 | 输出优化空间分析报告,成功与失败尝试均归档 |
|
|
44
|
+
|
|
45
|
+
**每轮优化必须绑定精度验证**:性能提交与"N/N case ALL PASS"证据同时落地,防止性能优化悄悄破坏精度。
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 2. 现象→手法→触发条件速查
|
|
50
|
+
|
|
51
|
+
按 op_summary 流水指标定位瓶颈,再选手法。**先判主导流水(CUBE/MTE2/V/FIXPIPE 谁最高),再动手**。
|
|
52
|
+
|
|
53
|
+
| 现象(判据) | 手法 | 触发条件与注意事项 |
|
|
54
|
+
|:---|:---|:---|
|
|
55
|
+
| AIC 计算与 AIV 通信串行,总时长 ≈ 两者之和 | per-tile 流水重叠:AIC 逐 tile `CrossCoreSetFlag` / AIV 逐 tile `CrossCoreWaitFlag` + 通信 | 计数式 flag 的 Set/Wait 必须严格配对;计数器 0-15 衡量未消费积压、不构成 T 上限(R9 口径——不设数值拒绝);`tileCnt=1` 应自然退化为串行,便于回退对比 |
|
|
56
|
+
| tiles/core ≈ 1,cube_utilization 低,CUBE bound | 减小 baseM(如对 SWAT tiling 结果做减半后处理 256→128),增加 tile 数提升核间负载均衡 | 触发条件:SWAT 在 `blockNum ≥ aicNum` 时不触发 `AdjustBasicBlock()`、输出 `baseM==256` 且减半后满足 M 轴整除;⚠️ 副作用:DMA 次数随之增多(MTE2 上升),**仅 CUBE bound 时值得**;baseM 必须保持 CUBE_BLOCK(16) 整数倍;减半后须重置 M 尾块参数(`mTailTile=1, mBaseTailSplitCnt=1, mTailMain=0`)并验证 L1 buffer 安全(`stepK`/`scaleKL1`/`nBufferNum` 不变仍有效) |
|
|
57
|
+
| 仅个别核干活,其余核空转(如后处理只跑 block 0) | 多核并行:按 blockIdx 均分任务 + 余数前摊 | 后处理类 AIV 工作默认应全核参与;先确认任务可分行/分块且无跨核依赖 |
|
|
58
|
+
| 自研基础模块(如归约/拷贝)性能差 | **优先找同生态已验证的参考实现整体替换**,只适配语义差异,而不是继续微调自研版 | 这是历史上单轮收益最大的手法(2 倍以上);替换后用同一基线量化验证 |
|
|
59
|
+
| 同步次数随某维度(rank 数/行数/tile 数)线性增长,该维度大时性能退化 | 批量摊薄:利用 MTE2/V/MTE3 流水 FIFO 性,一批数据只做 1 次 SetFlag/WaitFlag;批大小按 UB 容量自适应 | "重构后某维度退化"几乎必然指向同步开销;先数同步次数再改代码 |
|
|
60
|
+
| MTE2 加载与 V 计算串行 | pingpong 双缓冲:输入 buffer 双份,按计数奇偶交替 | 累加器等有语义依赖的 buffer **保持单份**,不能盲目复制 |
|
|
61
|
+
| V 指令链路过长(如 低精度→Cast→Add→Cast回) | 去冗余 Cast:用硬件原生低精度运算直接累加 | ⚠️ 触发条件苛刻:**仅当目标平台硬件级低精度累加的精度已实测达标**才能去掉高精度中间累加;必须先用高精度版本保底(见 §4 精度排查模式)。另需先确认该模块未被流水掩盖——被掩盖模块降精度实测收益趋近于零,而精度风险随 rank/配置漂移,生产上曾因此回退 |
|
|
62
|
+
| 固定 tile 粒度在小分片场景(如多 rank)效率低 | 自适应 tile 粒度:host 按 rank 数/shape 分档选择首 tile 大小 | 本质是"同步次数 vs 流水粒度"的权衡:分片小→减小 tile 让通信尽早启动;分片大→增大 tile 减少同步。**分档值只是起点**——异常 case(tileCnt 非最优、SyncAll 占比偏高、GM 带宽争抢特征)需 per-case 搜索首 tile 大小,判据用通信覆盖率与收益实测;具体分档阈值需按平台实测标定,不跨平台/case 复用单点数值 |
|
|
63
|
+
| 通信核与计算核互等 | 角色错峰:通信核发通信时,其余核算上一 tile 的残留工作 | 需要跨核同步点(SyncAll)配合;同步次数不可裁剪(见 §4)。compute-first 下进阶形态:fragment 重排 [remote..., local] + 双 flag(remote done 提前启动通信),见 [`fusion.md`](../fundamentals/fusion.md) §6.2.3 双 flag 计数式 |
|
|
64
|
+
| 通信与归约串行排队(时分复用),AIV 侧成为关键路径 | **通信/归约核严格分离(专职化)**:后 rankSize 核专职通信(通信对象 totalJobs=rankSize,每核 1 个 target 并行 PUT)、前 (核数-R) 核专职归约,`AllToAll(t) ∥ Reduce(t-1)` 错位流水,无 Phase 2 | 收益稳定(R 越大越显著):消除 Phase 2 串行的收益大于归约算力减少 R 核的代价。⚠️ 反面教训:通信对象退化为单核(臆造"多核写同一 UBMEM flag 竞态"约束)会让 R 个 target 串行 PUT,通信时间放大 R 倍——该竞态约束不存在;TeamBarrier totalJobs 按分核映射取值(官方前 R 核映射 = rankSize;compute-first 后 R 核映射 = 1 + 显式 CrossDevice,见 [`communication.md`](../fundamentals/communication.md) §2.2) |
|
|
65
|
+
| 通信等待含框架内建跨设备 rendezvous,与分核守卫耦合 | **BARRIER_NONE + 手动 CrossDevice**:`Wait<BARRIER_NONE>` 仅 Drain 本 block channel,SyncAll 后由 block 0 显式 `teamBarrier_.CrossDevice()`,再一次 SyncAll 放行 | 多核并行通信 + 严格分离编排的配套手段;同步点显式可控(见 [`fusion.md`](../fundamentals/fusion.md) §6.2.3) |
|
|
66
|
+
| 归约(reduceSum)模块本身耗时高,逐行处理 flag 次数多 | **手动 UB + 多行批量归约**:LocalTensor 手动偏移布局(FP32 累加器单份 + src 双缓冲 pingpong + 输出 buffer),一次处理多行摊薄 flag 次数 | 显著摊薄同步开销;per-tile 高频调用场景避免 TPipe 重复 InitBuffer 耗尽 UB(归约 buffer 循环外一次性分配) |
|
|
67
|
+
| 归约 VEC 占比异常低但 flag/同步次数频繁 | **逐行归约(blockCount=1)**:flag/同步次数 = 行数 × N段数 × R | 改批量:2D DataCopyPad blockCount=本批行数(多行一次搬运),flag 次数除以 batchRows 摊薄——量化判据:逐行归约 = 性能 FAIL(见 [`fusion.md`](../fundamentals/fusion.md) §6.2.6) |
|
|
68
|
+
| AIC SCALAR 占比异常高、CUBE 反而很低 | **R×T 子 mm 调用的 Params 重建开销**:检查是否每轮循环重建完整 Params | 改 FragmentTensor 一次调用消 R 循环,或减少 T(增大 tileM),或 Params 增量更新只改地址字段;小/中 shape 下 SCALAR 易成为主 bound(见 [`fusion.md`](../fundamentals/fusion.md) §6.2.2)。⚠️ 反向认知:小 R×T 时两者性能持平,FragmentTensor 的价值在代码统一与 per-fragment L1 隔离——SCALAR 红线针对大 R×T 才成立 |
|
|
69
|
+
| 重复构建地址/描述符 | 增量复用:按轮次索引递推偏移,而非每轮重建 | 适用于 FragmentTensor 地址表、GM 指针族 |
|
|
70
|
+
| mac_ratio 高但 cube_utilization 低 | 瓶颈在**数据供给(MTE2 带宽)而非计算**:MAC 在等数据。优化搬运链路(双缓冲、L2 footprint、布局),不要再压计算侧 | 经典误判点:mac_ratio 高 ≠ 计算 bound;结合 cube_util 与 mte2_ratio 构建 GM→L1→L0→L0C→GM 搬运链路图定位 |
|
|
71
|
+
| L2 footprint 超容量、cache 命中低(大 shape 明显) | **problem 维度拆分子调用**:tile 大小不变、只缩 problem M(如 R×T 子调用),L2 footprint 缩小 → cube 利用率提升,大 shape 实测显著收益 | ⚠️ 与"拆小 tile"严格区分:后者 MTE2 次数翻倍,已证伪(§3)。拆分不得增加单位数据的搬运次数 |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 3. 失败案例教训(已证伪的方向)
|
|
76
|
+
|
|
77
|
+
以下方向在生产算子上实测**无收益或负收益**,遇到相同现象时不要再试:
|
|
78
|
+
|
|
79
|
+
| 尝试 | 结果 | 通用教训 |
|
|
80
|
+
|:---|:---|:---|
|
|
81
|
+
| 增大 L0C 双缓冲深度(如 dbL0c=2) | fixpipe 时间反而上升 | L0 是稀缺资源,加深缓冲会与对侧 buffer 竞争空间 |
|
|
82
|
+
| 增大 stepK(K 方向步进) | 无收益 | **当两条 pipe 已高度重叠(≥90%)时,减少任何一侧的次数都无收益**——先看重叠率再决定优化对象 |
|
|
83
|
+
| 减小 baseN 提升 cube_util | 整体恶化 | fixpipe/DMA 的**固定开销随 tile 数线性放大**,cube_util 收益被抵消。减小 tile 前必须评估固定开销占比 |
|
|
84
|
+
| 把框架通信原语的多核 work partition 直接套到语义不同的场景 | 大面积数据错误后回退 | 复用框架原语前必须核对**地址偏移语义**(work partition 按 targetRank 还是 sourceRank 切分);语义不匹配就换优化维度,不要死磕框架 |
|
|
85
|
+
| 通信退化为单核(仅 blockIdx==0 执行 Commit/Wait),理由"避免多核写同一 UBMEM flag 竞态" | R 个 target 串行 PUT,通信时间放大 R 倍;R≥4 且真同步时暴露死锁竞态 | **该竞态约束是臆造的**:TeamBarrier 按 job 分槽写入,无共享 flag 竞态;TeamBarrier totalJobs 按分核映射取值(见 [`communication.md`](../fundamentals/communication.md) §2.2)。设计阶段引入"约束"前必须在 skill/官网代码中找到实证来源 |
|
|
86
|
+
| 用 `SyncAll` 替代跨设备 fence | 接收方在远端 PUT 到达前读未初始化数据(大面积元素错) | **SyncAll 是本地核间同步,无跨设备能力**——跨设备可见性只能走框架 CrossDevice(TeamBarrier),本地同步加多少次都无效 |
|
|
87
|
+
| 手动轮询远端 GM flag 做跨设备同步 | 死循环超时 | **MTE 跨设备 GM 写可见性无框架 fence 保证**(本端 MTE2 读看不到远端 MTE3 写)——手动跨设备轮询不可行,须用框架 CrossDevice |
|
|
88
|
+
| PUT/GET 数据覆盖 Win 区内元数据/barrier 区 | 精度"假通过"(碰巧正确),同步机制已被破坏,大 shape/多轮时紊乱 | 数据区与元数据区分离:官网布局 barrier flag 在独立 BARRIER_BUF(Win 数据区从 0 可用);共享布局按约定偏移跳过头部,host 预留与 kernel 读写偏移同源——此类"假通过"最危险:精度验证无法发现,必须靠设计红线拦截 |
|
|
89
|
+
| 单轮 PUT 数据量过大 | bring-up 期过大单轮曾见间歇失败(边界未定,非普适上限;同平台亦有更大单轮稳定运行的工程实例) | 无官方上限,勿以经验阈值做 host 强制拒绝;放大单轮后按 case 复核(连续多轮精度 + 重复 launch 一致性);可靠性边界与带宽高效区间是两回事,不要混用 |
|
|
90
|
+
| 为增加通算重叠把 tile/K-window 数翻倍(拆小 tile) | MTE2 次数翻倍至饱和,负收益回退 | 重叠收益要靠**拆 problem 维度**(tile 大小不变)获得,不能靠增加单位数据的搬运次数;改之前先看 MTE2 余量 |
|
|
91
|
+
| local 段前置/后置重排以期通信提前启动 | 通信被计算完全掩盖的算子收益 ≈ 0 | **重排类优化先 profiling 确认瓶颈归属**(AIV WaitFlag 占比高 ⇒ 跳过重排);仅通信暴露场景有收益。注意:compute-first 的 localLast 编排因 flag 配对契约依赖仍须保留,此处针对"额外重排"类提议 |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 4. 通用排查模式(现象→根因→修法)
|
|
96
|
+
|
|
97
|
+
| 现象特征 | 根因方向 | 修法 |
|
|
98
|
+
|:---|:---|:---|
|
|
99
|
+
| **仅非对齐 shape 失败**,其余全部 PASS | tail 路径:尾块不被 tile 粒度整除,matmul 产出垃圾数据 | tail 单独 tiling + padding 到对齐边界 + 用 real size 字段限制实际读取范围;**host 侧内存分配必须与 kernel 实际读取范围一致**(详见 [`fusion.md`](../fundamentals/fusion.md) §6.2.7) |
|
|
100
|
+
| **精度误差随 K(或累加维度)放大**(小 K PASS、大 K FAIL) | 累加位宽不足,低精度累加误差随累加长度线性放大 | 先升高精度中间累加保底(如 BF16→F32→Add→Cast回);降回低精度须同时满足:全量配置(含大 rank 数)实测达标 + 收益显著(未被流水掩盖),并保留回退开关 |
|
|
101
|
+
| **重构后某维度性能退化**(其余维度正常) | 同步/flag 次数随该维度线性增长 | 数清每单位数据的同步次数,改批量处理摊薄(见 §2) |
|
|
102
|
+
| **复用框架通信原语后大面积元素错误**(非边界、非尾块) | work partition 地址偏移语义与算子语义不匹配 | 读框架实现的偏移公式(按 targetRank 还是 sourceRank);不匹配则回退单核通信基线,改从其他维度(后处理多核化等)要性能 |
|
|
103
|
+
| **删减跨核同步后出现 NaN / 偶发错误** | SyncAll 保障跨核数据可见性,次数不可裁剪 | 恢复同步点。同步是正确性保障不是性能开销,优化同步前先证明数据依赖已消除 |
|
|
104
|
+
| **少量元素错位/超差,分布无明显 tile 规律** | 参数误传:行步长/计数值等参数语义与签名不符(如行步长误传为段高、tile 计数误传 0) | **先逐参数核对调用点与签名的语义**(单位、轴、起算点),再怀疑算法;此类 bug 占比高且排查成本低 |
|
|
105
|
+
| **越界/踩数据,地址看似正确** | 同一地址偏移在多处独立计算,两处公式漂移 | 地址偏移**单一来源**:派生量在一处计算后传递,不在多个文件各算一遍 |
|
|
106
|
+
| **wall-clock 测得 kernel 极快(微秒级)但与 msprof 矛盾** | `<<<>>>` 是异步 launch,wall-clock 只测到下发开销 | 性能结论只以 msprof device 侧 Task Duration 为准(见 [`../shared/profiling_mc2.md`](../../../shared/profiling_mc2.md)) |
|
|
107
|
+
| **统一分支路径后出现全零/未初始化数据** | 原 if/else 掩盖了退化路径的初始化遗漏 | 统一路径是好事——它会暴露退化路径的初始化 bug;补齐退化路径的 tiling/参数初始化 |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 5. 实验纪律
|
|
112
|
+
|
|
113
|
+
性能优化是实验科学,每条优化假设都按"可证伪的实验"执行:
|
|
114
|
+
|
|
115
|
+
1. **单变量**:每轮只改一个变量(一个手法、一个参数),否则无法归因
|
|
116
|
+
2. **同一锚点**:所有对比都相对同一个归档基线(`docs/perf/round_001/`),不相对"上一轮"链式对比(误差会累积)
|
|
117
|
+
3. **稳态取值**:丢弃 warmup 轮次取稳态均值;多卡场景跨 rank 取 max(木桶效应)——采集细则见 [`../shared/profiling_mc2.md`](../../../shared/profiling_mc2.md)
|
|
118
|
+
4. **量化回退**:不达标就回退,**回退提交同样记录量化数据**(R5/R6/R7 式编号留档),证明"试过、为什么不采用"
|
|
119
|
+
5. **失败也归档**:负收益尝试与成功尝试同等篇幅写进优化报告,防止后人重复踩坑(§3 即来源于此)
|
|
120
|
+
6. **精度绑定**:每轮 perf 提交附带全量精度 PASS 证据
|
|
121
|
+
7. **穷尽收尾**:确认无剩余空间时输出分析报告(含理论耗时对比、各路流水占比、已证伪方向清单),作为算子的性能档案
|
|
122
|
+
8. **实证复核**:静态分析得出的"不可行/无收益"结论,在有争议或收益量级不明时应设计最小实验复核(典型:拆 problem 维度的收益主因常是 L2 footprint 效应,静态分析易遗漏)。被推翻的假设是有价值的档案,不隐瞒
|
|
123
|
+
9. **选择性路由**:一个手法只对部分 case 有效、对其他 case 退化时,不做统一开关,按 case 特征(rank 数/tile 粒度/shape 规模/bound 类型)路由到不同方案,保留各方案的局部收益
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 6. 评审意见落地模式
|
|
128
|
+
|
|
129
|
+
评审意见(尤其是重构类)的落地方式是**"语义等价的高性能实现 + 量化回退机制"**,不是字面执行:
|
|
130
|
+
|
|
131
|
+
1. 逐条实现评审意见,每条用同一基线量化对比
|
|
132
|
+
2. 字面实现性能退化时,**诚实回退并记录数据**,然后寻找满足评审意图的替代实现(典型:为消除循环的"一次全覆盖"实现若实测回退,可改用 FragmentTensor 打包分段地址实现同等意图)
|
|
133
|
+
3. 阻塞项(正确性/红线)修完即 PASS;建议项按收益排期
|
|
134
|
+
4. 重构多发期主动做一次**设计文档 vs 代码的一致性核对**,防止文档腐化(文档与实现漂移会误导后续所有优化决策)
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 后续阅读
|
|
139
|
+
|
|
140
|
+
- [`../shared/profiling_mc2.md`](../../../shared/profiling_mc2.md) — 性能采集与多卡后处理细则
|
|
141
|
+
- [`../shared/pipeline_tuning.md`](../../../shared/pipeline_tuning.md) — tileCnt 两阶段策略
|
|
142
|
+
- [`fusion.md`](../fundamentals/fusion.md) — 通算融合编排模式与硬限制
|
|
143
|
+
- [`development-guide.md`](../operator-design/development-guide.md) — 工程改造食谱与验收清单
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Step 1: Project Setup
|
|
2
|
+
|
|
3
|
+
> **定位**:建立算子工程骨架、校验 CANN 内置 apace 事实源与环境、登记只读参考点。Step 1 只做环境验证与目录创建;不核对接口事实、不判定路线、不创建算子实现文件。
|
|
4
|
+
>
|
|
5
|
+
> 父级流程定义以 `plugins-official/ops-direct-invoke/AGENTS.md` 为准;本文件只补充 apace 场景的差异化要点,不重写父级规则。plugin 场景下本步骤对应 plugin Step 1(环境检查),7 步门禁细则以 [`../workflow_integration.md`](../workflow_integration.md) 为准。
|
|
6
|
+
|
|
7
|
+
## 1. 环境检查(门禁)
|
|
8
|
+
|
|
9
|
+
### apace 场景额外校验
|
|
10
|
+
|
|
11
|
+
校验项表与路径实测纪律以 [`../workflow_integration.md`](../workflow_integration.md) Step 1「apace 场景额外校验」为唯一事实源,本文件不重复(防止双写漂移)。其中"CANN 内置 apace"一项的物理路径形态以 `test -d` 实测登记为准(随 CANN 版本漂移)。
|
|
12
|
+
|
|
13
|
+
### 门禁
|
|
14
|
+
|
|
15
|
+
环境检查全部通过 → 进入 Step 2。任何一项失败禁止进入 Step 2。
|
|
16
|
+
|
|
17
|
+
## 2. 项目目录创建
|
|
18
|
+
|
|
19
|
+
创建算子根目录与最小空目录结构;kernel、host、脚本与测试文件均不在本步生成,留待 Step 3 的 PLAN 确定后再创建。
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
operators/{OpName}/ ← camelCase(对齐 CANN 算子注册名)
|
|
23
|
+
├── docs/
|
|
24
|
+
│ ├── DESIGN.md # Step 3 输出
|
|
25
|
+
│ └── PLAN.md # Step 3 输出
|
|
26
|
+
├── kernel/ ← [MODIFY] 本算子 kernel 头文件
|
|
27
|
+
├── src/ ← [MODIFY] host 侧
|
|
28
|
+
├── scripts/ ← [MODIFY] gen_data.py / verify_result.py / parse_perf.py
|
|
29
|
+
├── data/
|
|
30
|
+
│ ├── input/
|
|
31
|
+
│ ├── golden/
|
|
32
|
+
│ └── output/
|
|
33
|
+
├── CMakeLists.txt
|
|
34
|
+
└── cases.csv
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
> 共享层 `block/` `tiling/` `basic/` `utils/` **不复制、不出现在算子目录**——经 CMake `-I` 直引 CANN 内置路径。参考 kernel(`quant_matmul_mx_kernel.h`、`comm_channel_builder.h` 等)同样直引。
|
|
38
|
+
|
|
39
|
+
## 3. 只读参考点
|
|
40
|
+
|
|
41
|
+
| 参考点 | 路径 | 用途 |
|
|
42
|
+
|--------|------|------|
|
|
43
|
+
| CANN 内置 apace 框架 | 实测定位(`test -d`;两种已验证形态:`opp/built-in/op_impl/ai_core/tbe/impl/ops_transformer/ascendc/common/apace/`、`vendors/custom_transformer/op_impl/ai_core/tbe/custom_transformer_impl/ascendc/common/apace/`) | 编译事实源,CMake 直引 |
|
|
44
|
+
| ops-transformer 仓(可选) | 经 `scripts/fetch_apace.sh` 获取 | 跟踪 master 新特性 / 核对最新契约,使用前必须与内置版本 diff 校验 |
|
|
45
|
+
| 参考算子 | `kernel/all_to_all_quant_matmul/`、`kernel/all_gather_quant_matmul/` | 实现模式参考 |
|
|
46
|
+
|
|
47
|
+
## 4. 不做的事
|
|
48
|
+
|
|
49
|
+
- 不核对 apace 框架的接口组合候选(Step 2 职责)
|
|
50
|
+
- 不选择实现路线(Step 3 职责)
|
|
51
|
+
- 不创建场景实现文件(Step 4 职责)
|
|
52
|
+
- 不提前编写公式、Tiling、golden 或任何固定工程模板
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Step 2: 设计前核对(轻量检查清单)
|
|
2
|
+
|
|
3
|
+
> **定位**:设计前的源码事实核对清单。**默认将核对事实内联记录于 DESIGN.md §0.3**,**不要求独立调查报告文件**;仅在设计委托方明确要求时才产出独立 `apace-investigation-report.md`。不做方案推荐、不匹配场景、不选择路线、不编译或运行设备。
|
|
4
|
+
>
|
|
5
|
+
> plugin 场景下本步骤在 plugin Step 2(设计)内由 Architect 完成,不产生独立交付物。
|
|
6
|
+
|
|
7
|
+
## 1. 需求四要素(设计三拷问的事实化)
|
|
8
|
+
|
|
9
|
+
动手核对源码前,先把需求落成可对照的四要素(对应方法论原则 2「设计三拷问」):
|
|
10
|
+
|
|
11
|
+
| 要素 | field id | 说明 | 示例 |
|
|
12
|
+
|------|------|------|------|
|
|
13
|
+
| golden 语义 | `golden_semantics` | 每卡输入/输出分布与切分轴(**输入分布轴与输出分布轴分别冻结**) | 输入:每卡完整 A(K 不切分);输出:按 M 轴聚合 → [M/R, N] |
|
|
14
|
+
| 通信方向 | `communication_direction` | GET / PUT / compute-first | PUT(通信→计算) |
|
|
15
|
+
| 编排形态 | `orchestration` | 严格分离 / 时分复用 | 严格分离(后 R 核通信 / 前核归约) |
|
|
16
|
+
| dtype/shape/rankSize | `dtype` / `shape` / `rank_size` | 输入/累加/输出 dtype、逻辑 shape、rank 数 | FP8_E4M3 × FP8_E4M3 → BF16,M=2048,R=4 |
|
|
17
|
+
|
|
18
|
+
> **四要素提取不到时必须澄清**:golden 语义的"每卡输入分布"无法从用户需求唯一确定时(典型:用户说"每卡有 M/rankSize"但未说明是输入切分还是输出分布),**必须回 [`requirement-analysis/grill-protocol.md`](../../../requirement-analysis/grill-protocol.md) 维度 9 向用户追问**,禁止默认假设后直接进入源码核对。
|
|
19
|
+
|
|
20
|
+
## 2. 源码核对范围(只读)
|
|
21
|
+
|
|
22
|
+
只读核对 CANN 内置 apace 框架路径(Step 1 实测登记值;两种已验证形态:`opp/built-in/op_impl/ai_core/tbe/impl/ops_transformer/ascendc/common/apace/`、`vendors/custom_transformer/op_impl/ai_core/tbe/custom_transformer_impl/ascendc/common/apace/`),禁止 clone、更新、切换源码:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
apace/
|
|
26
|
+
├── basic/ # 基础数据结构与抽象(fragment_tensor/:FragmentTensor/MakeFragmentTensor/FragmentSliceCopy)
|
|
27
|
+
├── block/ # 接口层
|
|
28
|
+
│ ├── aiv_comm/
|
|
29
|
+
│ │ ├── collective_comm_api.h # 四段式通信 API 契约 + CommCollectiveOp/CommMode 分发
|
|
30
|
+
│ │ ├── all_to_all/ # AllToAll GET/PUT 钩子
|
|
31
|
+
│ │ ├── all_gather/ # AllGather PUT 钩子
|
|
32
|
+
│ │ └── barrier/ # TeamBarrier(barrier_ubmem.h)
|
|
33
|
+
│ ├── blaze_ext/ # Blaze 扩展(gemm/block/qmm_mx_block_mmad_fragment.h——FragmentTensor 路径的 MMAD 组件,AG 类算子必查)
|
|
34
|
+
│ └── aiv_compute/ # AIV 计算接口(⚠️ 空占位——量化/反量化/规约组件规划中,勿假定存在)
|
|
35
|
+
├── kernel/ # 官方算子实现(可直接调用或参考)
|
|
36
|
+
│ ├── all_to_all_quant_matmul/ # PUT AllToAll + QuantMatmul(UDMA 版 + hcomm/CCU 注册形态版)
|
|
37
|
+
│ └── all_gather_quant_matmul/ # PUT AllGather + QuantMatmul(FragmentTensor 三区)
|
|
38
|
+
├── tiling/ # tiling 算法(quant_matmul_tiling_{base,common,data,swat}.h + comm_tiling_data.h)
|
|
39
|
+
└── utils/ # 通用工具与常量(constant.h + host 侧 comm_channel_builder.h)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
可选:经 `scripts/fetch_apace.sh` 获取官网 master 最新代码核对契约,使用前必须与内置版本 diff 校验。
|
|
43
|
+
|
|
44
|
+
## 3. 必须核对的事实(内联记录于 DESIGN.md §0.3)
|
|
45
|
+
|
|
46
|
+
| 事实类别 | 内容 | 记录位置 |
|
|
47
|
+
|---------|------|---------|
|
|
48
|
+
| matmul 链路事实 | M/N/K、dtype 组合、scale 编码、Blaze 组件(`BlockMmad` + `BlockScheduler` + `MatmulWithScaleMx` 或 FragmentTensor 路径)、localMatmul 模式候选、tiling 基线 | DESIGN.md §0.3 |
|
|
49
|
+
| 通信接口事实 | `CollectiveComm` 四段式契约、GET/PUT 钩子职责、CommContext 字段、Win 区布局 | 同上 |
|
|
50
|
+
| 入口 ABI 事实 | 入口函数签名、CommContext 传递方式、dtype 变体入口数 | 同上 |
|
|
51
|
+
| 官方覆盖性 | 官方 kernel 可直接调用/复用的部分、未覆盖的需求项 | DESIGN.md §2.2 |
|
|
52
|
+
| 注册形态原型事实(需求存在既有实现时) | 原型语义/算法骨架/验证基准三要素 + 可借鉴/必须重写边界判定(按 [`paradigm-mapping.md`](../operator-design/paradigm-mapping.md) §3 清单) | DESIGN.md §0.3 |
|
|
53
|
+
|
|
54
|
+
每条事实必须带 `文件:行号` 证据引用;声明读取边界内未找到 ≠ 不支持,不得据此虚构接口或文件名(教训:AllGather GET 钩子在源码中不存在,仅 `all_to_all_udma_get.h` 有记录)。
|
|
55
|
+
|
|
56
|
+
## 4. 调用链核对要点
|
|
57
|
+
|
|
58
|
+
从官方 kernel 入口追踪完整调用链,记录每个环节的逻辑对象、设备物理表示、资源生命周期、同步 owner:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
__global__ 入口 → Impl::Init → Impl::Run
|
|
62
|
+
→ AIV 侧:CollectiveComm::Init → Commit → Wait → Finalize
|
|
63
|
+
→ AIC 侧:BlockMmad::Init → Run → Epilogue
|
|
64
|
+
→ 同步:CrossCore SetFlag/WaitFlag / SyncAll
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
接口组合以官方 kernel 实例为参照(实例化的模板参数、钩子注册、调度器选择),不做组件名的笛卡尔积式拼接;不得把参考算子名称当作能力证据。
|
|
68
|
+
|
|
69
|
+
## 5. 独立报告模式(可选)
|
|
70
|
+
|
|
71
|
+
仅当设计委托方明确要求时,将 §1-§4 事实写入 `operators/{op}/docs/apace-investigation-report.md`:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
investigation_id
|
|
75
|
+
source_root # CANN 内置 apace 路径
|
|
76
|
+
requirement_facts # §1 需求四要素
|
|
77
|
+
matmul_chain_facts # §3 matmul 链路事实
|
|
78
|
+
comm_interface_facts: [] # 通信接口事实
|
|
79
|
+
entry_abi_facts: [] # 入口 ABI 事实
|
|
80
|
+
official_coverage: full | partial | none
|
|
81
|
+
uncovered_requirements: [] # 官方未覆盖的需求项
|
|
82
|
+
read_boundary: [] # 实际读取的文件清单
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## 6. 边界声明
|
|
86
|
+
|
|
87
|
+
- 不做方案推荐、不匹配场景、不选择路线
|
|
88
|
+
- 不编译或运行设备
|
|
89
|
+
- 事实不足时在 DESIGN.md 标记 `blocking` 并停止等待澄清,最多一次补充核对
|