Tools Summary【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skillsScopeagent/scripts/estimate_matmul_datamove.pyis a lightweight estimator for matmul data movement and tile-space feasibility.agent/scripts/build_agent_index.pybuilds machine-readable agent indexes from the human-readable example catalogs underagent/references/examples/.agent/scripts/select_kernel_example.pyranks existing kernel examples from the generated kernel index so authoring can start from the right study target faster.agent/scripts/check_kernel_catalog.pychecks thatkernel-catalog.md, the generated kernel index, and the realagent/example/kernels/*.pyfiles still agree.agent/scripts/gen_kernel_skeleton.pygenerates repository-style kernel scaffolds for cube-only, cube-vec, vec-cube, vec-cube-vec, cube-vec-cube-vec, and vec-cube-vec-cube topologies, with topology-specific profile variants.These tools do not launch kernels. They evaluate metadata, formulas, search candidates, or strategy estimates in Python.Core APIsestimate_percore_datamove(m, n, k, TILEM, TILEN, TILEK, mode, dbuf_leftTrue, dbuf_rightTrue, dbuf_l0cTrue)Estimates single-core data movement for one fixed loop mode.Validmodevalues areleft_first,right_first, andbalanced.Both operand-tile capacity andL0Coutput-tile capacity are checked before returning a result.estimate_multi_core(m, n, k, m_split, n_split, TILEM, TILEN, TILEK, nonempty_onlyFalse, dbuf_leftTrue, dbuf_rightTrue, dbuf_l0cTrue)Converts the full problem into a per-core subproblem, tries all three loop modes, and returns the minimum total data movement.nonempty_onlyTruecounts only non-empty split blocks;Falsemultiplies by the full split grid.estimate_strategy(m, n, k, num_core, split_mode, min_tile_mNone, min_tile_nNone, dbuf_l0cTrue)Brute-force searches split, tile, mode, and legal DBUF combinations.Returns a dictionary withbaseline_datamove,best_datamove,best_results, and a PrettyTable object intable.Capacity ModelTile-space feasibility usesMAX_TOTAL_TILE_ELEMENTS 128 * 1024.dbuf_leftFalsehalves only the left-matrix space term.dbuf_rightFalsehalves only the right-matrix space term.L0Coutput-tile feasibility is checked separately with:dbuf_l0cTrue:TILEM * TILEN 32 * 1024dbuf_l0cFalse:TILEM * TILEN 64 * 1024DBUF flags affect capacity only; they do not change the contenteditable="false">【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skills创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
CANN工具脚本使用指南
Tools Summary【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skillsScopeagent/scripts/estimate_matmul_datamove.pyis a lightweight estimator for matmul data movement and tile-space feasibility.agent/scripts/build_agent_index.pybuilds machine-readable agent indexes from the human-readable example catalogs underagent/references/examples/.agent/scripts/select_kernel_example.pyranks existing kernel examples from the generated kernel index so authoring can start from the right study target faster.agent/scripts/check_kernel_catalog.pychecks thatkernel-catalog.md, the generated kernel index, and the realagent/example/kernels/*.pyfiles still agree.agent/scripts/gen_kernel_skeleton.pygenerates repository-style kernel scaffolds for cube-only, cube-vec, vec-cube, vec-cube-vec, cube-vec-cube-vec, and vec-cube-vec-cube topologies, with topology-specific profile variants.These tools do not launch kernels. They evaluate metadata, formulas, search candidates, or strategy estimates in Python.Core APIsestimate_percore_datamove(m, n, k, TILEM, TILEN, TILEK, mode, dbuf_leftTrue, dbuf_rightTrue, dbuf_l0cTrue)Estimates single-core data movement for one fixed loop mode.Validmodevalues areleft_first,right_first, andbalanced.Both operand-tile capacity andL0Coutput-tile capacity are checked before returning a result.estimate_multi_core(m, n, k, m_split, n_split, TILEM, TILEN, TILEK, nonempty_onlyFalse, dbuf_leftTrue, dbuf_rightTrue, dbuf_l0cTrue)Converts the full problem into a per-core subproblem, tries all three loop modes, and returns the minimum total data movement.nonempty_onlyTruecounts only non-empty split blocks;Falsemultiplies by the full split grid.estimate_strategy(m, n, k, num_core, split_mode, min_tile_mNone, min_tile_nNone, dbuf_l0cTrue)Brute-force searches split, tile, mode, and legal DBUF combinations.Returns a dictionary withbaseline_datamove,best_datamove,best_results, and a PrettyTable object intable.Capacity ModelTile-space feasibility usesMAX_TOTAL_TILE_ELEMENTS 128 * 1024.dbuf_leftFalsehalves only the left-matrix space term.dbuf_rightFalsehalves only the right-matrix space term.L0Coutput-tile feasibility is checked separately with:dbuf_l0cTrue:TILEM * TILEN 32 * 1024dbuf_l0cFalse:TILEM * TILEN 64 * 1024DBUF flags affect capacity only; they do not change the contenteditable="false">【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skills创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考