@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,272 @@
|
|
|
1
|
+
# compute-first-reduce-scatter 开发指导
|
|
2
|
+
|
|
3
|
+
> **场景 ID**:`compute-first-reduce-scatter`
|
|
4
|
+
> **适用路线**:`implementation_route=apace_custom`,`selected_scenario=compute-first-reduce-scatter`(DESIGN 冻结后编译进 PLAN 的记录值)
|
|
5
|
+
> **执行阶段**:Step 4(Implementation)只执行 PLAN,不改设计、不改接口/ABI;通用工程规范见 [`development-guide.md`](../../operator-design/development-guide.md),架构原理见 [`fusion.md`](../../fundamentals/fusion.md) §6.2,通用方法论(D1-D6 决策点)见 [`dev-methodology.md`](../../operator-design/dev-methodology.md)。本文只写本场景差异化要点。
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. 有序开发动作(PLAN §4 编译模板)
|
|
10
|
+
|
|
11
|
+
> **bring-up 两路径(按起点选)**:① 场景合同完备(design.md 已冻结)→ 直接按 A1-A7 FragmentTensor 一步到位;② 仅有语义无合同且存在可借用参考代码 → 先写 R 循环最简版跑通精度(临时裁剪项在 PLAN 登记"后续补齐"),再按 A1 优化为 FragmentTensor。
|
|
12
|
+
|
|
13
|
+
| # | 动作 | 验收锚点 | 证据 |
|
|
14
|
+
|:---|:---|:---|:---|
|
|
15
|
+
| A1 | 实现 FragmentTensor mm kernel(消 R 循环,R16) | FragTensorA/FragScaleA/FragTensorC 打包 R 个 rank 段地址 + `QmmMxBlockMmadFragment` per-fragment L1 隔离,一次调用覆盖 `R × curTileM` 行 | 编译通过;grep 无 R×T 子调用循环 |
|
|
16
|
+
| A2 | 实现 staging 即通信源 | mm 输出连续 `[M, N]` staging(GM workspace),rank 段 = chunk;PUT 钩子 src 偏移与 mm 写入偏移同源 | per-tile 契约不变量 3([`development-guide.md`](../../operator-design/development-guide.md) §3.5) |
|
|
17
|
+
| A3 | 实现 AIV 严格分离 | 后 R 核通信 / 前核归约;分核公式 `jobIndex = GetBlockNum()-1-GetBlockIdx()`;零 tile 核无条件 SetFlag | AIV 分支骨架与 [`fusion.md`](../../fundamentals/fusion.md) §6.2.1 一致 |
|
|
18
|
+
| A4 | 实现增量归约 | 独立 `reduce_sum_ref.h`;手动 UB 批量形态:多 slot 布局 + src 双缓冲 + FP32 中间累加 + N 分段;禁止 TPipe/TQue 逐行模型 | R17/R18/R19(见 §5) |
|
|
19
|
+
| A5 | 实现 `Wait<BARRIER_NONE>` + 手动 CrossDevice | 本场景(后 R 核映射)TeamBarrier 须 totalJobs=1 + 指定核显式 `CrossDevice()`;沿用 totalJobs=rankSize 会因 jobIndex 映射错位/守卫早退致跨卡同步失效(机制见 [`communication.md`](../../fundamentals/communication.md) §2.2) | grep `BARRIER_DEVICE` 为空 |
|
|
20
|
+
| A6 | 完成 flag 编排 | T=1 单次 SetFlag / T>1 逐轮配对(Set/Wait 严格配对,flagId ∈ [0, FLAG_ID_MAX));SyncAll 在分核守卫外 | R5/R9 检查通过 |
|
|
21
|
+
| A7 | 完成最终 drain | 循环结束消费残留事件(含次数守卫);最后一轮归约与 drain 全量覆盖 | 挂死不出现 |
|
|
22
|
+
|
|
23
|
+
> 执行纪律:每完成一个动作立即冒烟(改完即测);bring-up 顺序 T=1/rank=2 → T>1 → 全量矩阵。
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. 文件级合同([MODIFY] 清单)
|
|
28
|
+
|
|
29
|
+
> 布局与命名规范以 [`development-guide.md`](../../operator-design/development-guide.md) §1.2 为唯一事实源;共享层零复制、CMake 直引 CANN 内置 apace。
|
|
30
|
+
|
|
31
|
+
| 目录 | 文件 | 职责(本场景) |
|
|
32
|
+
|:---|:---|:---|
|
|
33
|
+
| kernel/ | `{op_name}_tiling_data.h` | 单份完整 mm tiling + `commTilingData` + 通信派生字段(每卡行数/chunk 字节/staging 大小/归约粒度)+ 就地 `CommContext`;**无 `localMatmul` 字段** |
|
|
34
|
+
| kernel/ | `{op_name}_impl.h` | Impl:Init/Run 编排;AIC 统一 `for t` 循环(T=1 自然退化)+ SetFlag;AIV 逐轮 WaitFlag 门控 + Commit/Wait + SyncAll + 归约 |
|
|
35
|
+
| kernel/ | `{op_name}_frag_kernel.h` | FragmentTensor mm 内核(A1),独立 namespace |
|
|
36
|
+
| kernel/ | `reduce_sum_ref.h` | 归约文件(A4),独立 namespace |
|
|
37
|
+
| src/ | `kernel_launcher.h` | 4 个 dtype 变体 `__global__` 入口(E4M3E4M3/E5M2E5M2/E4M3E5M2/E5M2E4M3),各含 `KERNEL_TYPE_MIX_AIC_1_1` |
|
|
38
|
+
| src/ | `main.cpp` | 前置校验 → T 派生 → staging 分配(`M×N×sizeof(CType)`)→ dtype dispatch → fork 多 rank + TCP rootInfo + 建链 + launch(perf 模式内嵌 L2 flush) |
|
|
39
|
+
| src/ | `root_info_exchanger.h`、`utils.h` | [REUSE] 从参考算子复制 |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 3. Host 侧要求
|
|
44
|
+
|
|
45
|
+
### 3.1 前置校验清单(fork/建链前执行,main.cpp 与 gen_data.py 双侧)
|
|
46
|
+
|
|
47
|
+
**正确性类强制校验**:
|
|
48
|
+
|
|
49
|
+
| # | 校验项 | 违反后果 |
|
|
50
|
+
|:---|:---|:---|
|
|
51
|
+
| 1 | `M % rankSize == 0` | M 轴切分错位 |
|
|
52
|
+
| 2 | 对齐约束(`K%32`、`N%16`、单尾块 tailM 16 对齐且 ≤ headMSize 等,按 dtype/fixpipe 32B 行对齐推导) | 跨卡 Win 槽污染 |
|
|
53
|
+
| 3 | `usedCoreNum ≥ rankSize` 且 `usedCoreNum - rankSize ≥ 1`(归约核至少 1 个) | 无核执行归约/rendezvous 挂死 |
|
|
54
|
+
| 4 | Win 容量 `M×N×sizeof(CType)` ≤ `HcclGetHcclBuffer` 实测值 | 通信越界 |
|
|
55
|
+
| 5 | `R ≤ 32`(MAX_FRAGMENT_COUNT 单次构建 fragment 数上限,与 T 无关) | FragmentTensor 越界 |
|
|
56
|
+
| 6 | 新增输入 buffer 预算(bias 等 L1/BT 兜底核算) | L1/BT 溢出 |
|
|
57
|
+
|
|
58
|
+
**风险提示类(不作 host 强制拒绝,按 case 复核)**:
|
|
59
|
+
- flag 计数:计数器 0-15 衡量未消费积压(紧邻配对下 ≈1-2 不触顶,不构成 T 上限);以 Set/Wait 严格配对为硬约束,T 上限按 case 实测确定(计数式配对已在多 tile 场景工程验证)。
|
|
60
|
+
- 单轮 PUT 大小:无官方上限(bring-up 期过大单轮曾见间歇失败),大单轮须 case 复核(连续多轮精度 + 重复 launch 一致性)。
|
|
61
|
+
|
|
62
|
+
### 3.2 T 派生
|
|
63
|
+
|
|
64
|
+
- 优先 `T | mSeg` 无尾块(R10,实现最简);**单尾块直传合法**(`tailMSize = mSeg % headMSize`,16 对齐且 ≤ headMSize):如实填 `commTilingData` 尾块字段、tail tiling 入参 `m = rankSize × tailMSize`(注意 tail tiling 的 M 语义是 R 段拼接的逻辑总行数)
|
|
65
|
+
- 多尾块或尾块 > headMSize 时走策略 A:`paddedCurTileM` 32 对齐 + `realFragmentSize` 限读 + 多套 tiling(全量 + head + tail);三条路径均合法,见 [`fusion.md`](../../fundamentals/fusion.md) §6.2.7
|
|
66
|
+
- tileM 选择按计算最优优先;T 上限按 case 实测确定
|
|
67
|
+
|
|
68
|
+
> **约束联合推导原则**:单条约束各自满足 ≠ 联合可行。host 校验与 T 派生必须覆盖派生边界(尾块对齐、Win 容量、归约核数),cases.csv 必须包含约束边界用例(strided 场景、尾块边界、R 边界)——硬件隐式上限类缺陷(静默丢零、无报错)只在边界用例下暴露。
|
|
69
|
+
|
|
70
|
+
### 3.3 dtype dispatch
|
|
71
|
+
|
|
72
|
+
- host 按 `dtypeA`/`dtypeB` **运行期分派**到 4 变体入口,禁止硬编码单入口(硬编码 → 异 dtype 字节流被错误模板解释,精度系统性失败)
|
|
73
|
+
- dispatch 宏模板见 [`development-guide.md`](../../operator-design/development-guide.md) §3.5
|
|
74
|
+
- Win 数据区偏移按 host 建链布局确定,kernel/host 偏移同源(R14)
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## 4. 验证矩阵(compute-first 特有项)
|
|
79
|
+
|
|
80
|
+
| 类别 | 项 | 达标条件 |
|
|
81
|
+
|:---|:---|:---|
|
|
82
|
+
| 精度 | T=1 与 T>1 双路径 | 只测 T=1 会掩盖多 tile 布局 bug,双路径必须全 PASS |
|
|
83
|
+
| 精度 | tail/非对齐 shape + 多 commTurn | tail 路径特征信号暴露 |
|
|
84
|
+
| 精度 | per-tile 契约不变量 | 每轮 mm 只算本轮子区间(禁止"全量 mm × T 次");归约每轮只处理本轮行区间 |
|
|
85
|
+
| 精度 | golden 语义 | 每卡"完整 K、切 M",输出 `[M/R, N]`;golden FP32 累加路径 + 固定种子 |
|
|
86
|
+
| 精度 | dtype 全覆盖 | 4 变体各自 PASS;E5M2 全错 → 查 dispatch |
|
|
87
|
+
| 性能 | tileCnt 扫描 | 精度期 tileCnt=1 串行基线 → 性能期扫描(上限按 R9 口径),切 tileCnt 必须重调 `GetTilingData` |
|
|
88
|
+
| 性能 | 投产门槛(R15) | 真实大 shape × R=2/4 双档 × 与同语义参考路径对标归档(融合算子或分步实现);toy shape = FAIL;性能 shape 向业务方索取真实清单 |
|
|
89
|
+
| 性能 | L2 flush 实接线(R20) | perf 每轮调 flush kernel,msprof 记录数 == 轮数 |
|
|
90
|
+
|
|
91
|
+
### 4.1 对标基线工程已知坑(R15 落地,生产试错记录)
|
|
92
|
+
|
|
93
|
+
> 环境口径:dav-3510 / CANN 9.2.0 / fork 直调多 rank。R15 要求与参考路径对标归档,但 aclnn 基准算子的**调用契约**(参数校验规则、group 机制、引擎模式)无现成文档——以下为实测踩坑记录,完整契约**未闭环**,设计期即应确定对标路径并预留试错时间。
|
|
94
|
+
|
|
95
|
+
| 候选基线 | 已知坑(实测) | 结论 |
|
|
96
|
+
|:---|:---|:---|
|
|
97
|
+
| `aclnnMatmulReduceScatterV2`(融合) | CCU 引擎在 fork 直调场景报 "CCU tiling accelerator not support"(需框架侧机制注入,超出直调合理成本);FP8 输入**必须带 scale**(per-tensor 量化语义,无 MX scale 输入,对标须声明差异);scale dtype/形状校验严格(FP32/E8M0、[M/128,K/128] 或 [K/128,N/128] 类分块);world group 不可手动创建(须用已初始化通信域);streamMode/commMode 参数组合有硬约束;宿主链接 libhccl.so 可能误链系统 9.1.0 版本 | 融合路径在直调场景常判 N/A(须留证归档),转分步路径 |
|
|
98
|
+
| `aclnnQuantMatmulV5` + `HcclReduceScatter`(分步) | 两段调用 + 中间同步,参数校验同样严格;须确认 aclnn 侧 scale 语义与被测算子对齐 | **推荐优先尝试**的分步对标路径 |
|
|
99
|
+
| mc2 融合算子直调 | 候选检索方法见 R15(按 op 名模式搜 `$ASCEND_HOME_PATH/opp/built-in/op_impl/ai_core/tbe/kernel/`),勿只查单一算子名即下 N/A 结论 | 首选(同语义同框架) |
|
|
100
|
+
|
|
101
|
+
> 工程纪律:对标试错属**设计期活动**——在 PLAN 中登记对标路径与预期成本;试错 ≥10 轮仍不可行时归档 N/A 证据(报错原文 + 参数组合)转下一候选,禁止无限试错。
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## 5. 实现细节模板(本场景专属落地形态)
|
|
106
|
+
|
|
107
|
+
> 通用方法论以 [`fusion.md`](../../fundamentals/fusion.md) §6.2 为唯一事实源;本节为落地骨架,新算子照搬结构、数值按自身 shape/dtype 重新推导。
|
|
108
|
+
|
|
109
|
+
### 5.1 AIV 严格分离编排骨架
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
AIV (RunAllToAllAndReduceSum):
|
|
113
|
+
jobIndex = GetBlockNum() - 1 - GetBlockIdx() ← 后 R 核通信
|
|
114
|
+
isCommBlock = (jobIndex < rankSize)
|
|
115
|
+
isComputeBlock = (blockIdx < usedCoreNum - rankSize) ← 归约核 = 前 (核数-R) 核
|
|
116
|
+
|
|
117
|
+
for t = 0..T-1(统一循环,T=1 自然退化):
|
|
118
|
+
全 AIV: CrossCoreWaitFlag(flagId) → SyncAll ← 无模板形态(Wait 后有标量流 Commit 下发,见 fusion.md §6.2.3)
|
|
119
|
+
通信核: Commit → Wait<BARRIER_NONE>(仅 Drain)
|
|
120
|
+
全 AIV: SyncAll
|
|
121
|
+
jobIndex=0: teamBarrier_.CrossDevice() ← 显式跨卡 fence
|
|
122
|
+
全 AIV: SyncAll
|
|
123
|
+
归约核: t≥1 时 ReduceSum(t-1)(与下一轮通信重叠)
|
|
124
|
+
尾轮: 归约核 ReduceSum(T-1);通信核 Finalize
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
> 同步机制选型依据(后 R 核映射下 TeamBarrier totalJobs=1 + 显式 CrossDevice,与官方前 R 核映射的 `Wait<BARRIER_DEVICE>` 模式互斥,机制分析见 [`communication.md`](../../fundamentals/communication.md) §2.2);SyncAll 无跨设备能力,跨卡可见性只能走 CrossDevice。
|
|
128
|
+
|
|
129
|
+
### 5.2 批量归约循环骨架
|
|
130
|
+
|
|
131
|
+
> 归约实现必须同时提供两路径([`fusion.md`](../../fundamentals/fusion.md) §6.2.6):逐行版(T>1 多 tile 路径)与批量版(tileCnt=1 路径,一次处理多行摊薄 flag 次数)。
|
|
132
|
+
|
|
133
|
+
**归约多核分治(必做)**:归约核集合(前 `rsCoreNum = usedCoreNum - rankSize` 核)内按行块均分本轮 `tileM` 行(连续行块、余数前摊),禁止单核归约(如 `GetBlockIdx()==0` 独担全量行)——归约耗时独占且多核误写同一输出区产生写竞争。
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
batchRows = UB预算 / (每行字节数 × 每元素 buffer 系数) // host 按 UB 推导
|
|
137
|
+
for batch in 按 batchRows 分批(覆盖本核行区间):
|
|
138
|
+
for i = 0..R-1(R 个来源,pingpong 双缓冲):
|
|
139
|
+
2D DataCopyPad(srcBuf[i%2], 来源 i 的本批行区间, blockCount=本批行数, 64B pitch)
|
|
140
|
+
Cast(srcFP32[i%2], srcBuf[i%2], CAST_NONE) // 独立 srcFP32,禁止 in-place
|
|
141
|
+
PipeBarrier<PIPE_V>()
|
|
142
|
+
Add(accFP32, accFP32, srcFP32[i%2])
|
|
143
|
+
Cast(dstBF16, accFP32, CAST_RINT)
|
|
144
|
+
2D DataCopyPad(yGm 本批行区间, dstBF16, blockCount=本批行数)
|
|
145
|
+
// 一批数据一次 SetFlag/WaitFlag(FIFO 特性摊薄)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### 5.3 归约事件配对模板(R19 落地形态)
|
|
149
|
+
|
|
150
|
+
4 类 HardEvent 的语义与 Set/Wait 时机以 [`fusion.md`](../../fundamentals/fusion.md) §6.2.6 为准;落地要点(pingpong slot = i%2):
|
|
151
|
+
|
|
152
|
+
- Init 时预初始化 `MTE3_V`(首次 Wait 前需有对应 Set)
|
|
153
|
+
- slot 复用前 `WaitFlag<V_MTE2>(slot)`;搬入后 `SetFlag<MTE2_V>` → Wait → Cast/Add → `SetFlag<V_MTE2>` 释放
|
|
154
|
+
- 循环结束**消费残留事件**(保持计数平衡,漏消费 → 后续挂死);R=1 边界注意 slot 1 从未 Set 的未定义行为
|
|
155
|
+
- 输出路径:等上批 MTE3 完成 → Cast → `V_MTE3` 配对 → 搬出 → 为下批预置 `MTE3_V`
|
|
156
|
+
|
|
157
|
+
### 5.4 手动 UB 布局与预算
|
|
158
|
+
|
|
159
|
+
> **UB 管理机制红线**:归约区 UB 管理必须与通信区使用同一机制——`TPipe::InitBuffer` 与 `Te::MakeMemPtr` 禁止混用(偏移空间不共享 → 地址重叠 → MTE2 越界)。推荐 `MakeMemPtr` 手动偏移(与官方算子一致,[`operator-anatomy.md`](../../operator-design/operator-anatomy.md) §4.3)。
|
|
160
|
+
|
|
161
|
+
slot 结构(示例布局):srcBuf[2](pingpong 搬入)+ srcFP32[2](pingpong Cast 目标,独立)+ accBuf(FP32 累加器,单份)+ dstBuf(输出)。
|
|
162
|
+
|
|
163
|
+
host 侧 UB 预算推导(参数化公式,系数按 dtype 路径代入):
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
perElemBytes = 2×sizeof(CType) + 2×sizeof(float) + sizeof(float) + sizeof(CType)
|
|
167
|
+
availableUB = UB 总量 - guard 通信区
|
|
168
|
+
maxElements = availableUB / perElemBytes
|
|
169
|
+
redUbN = min(N, 单次列宽上限) 且按对齐要求取整
|
|
170
|
+
redUbM = min(tileM, maxElements / redUbN)
|
|
171
|
+
// N > redUbN(strided 场景)时追加 redUbM ≤ 32(fusion.md §6.2.6 纪律 3 硬件限制)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
> *工程提示:整片申请 UB 后 kernel 内运行期算偏移(按 [sum|bf16×2|f32×2|out] 划分)与 host 传参布局同为合法形态,按 UB 预算与批量宽度选择。*
|
|
175
|
+
|
|
176
|
+
### 5.5 多套 tiling 字段契约(tiling_data.h)
|
|
177
|
+
|
|
178
|
+
```cpp
|
|
179
|
+
struct {OpName}TilingData {
|
|
180
|
+
CommTilingData commTilingData; // 通信切分(5 字段)
|
|
181
|
+
QuantMatmulTilingData mmTilingData; // 全量 tiling(GetTilingData(m, n, k)),T=1 退化用
|
|
182
|
+
QuantMatmulTilingData subMmTilingData; // head 子问题 tiling(GetTilingData(headMSize, n, k)),T>1 时强制存在
|
|
183
|
+
QuantMatmulTilingData tailMmTilingData; // tail tiling(GetTilingData(rankSize*tailMSize, n, k)),无尾块时字段仍须声明
|
|
184
|
+
// 通信派生字段:coreNum / rankSize / mSeg / chunkBytes / tileMaxBytes / stagingSize / redUbM / redUbN
|
|
185
|
+
};
|
|
186
|
+
// kernel 侧选择:(commTurn == 1) ? mmT : (isHeadTile ? subMmT : tailMmT);blockDim 恒用 mmTilingData.usedCoreNum
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
> **T>1 时 subMmTilingData 强制存在**:全量 tiling 的 baseM 可能大于 headMSize 导致 tile 分布不合理,必须为 headMSize 独立调 `GetTilingData`。
|
|
190
|
+
|
|
191
|
+
### 5.6 headMSize 标定原则
|
|
192
|
+
|
|
193
|
+
决策原则(通用):"分片小 → 减小 tile 让通信尽早启动;分片大 → 增大 tile 减少同步次数"。分档实质由 `tileMaxBytes = tileM×N×sizeof(CType)` 主导(N 维度),非纯 R 档——同 R 下小 N 与大 N 的最优 tileM 方向相反。**数值为示例标定,新算子按 tile 粒度与流水深度目标自行标定**:异常特征 case(tileCnt 非最优、SyncAll 占比偏高)须按通信覆盖率与收益实测搜索,单点最优值不跨 case 复用。对齐:16 的倍数;单尾块 16 对齐且 ≤ headMSize(host 校验)。
|
|
194
|
+
|
|
195
|
+
### 5.7 自研 FragmentTensor mm kernel 骨架
|
|
196
|
+
|
|
197
|
+
参考 AllGather `qmm_mx_kernel_ag_udma.h`(`QmmMxKernelAgUdma`)改造,独立 namespace。改造时区分**必须保留**与**可省略**:
|
|
198
|
+
|
|
199
|
+
| 必须保留(砍了即错) | 可省略(compute-first 特有) |
|
|
200
|
+
|:---|:---|
|
|
201
|
+
| per-fragment L1 隔离(`QmmMxBlockMmadFragment` 跨 rank 边界自动切 fragment) | dependId 预触发 / `WaitFlag`(计算不依赖通信) |
|
|
202
|
+
| fragment 地址公式:A 段 `aGM + r×mPerRank×fullK`(**fullK = 完整 K 行 stride,A 不切分**),C 段 `stagingGm + r×mPerRank×cBytesPerM`;`cFragAddrs_` 保持原始 rank 顺序 | Win 区离散地址解析(A 为本卡 GM 连续 rank 段) |
|
|
203
|
+
| localLast 编排(强制,见 §5.8):fragment 重排 `[remote..., local]` + 边界提前 SetFlag | winDataBase(无 Win 区读 A) |
|
|
204
|
+
| `SetL2Cache`(fullMBlock + 128B 对齐判定)+ tail tile `sch.UpdateTailTile` | — |
|
|
205
|
+
|
|
206
|
+
> **TransA/TransB 参数化**:Impl 模板必须含转置参数(Layout 条件选择),禁止固定 Layout。
|
|
207
|
+
>
|
|
208
|
+
> **地址公式红线**:A 行 stride = 完整 K;行宽必须用**字节**(`r × mPerRank × K × sizeof(AType)`)——把元素数当字节偏移仅在 1 字节 dtype 巧合成立,FP16/BF16 扩展时静默错位。官方 kernel 用显式 `dataBytesPerMRow` 字节行宽,照搬时勿"简化"。
|
|
209
|
+
>
|
|
210
|
+
> **借鉴官方 AG kernel 必改项**:其 `cFragAddrs_[8]` 为硬编码 8 槽——R > 8 静默越界,必须扩为 `MAX_FRAGMENT_COUNT=32`;其三区 HEAD/MAIN/TAIL 懒构建结构在 per-tile 调用形态下可按统一 for-t 轮次重建形态省略。
|
|
211
|
+
|
|
212
|
+
**Params 结构契约**(核心字段):`mmTile`(当前轮 tiling 指针)/ `qbmmParams` / `rankSize, rankId` / `mPerRank` / `tileM`(problem M = R × tileM)/ `k, n, scaleKLen`(k = 完整 K)/ `aGM, aScaleGM, bGM, bScaleGM`(B 全 rank 共享)/ `stagingGm`(C 输出 = PUT 通信源)/ `cBytesPerM, tileMOffset`。
|
|
213
|
+
|
|
214
|
+
核心方法:`BuildFragmentTensors`(cFragAddrs_ 按 staging 布局填、addrList localLast 重排、cFragAddrs_ 保持原始顺序)→ `Run`(构造 scheduler + FragL1Params + mmadFrag.Init)→ `Process`(调度循环:SetL2Cache → Slice → `mmadFrag(...)` 17 参调用散射到 staging)。
|
|
215
|
+
|
|
216
|
+
### 5.8 localLast 双 flag 通信提前启动(compute-first 默认编排)
|
|
217
|
+
|
|
218
|
+
机制原理见 [`fusion.md`](../../fundamentals/fusion.md) §6.2.2/§6.2.3。落地要点:
|
|
219
|
+
|
|
220
|
+
1. **localLast 重排只作用于 FragmentTensor addrList**:构造时跳过本 rank 段、最后追加;**`cFragAddrs_` 必须保持原始 rank 顺序**(mmadFrag 内部 L1 cache 管理依赖原始顺序)——写错 = 阻塞级错误。
|
|
221
|
+
2. **边界预计算**:`localFragBoundary = headMainRows - fragM`;调度循环内首次 `mPos >= localFragBoundary` 时 `SetFlag(flagA)`。
|
|
222
|
+
3. **兜底补 Set**:未跨边界核(无本卡 tile)必须补 Set flagA——否则 AIV `WaitFlag(flagA)` 挂死。
|
|
223
|
+
4. **AIV 两侧分等**:通信核 `WaitFlag(flagA)` 后启动 AllToAll;reduceSum 前 `WaitFlag(flagB)` 确认本卡段完成。
|
|
224
|
+
|
|
225
|
+
### 5.9 per-tile 子区间契约代码模板(AIC RunMatmul,T>1 实现红线)
|
|
226
|
+
|
|
227
|
+
```cpp
|
|
228
|
+
for (uint32_t t = 0; t < commTurn; ++t) {
|
|
229
|
+
uint32_t curTileM = GetTileM(t); // t < headTileCnt ? headTileM : tailTileM
|
|
230
|
+
uint64_t tileMOffset = GetTileMOffset(t); // t < headTileCnt ? t*headTileM : headTileCnt*headTileM
|
|
231
|
+
const auto& tileT = (commTurn == 1) ? mmTiling : (isHeadTile ? subMmTiling : tailMmTiling);
|
|
232
|
+
params.aGM = aGm + tileMOffset * axisK; // A 按行偏移
|
|
233
|
+
params.aScaleGM = scaleAGm + tileMOffset * scaleARowBytes;
|
|
234
|
+
params.cGM = workspaceGm + tileMOffset * axisN * sizeof(CType);
|
|
235
|
+
mmKernel_(params); // problem M = R × curTileM
|
|
236
|
+
CrossCoreSetFlag<0x2, PIPE_FIX>(flagId);
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
不变量与违反后果见 [`development-guide.md`](../../operator-design/development-guide.md) §3.5 per-tile 契约表(唯一事实源)。
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## 6. 合规映射(本场景重点项)
|
|
245
|
+
|
|
246
|
+
> 全量红线见 [`review-checklist.md`](../../review-checklist.md);违反任意红线 = FAIL。
|
|
247
|
+
|
|
248
|
+
| # | 约束 | 本场景落点 |
|
|
249
|
+
|:---|:---|:---|
|
|
250
|
+
| R9 | flag Set/Wait 严格配对 + flagId ∈ [0, FLAG_ID_MAX) | A6;以"每轮 Set 双 flag"替代 localLast = 性能 FAIL |
|
|
251
|
+
| R10 | 尾块策略 | §3.2 T 派生:默认 `T \| mSeg` 无尾块,否则策略 A padding + 多套 tiling |
|
|
252
|
+
| R14 | Win 数据/元数据分离(硬红线)+ 单轮 PUT 大小(风险提示) | 偏移三处同源(PUT 写/归约读/host 建链);单轮大小按 case 复核 |
|
|
253
|
+
| R16 | mm 默认 FragmentTensor | A1;"vendor kernel + FragmentTensor C 输出"= 阻塞级错误 |
|
|
254
|
+
| R21 | localLast 编排禁止移除 | A1/§5.8 |
|
|
255
|
+
| R17 | 归约禁止逐行搬运 | A4:2D DataCopyPad blockCount=本批行数;strided redUbM ≤ 32 或 1D 退化 |
|
|
256
|
+
| R18 | 归约独立 srcFP32 双缓冲 | A4:禁止 in-place 加宽 Cast |
|
|
257
|
+
| R19 | 归约事件配对完整 | A4/A7:四类 HardEvent 同迭代配对 + 残留事件消费 |
|
|
258
|
+
| R3 | 入口变体 + dtype dispatch | kernel_launcher.h 4 变体 + §3.3 |
|
|
259
|
+
| R12 | UB 静态通信区隔离 | TPipe 与 MakeMemPtr 二选一 |
|
|
260
|
+
| R20 | perf L2 flush 实接线 | §4 性能项 |
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## 后续阅读
|
|
265
|
+
|
|
266
|
+
| 文档 | 何时读 |
|
|
267
|
+
|:---|:---|
|
|
268
|
+
| [`fusion.md`](../../fundamentals/fusion.md) §6.2 | compute-first 架构原理与编排模式(通用方法论唯一事实源) |
|
|
269
|
+
| [`dev-methodology.md`](../../operator-design/dev-methodology.md) | 五阶段流程 + D1-D6 决策点(本场景为 D1=计算在前的取值示例) |
|
|
270
|
+
| [`operator-anatomy.md`](../../operator-design/operator-anatomy.md) §7 | 文件级契约与 MAX_FRAGMENT_COUNT |
|
|
271
|
+
| [`development-guide.md`](../../operator-design/development-guide.md) §3.5 | per-tile 子区间契约、dispatch 宏模板 |
|
|
272
|
+
| [`review-checklist.md`](../../review-checklist.md) | 全局红线 + 场景约束与 FAIL 诊断 |
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# get-all-gather-quant-matmul 场景设计
|
|
2
|
+
|
|
3
|
+
> 场景 ID:`get-all-gather-quant-matmul`
|
|
4
|
+
> 状态:`not_found`(AllGather GET 钩子未见源码记录;AllToAll GET 钩子已存在但官网无算子使用)
|
|
5
|
+
> 支持范围:GET 模式,AllGather + QuantMatmul,N 轴切分,UDMA
|
|
6
|
+
|
|
7
|
+
## 1. 准入条件
|
|
8
|
+
|
|
9
|
+
| 条件 | 说明 |
|
|
10
|
+
|------|------|
|
|
11
|
+
| 通信方向 | GET(计算→通信) |
|
|
12
|
+
| 编排形态 | AIC 先算,AIV 后拉 |
|
|
13
|
+
| 切分轴 | N 轴按 rank 切分(⚠️ 无官方样例,为原理推导) |
|
|
14
|
+
| 通信引擎 | UDMA |
|
|
15
|
+
| 算子类型 | AllGather + QuantMatmul |
|
|
16
|
+
| 官方参考 | 无(已验证事实:`block/aiv_comm/all_to_all/all_to_all_udma_get.h` 的 `AllToAllCommGetImpl` 已注册进 `CollectiveCommHelper<AllToAll, GET, ...>` 分发但无 kernel 使用方;**AllGather GET 钩子在源码中未见记录**——不得假定 `all_gather_udma_get.h` 存在,须在 Step 2 调查中以真实源码核对后记录 `not_found` 或补充证据) |
|
|
17
|
+
|
|
18
|
+
## 2. 消费输入
|
|
19
|
+
|
|
20
|
+
消费 matmul 链路事实(设计前核对结果),需求四要素中 `communication_direction=GET`、`split_axis=N`、`orchestration=AIC-first`。
|
|
21
|
+
|
|
22
|
+
## 3. GET 设计边界
|
|
23
|
+
|
|
24
|
+
### 3.1 通信方向与编排
|
|
25
|
+
|
|
26
|
+
| 维度 | 合同 |
|
|
27
|
+
|------|------|
|
|
28
|
+
| 方向 | GET = 计算→通信:AIC 先算 C 写到 Win 区,AIV 从远端 Win 区拉回本 rank 的 C 段 |
|
|
29
|
+
| 编排 | AIC 先 SetFlag → AIV WaitFlag |
|
|
30
|
+
| 回压 | AIC `CrossCoreWaitFlag<0x2, PIPE_M>(tid-bufCnt)` 环形回压(原理推导:回压 gate AIC 计算主流水,pipe 选取见 `api-crosscore-sync.md` §4;与 [`fusion.md`](../../fundamentals/fusion.md) §3.4 契约一致;bufCnt 为深度参数) |
|
|
31
|
+
|
|
32
|
+
### 3.2 数据分布
|
|
33
|
+
|
|
34
|
+
| 维度 | 合同 |
|
|
35
|
+
|------|------|
|
|
36
|
+
| 切分轴 | N 轴按 rank 切分,每 rank 持有 N/rankSize 段(输出 C 按 N 分布) |
|
|
37
|
+
| A 数据 | 各 rank 持有完整 A `[M, K]`(**A 不切分**:C 按 N 切分需全 M 的 A) |
|
|
38
|
+
| B 数据 | 各 rank 持有 B 的 N/rankSize 段 `[K, N/rankSize]`(**B 按 N 切分**,与输出 C 的 N 切分一致;见 [`../../../fundamentals/architecture.md`](../../fundamentals/architecture.md) §4 GET 行"B N-split") |
|
|
39
|
+
| C 输出 | 每 rank 写出 N/rankSize 段到 Win 区,AIV 拉回完整 C |
|
|
40
|
+
|
|
41
|
+
> ⚠️ 本场景标注 not_found(原理推导,未经官方源码验证):上述分布为按 AllGather+Matmul(GET、N-split 输出)的语义推导,实现前必须对照源码逐条验证钩子行为。
|
|
42
|
+
|
|
43
|
+
### 3.3 Win 区布局
|
|
44
|
+
|
|
45
|
+
| 维度 | 合同 |
|
|
46
|
+
|------|------|
|
|
47
|
+
| 环形复用 | Win 槽位环形复用 + 回压(bufCnt 控制槽位数) |
|
|
48
|
+
| 回压机制 | AIC `CrossCoreWaitFlag<0x2, PIPE_M>(tid-bufCnt)` 等待槽位可用(原理推导,非官方样例) |
|
|
49
|
+
| 数据/元数据 | 分离,host/kernel 偏移同源 |
|
|
50
|
+
|
|
51
|
+
### 3.4 通信轮次
|
|
52
|
+
|
|
53
|
+
| 维度 | 合同 |
|
|
54
|
+
|------|------|
|
|
55
|
+
| T 推导 | 由 host 派生,默认 `T \| mSeg` 无尾块 |
|
|
56
|
+
| flag 编排 | AIC SetFlag(tid) → AIV WaitFlag(tid),T=1 单次 / T>1 逐轮配对 |
|
|
57
|
+
|
|
58
|
+
### 3.5 flag 编排
|
|
59
|
+
|
|
60
|
+
| 维度 | 合同 |
|
|
61
|
+
|------|------|
|
|
62
|
+
| 发起方 | AIC 先 SetFlag → AIV WaitFlag |
|
|
63
|
+
| Wait 参数 | Wait(true) 按 waitLast 早退语义:DoWait 仅在 currentTileIdx_ == totalTiles - 1 时执行一次 |
|
|
64
|
+
| SyncAll | 不需要(CrossCore flag 已保证时序) |
|
|
65
|
+
| flagId | tid(tile 索引) |
|
|
66
|
+
|
|
67
|
+
## 4. 联合合同
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
AIC: mm 计算 → 写 Win 区 → SetFlag(tid) → WaitFlag(tid-bufCnt) 回压
|
|
71
|
+
AIV: WaitFlag(tid) → GET 从远端拉回 → 写输出 GM
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 5. Step 3 前提
|
|
75
|
+
|
|
76
|
+
- 设计前核对已记录官方未覆盖项(GET 无官方参考)
|
|
77
|
+
- 场景语义命中 `get-all-gather-quant-matmul` 判据
|
|
78
|
+
- GET 钩子源码已只读验证:AllToAll GET 钩子(`block/aiv_comm/all_to_all/all_to_all_udma_get.h`)已确认存在;AllGather GET 钩子已确认**未见源码记录**(not_found),设计按钩子契约级原理推导进行,实现前须以真实源码补证
|
|
79
|
+
|
|
80
|
+
## 6. 验证合同摘要
|
|
81
|
+
|
|
82
|
+
| 维度 | 合同 |
|
|
83
|
+
|------|------|
|
|
84
|
+
| golden 语义 | 每 rank 输入(本地数据 + 远端数据来源)与输出语义明确,N 轴切分 |
|
|
85
|
+
| 精度标准 | 以 ST verify_result.py 为准 |
|
|
86
|
+
| 多卡矩阵 | R=2/4 双档 |
|
|
87
|
+
| GET 稳定性 | 4+rank 不稳定已知风险(见 [`fusion.md`](../../fundamentals/fusion.md) §6.2.5 PUT 优先) |
|
|
88
|
+
|
|
89
|
+
## 7. 已知限制
|
|
90
|
+
|
|
91
|
+
- 官网无 GET 算子样例,GET 内容为钩子契约级描述
|
|
92
|
+
- 地址公式与 self 跳过规则需从 `block/aiv_comm/` 头文件直接验证
|
|
93
|
+
- GET 模式 4+rank 不稳定,PUT 优先
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# get-all-gather-quant-matmul 开发指导
|
|
2
|
+
|
|
3
|
+
> **场景 ID**:`get-all-gather-quant-matmul`(GET 模式,AllGather + QuantMatmul 融合,N 轴切分,UDMA 直调)
|
|
4
|
+
> **生效条件**:设计冻结后由 Step 3 编译进 PLAN(`implementation_route=apace_custom`,`selected_scenario=get-all-gather-quant-matmul`);Step 4 **只执行 PLAN**,不得在实现期新增设计决策。
|
|
5
|
+
> **前置阅读**:[`../../fundamentals/communication.md`](../../fundamentals/communication.md) §3(GET 钩子契约)、[`../../fundamentals/fusion.md`](../../fundamentals/fusion.md) §2/§3.4(GET 选型与环形回压)、[`../../fundamentals/compute.md`](../../fundamentals/compute.md) §3(QuantMatmulMxKernel)。
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. 状态说明:无官方参考,契约须源码验证
|
|
10
|
+
|
|
11
|
+
| 事项 | 状态 |
|
|
12
|
+
|:---|:---|
|
|
13
|
+
| GET 钩子基础设施 | ✅ 已存在:`apace/block/aiv_comm/all_to_all/all_to_all_udma_get.h`(`AllToAllCommGetImpl`),已注册进 `CollectiveCommHelper<AllToAll, GET, ...>` 分发 |
|
|
14
|
+
| AllGather GET 钩子 | ❌ 未实现(communication.md 钩子支持表:AllGather/GET = —) |
|
|
15
|
+
| GET 使用方 kernel | ❌ 官网 kernel/ 下两个算子均为 PUT 模式,无 GET 使用方 |
|
|
16
|
+
|
|
17
|
+
**开发纪律**:本文档为原理推导级指导。任何钩子行为假设(`PostInit`/`DoCommit`/`DoWait`/`DoFinalize` 职责、barrier 顺序、self 跳过、`Wait(true)` waitLast 早退语义)必须在实现前对照 `block/aiv_comm/` 源码逐条验证,并在 PLAN 第 11 章记录验证结论;与源码不符时以源码为准并回退设计阶段。
|
|
18
|
+
|
|
19
|
+
## 2. 有序动作(Step 4 按序执行)
|
|
20
|
+
|
|
21
|
+
| # | 动作 | 关键要点 |
|
|
22
|
+
|:--|:---|:---|
|
|
23
|
+
| 1 | 适配通信对象 | 优先**复用** `AllToAllCommGetImpl`(逐 targetRank 从远端 Win 拉回)。⚠️ **待验证假设**:其"按请求方 rankId 取槽位"语义是否天然覆盖 AllGather"收齐所有 rank 数据"语义,取决于 Win 布局合同,实现前必须对照源码逐条验证(本场景 not_found);仅当分发层要求 `CollectiveCommHelper<AllGather, GET, ...>` 时才新写 `AllGatherCommGetImpl`,且须保持与 AllToAll GET 相同的钩子契约(barrier 先 Core 后 Device、self rank 跳过) |
|
|
24
|
+
| 2 | 适配计算 | 复用 `QuantMatmulMxKernel`(`quant_matmul_mx_kernel.h`,CommPolicy 策略注入),AIC 按 N 轴切分算 C 并写入 Win 区(每 rank 持有 C 的 N/rankSize 列,B 可 N-split,见 architecture.md §4) |
|
|
25
|
+
| 3 | 实现 Win 槽位环形复用 + 回压 | Win 区按 bufferCount 槽位环形复用;**AIC 侧 `CrossCoreWaitFlag` 等待槽位可用 flag**(AIV 拉走数据后置位),禁止无回压覆写(fusion.md §3.4) |
|
|
26
|
+
| 4 | 完成 flag 编排闭环 | AIC 算完写 Win → `SetFlag`(C-ready);AIV `WaitFlag` → `Commit(GET)` → 拉取完成 → `SetFlag`(V-done / 槽位释放);尾部按 `Wait(true)` waitLast 语义处理——**最后一轮通信不被 Drain**,须由 `Finalize`/`DoFinalize` 的 CrossDevice barrier 完成 final drain,防止尾部越界覆盖 |
|
|
27
|
+
|
|
28
|
+
> ⚠️ GET `DoCommit` 内 `CrossCore()+CrossDevice()` barrier 是对端 AIC 槽位就绪的回压保证,**不可省**;barrier 顺序为先 Core 后 Device(与 PUT 相反)。
|
|
29
|
+
|
|
30
|
+
## 3. 文件级合同
|
|
31
|
+
|
|
32
|
+
| 文件 | 状态 | 说明 |
|
|
33
|
+
|:---|:---|:---|
|
|
34
|
+
| `kernel/{op_name}_tiling_data.h` | MODIFY | tiling 结构体:N 轴切分字段、Win 偏移、bufferCount、flag id、tile 字节数 |
|
|
35
|
+
| `kernel/{op_name}_impl.h` | MODIFY | Impl:Init/Run 编排,GET 模式 `AllToAllProcess` 中**不需要 SyncAll**(同步全由 CrossCore flag 负责,fusion.md §3.1) |
|
|
36
|
+
| `kernel/quant_matmul_mx_kernel.h` | REUSE | 复用官方 `QuantMatmulMxKernel`,仅注入 GET CommPolicy |
|
|
37
|
+
| `src/kernel_launcher.h` | MODIFY | `__global__` 入口含 `KERNEL_TYPE_MIX_AIC_1_1`;UDMA 模式带 `__gm__ CommContext*` |
|
|
38
|
+
| `src/main.cpp` | MODIFY | Tiling + fork 多 rank + HCCL 建链 + launch;host 前置校验 + perf 模式 L2 flush |
|
|
39
|
+
| `scripts/gen_data.py` / `verify_result.py` | MODIFY | golden 按 N 轴切分核对;多 rank 校验 |
|
|
40
|
+
| `block/` `tiling/` | 禁止修改 | 与官网仓原始文件完全一致(R4) |
|
|
41
|
+
|
|
42
|
+
## 4. 验证矩阵
|
|
43
|
+
|
|
44
|
+
| 维度 | 要求 |
|
|
45
|
+
|:---|:---|
|
|
46
|
+
| 精度 | golden 比对覆盖 N 轴各 rank 列段;dtype 全变体;**重点回归 R=2 与 R=4+**(GET 多 rank 数据可见性风险,见 §6) |
|
|
47
|
+
| 时序 | 大 shape / 多轮(bufferCount 环形翻转 ≥ 2 圈)下无脏读、无"假通过" |
|
|
48
|
+
| 同步 | flag idx 配对(AIV WaitFlag idx == AIC SetFlag idx);末轮 final drain 经 DoFinalize 验证 |
|
|
49
|
+
| 性能 | 真实大 shape × R=2/4 双档,与 mc2 融合算子 / hccl 分步路径对标归档(R15);perf 每轮实调 L2 flush kernel(R20) |
|
|
50
|
+
| 可靠性 | 单轮 PUT 大小按 case 复核(bring-up 期 ≤512KB 起步,非硬上限);所有 hcomm 调用返回值 assert |
|
|
51
|
+
|
|
52
|
+
## 5. 合规映射(本场景重点 R 项)
|
|
53
|
+
|
|
54
|
+
| R 项 | 本场景落点 |
|
|
55
|
+
|:---|:---|
|
|
56
|
+
| R1/R2 | 禁 `__schedmode__(1)`/`core_ratio`;入口含 `KERNEL_TYPE_MIX_AIC_1_1` |
|
|
57
|
+
| R4 | `block/` `tiling/` 零修改(GET 钩子只用不改) |
|
|
58
|
+
| R5 | C-ready / V-done / 槽位释放 flag idx 双侧配对 |
|
|
59
|
+
| R6 | UDMA 模式 `__gm__ CommContext*` |
|
|
60
|
+
| R12 | commBuf/barrierBuf 与 TPipe 管理 buffer 物理隔离 |
|
|
61
|
+
| R13 | 通信对象 `totalJobs=rankSize`(后 rankSize 核各负责 1 个 targetRank 并行 GET) |
|
|
62
|
+
| R14 | Win 数据/元数据区分离,host/kernel 偏移同源(硬红线);单轮 PUT 大小按 case 复核(风险提示) |
|
|
63
|
+
| R15/R20 | 投产级性能对标 + L2 flush 实接线 |
|
|
64
|
+
| R7/R8 | 禁 `AscendC::Matmul` 高阶 API、禁 `Hccl::*` |
|
|
65
|
+
|
|
66
|
+
## 6. 额外警示:GET 模式 4+ rank 不稳定性
|
|
67
|
+
|
|
68
|
+
- **PUT 优先原则**(fusion.md §6.2.5):GET 模式在 4+ rank 存在数据可见性问题,且官网无 GET 算子样例;设计期应已论证"必须 GET"的理由,否则回退 PUT。
|
|
69
|
+
- 已知绕行方案(communication.md 陷阱 #11):GET `Drain` 返回非 0 时,可用 `TeamBarrier.CrossDevice()`(跨 rank 就绪)+ `SyncAll<true>`(核间可见)后直接 `DataCopyPad` 读远端 Win 区。
|
|
70
|
+
- R≥4 精度回归不通过时**禁止带病交付**:先在 PLAN 第 11 章记录 `design_issue`,回退设计阶段评估改 PUT 或绕行方案。
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# apace 定制扩展场景注册表
|
|
2
|
+
|
|
3
|
+
> **定位**:本表是 apace 路线的**定制扩展场景唯一注册表**。Step 3(Design)在路线决策时,**仅当**设计前核对已记录官方 kernel 未覆盖的需求项后才查询本表;官方 `apace/kernel` 可直接调用或参考复用时(`apace_native` 路线)**不读取**本表。
|
|
4
|
+
>
|
|
5
|
+
> **查阅规则**:官方未覆盖项的**需求语义**命中某场景的语义判据时,**默认查阅**该场景的 design.md / development.md 作为设计基线,并将 `selected_scenario` 记录到 DESIGN.md。准入条件只含**需求侧语义判据**(数学语义、切分语义、通信方向),不含实现侧决策(通信实现方式、编排形态由场景文档指导决策,不作为准入前提)。语义零命中 → 判 `unsupported`;多命中 → 视为注册表缺陷或需求描述不清,停止并等待澄清,禁止自行择优。
|
|
6
|
+
>
|
|
7
|
+
> ⚠️ **已有生产实现的场景不受官方覆盖性判定反向阻断**:本仓/用户工程中已存在某场景的生产实现时,阅读该场景文档不需要"官方未覆盖"前提——场景文档同时是该类算子的改造/复用手册。
|
|
8
|
+
|
|
9
|
+
## 场景注册表
|
|
10
|
+
|
|
11
|
+
| 场景 ID | 支持范围 | 准入条件 | 设计指导 | 开发指导 | 状态 |
|
|
12
|
+
|:---|:---|:---|:---|:---|:---|
|
|
13
|
+
| `put-all-to-all-quant-matmul` | PUT 模式 AllToAll+QuantMatmul 的**变体扩展**(官方 kernel 未覆盖的需求:新 dtype 组合、bias/scale 融合、不同切分/编排),K 轴切分,UDMA 直调 | 通信原语为 AllToAll;localMatmul 为 QuantMatmul(含 scale);PUT 方向;核间数据沿 K 轴切分;UDMA;**且存在官方 kernel 未覆盖的 native gap**(标准 PUT AllToAll+QuantMatmul 需求走 `apace_native`,不读本表) | [design.md](put-all-to-all-quant-matmul/design.md) | [development.md](put-all-to-all-quant-matmul/development.md) | 已实现 |
|
|
14
|
+
| `put-all-gather-quant-matmul` | PUT 模式 AllGather+QuantMatmul 的**变体扩展**(新 dtype、bias 融合、rankSize>8、编排改造),M 轴输入切分,UDMA 直调 | 通信原语为 AllGather;localMatmul 为 QuantMatmul;PUT 方向;核间数据沿 **M 轴聚合**(每卡持本卡 M 行 × 全部 K 列,每卡输出全量 C);UDMA;**且存在官方 kernel 未覆盖的 native gap**(标准需求走 `apace_native`) | [design.md](put-all-gather-quant-matmul/design.md) | [development.md](put-all-gather-quant-matmul/development.md) | 已实现 |
|
|
15
|
+
| `get-all-gather-quant-matmul` | GET 模式,AllGather + QuantMatmul 融合,N 轴切分,UDMA 直调 | 通信原语为 AllGather;localMatmul 为 QuantMatmul;GET 方向;核间数据沿 N 轴切分;UDMA | [design.md](get-all-gather-quant-matmul/design.md) | [development.md](get-all-gather-quant-matmul/development.md) | not_found |
|
|
16
|
+
| `compute-first-reduce-scatter` | compute-first 模式,ReduceScatter 语义 + QuantMatmul 融合,输出沿 M 轴切分,UDMA 直调 | **逻辑语义为 ReduceScatter**(每 rank 输出 M 轴分片、跨 rank 求和);localMatmul 为 QuantMatmul;compute-first(先算后通信);UDMA。(通信实现方式——AllToAll PUT + 本地增量归约——由场景文档指导决策,非准入前提) | [design.md](compute-first-reduce-scatter/design.md) | [development.md](compute-first-reduce-scatter/development.md) | 已实现 |
|
|
17
|
+
|
|
18
|
+
### 状态说明
|
|
19
|
+
|
|
20
|
+
| 状态 | 含义 |
|
|
21
|
+
|:---|:---|
|
|
22
|
+
| 已实现 | 有官方参考或生产实现,design.md / development.md 已就绪,可直接指导开发 |
|
|
23
|
+
| planned | 场景已规划,指导文档编写中,暂不可用于路线决策 |
|
|
24
|
+
| not_found | 代码仓中尚无使用该场景的 kernel;`get-all-gather-quant-matmul` 当前仅 AllToAll GET hook(`block/aiv_comm/all_to_all/all_to_all_udma_get.h`)有源码记录,**AllGather GET hook 未见源码记录**,设计指导为原理推导,须经源码验证后方可采用 |
|
|
25
|
+
|
|
26
|
+
### 参考依据
|
|
27
|
+
|
|
28
|
+
- `put-all-to-all-quant-matmul`:官方参考算子 `all_to_all_quant_matmul`(K 轴切分、UDMA 直调范式来源);本场景定位为该范式的**变体扩展**指导,非标准 PUT 需求的重复
|
|
29
|
+
- `put-all-gather-quant-matmul`:官方参考算子 `all_gather_quant_matmul`(AllGather+**PUT**、M 轴输入切分、FragmentTensor 三区范式来源);本场景定位为该范式的**变体扩展**指导。注意与 `get-all-gather-quant-matmul` 的区别:官方 AG 是 PUT 模式(AIV 逐轮 PUT 到对端窗口),GET+AllGather 无任何官方实现
|
|
30
|
+
- `get-all-gather-quant-matmul`:官方暂无 GET 算子样例;GET 切分策略为原理推导(见 [`../workflow_integration.md`](../workflow_integration.md) Step 2 §切分策略)
|
|
31
|
+
- `compute-first-reduce-scatter`:已有生产实现(先本地计算、再 AllToAll PUT + 本地增量归约实现 ReduceScatter 语义),关键编排特征为 **compute-first + localLast 双 flag + 归约多核分治**(设计/开发合同见对应场景文档)。⚠️ 官方快照基准(`mc2/common/op_kernel/apace/`)中 ReduceScatter 仅为枚举占位(`collective_comm_api.h` 的 `CommCollectiveOp::ReduceScatter`,无 block 实现与 kernel 使用方)——本场景合同为自研编排,不与官方实现混淆
|
|
32
|
+
|
|
33
|
+
## 唯一匹配约束
|
|
34
|
+
|
|
35
|
+
1. 场景准入条件(语义判据)必须**互斥**:任意需求不得同时命中两个及以上场景的语义判据。
|
|
36
|
+
2. **语义零命中**(官方未覆盖项无场景可覆盖)→ 路线判 `unsupported`,阻塞 DESIGN.md。
|
|
37
|
+
3. **多命中** → 视为注册表缺陷或需求描述不清,判 `unsupported`,停止并等待澄清,禁止自行择优。
|
|
38
|
+
4. 命中后默认查阅命中场景的指导文档作为设计基线;跨场景拼接设计元素时必须在 DESIGN.md 中显式论证。
|
|
39
|
+
|
|
40
|
+
## 场景扩展
|
|
41
|
+
|
|
42
|
+
新增定制扩展场景时:
|
|
43
|
+
|
|
44
|
+
1. 在本目录下创建 `<scenario-id>/` 子目录(kebab-case,与表中场景 ID 一致)
|
|
45
|
+
2. 子目录内提供 `design.md`(设计指导)与 `development.md`(开发指导)
|
|
46
|
+
3. 在本表中登记一行,初始状态为 `planned`,文档就绪后改为 `已实现`
|
|
47
|
+
4. 登记前必须核对与已有场景的准入条件互斥,不满足唯一匹配约束的注册不予合入
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# 场景:put-all-gather-quant-matmul(AllGather + QuantMatmul 变体扩展)
|
|
2
|
+
|
|
3
|
+
> **状态**:已实现(官方参考算子 `apace/kernel/all_gather_quant_matmul/`)。
|
|
4
|
+
> **定位**:官方 AllGather 范式的**变体扩展**指导——标准 AllGather+QuantMatmul 需求走 `apace_native`(直接调用/参考复用官方 kernel),**不读本表**;本场景服务于官方 kernel 未覆盖的变体(新 dtype、bias 融合、rankSize>8、编排改造)与 AG 专属事实汇总。
|
|
5
|
+
|
|
6
|
+
## 1. 准入条件(语义判据)
|
|
7
|
+
|
|
8
|
+
通信原语为 AllGather;localMatmul 为 QuantMatmul(含 MX scale);PUT 方向;**核间数据沿 M 轴聚合**(每卡持本卡 A 分片 `[m, K]`,聚合后逻辑形状 `[R×m, K]`);UDMA;**且存在官方 kernel 未覆盖的 native gap**。
|
|
9
|
+
|
|
10
|
+
与 `put-all-to-all-quant-matmul` 的语义区分:A2A 是输入 K 轴切分(每卡持全部 M 行 × 本卡 K 段,输出 M 轴分布);AG 是输入 M 轴切分(每卡持本卡 M 行 × 全部 K 列,每卡输出**全量 C** `[R×m, N]`,各卡 B 独立故 C 不同)。
|
|
11
|
+
|
|
12
|
+
## 2. 数据分布与 golden 语义(区别于 A2A 的关键)
|
|
13
|
+
|
|
14
|
+
| 项目 | 合同 |
|
|
15
|
+
|:---|:---|
|
|
16
|
+
| 输入分布 | 每 rank 独立 seed(`BASE_SEED + rankId`)生成本卡 A `[m, K]`(MX 量化:data fp8 + scale e8m0 per-64-group);B 为本卡独立的 `[K, N]`(DN 列主:gen_data 写 `[N,K]` C-order 不转置,scaleB `[N, K/32]` C-order) |
|
|
17
|
+
| 通信语义 | AllGather = `np.concatenate` 各 rank 反量化 A(M 轴聚合,`[R×m, K]`) |
|
|
18
|
+
| 输出分布 | **每卡全量 C `[R×m, N]`**:`C_r = matmul(A_all_dequant, B_r_dequant) → bf16`——各卡 B 不同故输出不同(区别于 A2A 的 `[m, N]` 分片输出) |
|
|
19
|
+
| 精度标准 | bit-exact 或 raw uint16 差 ≤ 1 ULP(`verify_result.py`:bf16 raw uint16 比较,`raw_max ≤ 1` 即 PASS;大 K 下 fp32 累加非结合性产生百个量级 1-ULP 元素属正常)——**严于 A2A 的 1e-2 allclose**,因无跨卡部分和累加序问题 |
|
|
20
|
+
|
|
21
|
+
## 3. tiling 与切分(AG 专属公式)
|
|
22
|
+
|
|
23
|
+
| 项目 | 公式/结论 | 锚点 |
|
|
24
|
+
|:---|:---|:---|
|
|
25
|
+
| 切分轴 | M(`tileM = min(m, 512)`,`TILE_M=512` 常量,m < tileM 时收缩);K 不切 | `tests/st/all_gather_quant_matmul/src/main.cpp:47,111-114` |
|
|
26
|
+
| tiling 入参形状 | **聚合后总 M**:`totalLogicalM = rankNum × (tileCnt × tileM + tailCnt × paddedTailM)` 后调 `GetTilingData(totalLogicalM, n, k)` | 同上 `main.cpp:119-127` |
|
|
27
|
+
| 尾块对齐 | `paddedTailM = (tailM + 15) / 16 × 16`(kPaddingLength=16);FragmentTensor 以 `paddedTailM` 为 fragmentSize、`tailM` 为 realFragmentSize 表达 padding | `all_gather_mx_matmul_udma_impl.h:78,189`;`qmm_mx_kernel_ag_udma.h:523-528` |
|
|
28
|
+
| SWAT 开关 | AG 用 4 参重载 + **`SetOptimizeEnable(false)` + `SetMTailAlignEnable(true)`**(关闭边缘块合并、开启 M 尾 16 对齐——与 A2A 默认相反,移植时勿照抄 A2A) | `main.cpp:124-125` |
|
|
29
|
+
| host 校验 | `K % 32 == 0`、`CeilDiv(K, 64) % 2 == 0`(gen_data 与 main.cpp 双侧) | `main.cpp:81-86` |
|
|
30
|
+
| commTurn | `tileCnt + tailCnt`;AG 的 flagId 整体 **+1**(见 §4) | — |
|
|
31
|
+
|
|
32
|
+
## 4. Flag 编排(AG 专属:预触发模式)
|
|
33
|
+
|
|
34
|
+
与 A2A 的差异:AG 的 HEAD 区(本卡自身数据)**恒就绪**,AIV 在循环前**预触发 `CrossCoreSetFlag<0x2, PIPE_MTE3>(0)`**;循环内第 round 轮完成后 `SetFlag(round + 1)`。AIC 侧三区依赖映射:
|
|
35
|
+
|
|
36
|
+
| 区域 | M 范围 | dependTileIdx | 数据源 |
|
|
37
|
+
|:---|:---|:---|:---|
|
|
38
|
+
| HEAD | `[0, headRows)` | 0(预触发,立即返回) | 本地 aGM |
|
|
39
|
+
| MAIN | head + `[round × tileM × (R-1), ...)` | round + 1 | 各 rank 窗口(FragmentTensor,本 rank 除外) |
|
|
40
|
+
| TAIL | head + mainSection 之后 | commTurn(最后一轮) | 全部 rank(含本地,paddedTailM 对齐) |
|
|
41
|
+
|
|
42
|
+
AIC 统一经位掩码去重路径 wait(含 id 0,因已预触发不阻塞),收尾 drain 循环到 `commTurn` **含端点**。锚点:`qmm_mx_kernel_ag_udma.h:44(RegionTag),557-592(ResolveTileCtx),370-373(去重),410-414(收尾)`;`all_gather_mx_matmul_udma_impl.h:246-263(AIV 循环)`。
|
|
43
|
+
|
|
44
|
+
## 5. FragmentTensor 三区调度(AG 核心机制)
|
|
45
|
+
|
|
46
|
+
- HEAD/MAIN/TAIL 三区各维护 FragmentTensor(`ResolveTileCtx` 按调度 tile 的 mPos 分区)
|
|
47
|
+
- MAIN 区**延迟构建**:首次命中 `BuildMainFragment`,换轮 `UpdateMainRoundAddrs`(只换地址表不重建对象),构建开销被通信 wait 掩盖
|
|
48
|
+
- matmul 走 blaze_ext `QmmMxBlockMmadFragment`(A/scaleA/C 三侧 FragmentTensor,B/scaleB/bias 普通 GM tensor;调用契约见 [`compute.md`](../../fundamentals/compute.md) §7)
|
|
49
|
+
- AG 的 `SetL2Cache` 与 A2A 差异:无 isAtomicAdd 分支;scaleB 受 `fullMBlock && align` **双 gate**(`qmm_mx_kernel_ag_udma.h:246-273`)
|
|
50
|
+
|
|
51
|
+
## 6. 硬约束(AG 专属)
|
|
52
|
+
|
|
53
|
+
| 约束 | 说明 | 锚点 |
|
|
54
|
+
|:---|:---|:---|
|
|
55
|
+
| rankSize ≤ 8 | `cFragAddrs_[8]` / `winDataRankBase_[8]` / `winScaleRankBase_[8]` 为**定长 8 数组、循环无界检查**——R>8 静默越界;变体扩展到 R>8 必须先扩数组(建议按 `MAX_FRAGMENT_COUNT=32` 扩) | `qmm_mx_kernel_ag_udma.h:203-205,437-439` |
|
|
56
|
+
| barrierBuf/scale 区布局 | 窗口 rank-major:`[rank r][m 行 data][m 行 scale]`(data 段在前,scale 段 offset = dataRegionBytes_);UB 静态 512×2+32 | `all_gather_mx_matmul_udma_impl.h:135-142,166-171` |
|
|
57
|
+
| BarrierMode | data `Init<BARRIER_NONE>` + scale `Init<BARRIER_DEVICE>`(与 A2A 的 data NONE + scale 默认不同——AG 的 scale Wait 承担跨卡 fence) | 同上 `:166-171` |
|
|
58
|
+
| 单入口 | 官方仅 1 个 `__global__`(E4M3×E4M3→bf16,impl 头文件末尾);变体加 dtype 按 A2A 的 4 变体 launcher 模式补 | `all_gather_mx_matmul_udma_impl.h:267-278` |
|
|
59
|
+
| `localMatmul` 字段 | AG tiling **无** localMatmul(单 REMOTE 编排);加该能力须重设计 | `all_gather_mx_matmul_udma_tiling_data.h:36-39` |
|
|
60
|
+
|
|
61
|
+
## 7. ST 工程事实(AG 与 A2A 差异)
|
|
62
|
+
|
|
63
|
+
| 项目 | AG | A2A |
|
|
64
|
+
|:---|:---|:---|
|
|
65
|
+
| perf 计时 | `aclrtEvent` × 20 次(`BENCHMARK_ITERATIONS=20`)取平均 | `steady_clock` × 10 次去首帧 |
|
|
66
|
+
| `ASC_DEVKIT_MAJOR=9` | **无**(CMakeLists 无该宏) | 有 |
|
|
67
|
+
| cases.csv 列 | `m,k,n,rank_num`(无 head_m_size) | `m,k,n,rank_num,head_m_size` |
|
|
68
|
+
| devContext 处置 | `aclrtFree(devContext)`(与 A2A 不 free 的处置不同;新算子统一按 host-and-testing 口径处理) | 不 free |
|
|
69
|
+
| run.sh | 同构四阶段;`--check` 静默模式(供 perf 分支捕获 PASS/FAIL) | 无 `--check` |
|
|
70
|
+
| 用例特征 | 17 行含非对齐 M(2061/3085/4109/8205 触发尾块路径) | 8 行 |
|
|
71
|
+
|
|
72
|
+
## 8. 变体扩展改造点速查
|
|
73
|
+
|
|
74
|
+
| 变体 | 改动落点 |
|
|
75
|
+
|:---|:---|
|
|
76
|
+
| 新 dtype(E5M2/混合) | impl 模板参数 + 按 A2A launcher 模式加入口变体 + host dispatch(R3) |
|
|
77
|
+
| 加 bias | `QBMMTiling.isBias` + bias GM 传参(mmad 通道现成,参照 hcomm impl 已设 biasGmAddr 的写法) |
|
|
78
|
+
| rankSize > 8 | §6 硬约束:扩三数组 + 核数守卫重验(须 `usedCoreNum ≥ rankSize`) |
|
|
79
|
+
| M 轴聚合 + 输出分片混合语义 | 越界本场景——重新走场景注册表判据 |
|
|
80
|
+
|
|
81
|
+
## 9. 验证合同摘要
|
|
82
|
+
|
|
83
|
+
golden = 每 rank 独立 seed 反量化 A/B → `np.concatenate` A → matmul → bf16(§2)。精度 bit-exact/1-ULP(§2);先 tileCnt=1 串行基线(T=1 全 PASS 不能外推 T>1——三区布局与 flag 配对问题只在多 tile 暴露)。用例矩阵:rank 端点 × 对齐/非对齐 M(尾块路径)× 边界 shape(m<512 收缩、K=32 最小对齐)。
|