当前位置: 首页 > news >正文

CANN/cannbot-skills CUDA迁移规则模式

Rule Schema

【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体,本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skills

grammar_rules.yamlandconstraint_rules.yamlare the source of truth for syntax-rewrite rules and migration constraint rules.

The Markdown files remain human-readable browse views:

  • grammar.md
  • constraints.md

Update the YAML files first. Keep the Markdown views aligned afterward.

grammar_rules.yaml

Usegrammar_rules.yamlto record syntax-level rewrite rules for CUDA source code that must be adjusted for Ascend C SIMT.

Record Structure

- rule_id: assert-header pattern: assert category: debug status: required action: include_header cuda_form: assert(...) ascend_form: '#include "utils/debug/asc_assert.h"' note: Add the Ascend SIMT assert header when assert is used. source: - reference/grammar.md reviewed_by: human reviewed_at: "2026-04-06"

Field Definitions

  • rule_id

    • Required.
    • Unique identifier for the rule.
    • Use lowercase letters, digits, and hyphens.
  • pattern

    • Required.
    • The CUDA syntax pattern or construct this rule applies to.
  • category

    • Required.
    • Suggested values:
      • debug
      • memory-space
      • header
      • syntax
  • status

    • Required.
    • One of:
      • required: a fixed rule that must be applied
      • rewrite-required: syntax must be transformed
      • conditional: only applies in specific situations
      • unknown: rule not fully confirmed yet
  • action

    • Required.
    • One of:
      • include_header
      • syntax_replace
      • check_docs
      • manual_review
  • cuda_form

    • Required, may be empty.
    • Short representation of the CUDA-side form.
  • ascend_form

    • Required, may be empty.
    • Short representation of the Ascend-side form.
  • note

    • Required, may be empty.
    • Brief explanation of the rule or its scope.
  • source

    • Required.
    • List of references that justify the rule.
  • reviewed_by

    • Required, may be empty.
    • human,agent, or a more specific reviewer label.
  • reviewed_at

    • Required, may be empty.
    • ISO date string.

Maintenance Rules

  • Add a new rule when the syntax transformation is reusable across operators.
  • Do not encode one-off operator-specific hacks as global syntax rules.
  • If the rewrite rule is uncertain, keepstatus: unknownorstatus: conditional.
  • Prefer shortcuda_formandascend_formexamples over long code blocks.

constraint_rules.yaml

Useconstraint_rules.yamlto record unsupported or restricted features in the current migration model.

Record Structure

- rule_id: cooperative-groups feature: Cooperative Groups category: execution-model status: unsupported action: stop_and_report workaround: "" note: No workaround in the current migration model. source: - reference/constraints.md reviewed_by: human reviewed_at: "2026-04-06"

Field Definitions

  • rule_id

    • Required.
    • Unique identifier for the constraint rule.
    • Use lowercase letters, digits, and hyphens.
  • feature

    • Required.
    • Human-readable name of the constrained feature.
  • category

    • Required.
    • Suggested values:
      • graphics
      • execution-model
      • memory-model
      • performance-model
      • compilation
      • data-type
      • build
  • status

    • Required.
    • One of:
      • unsupported: the feature has no direct migration support in the current model; useactionto distinguish blocking features from removable unsupported subpaths
      • restricted: only usable with a workaround or limitation
      • conditional: support depends on context or extra confirmation
      • unknown: not fully investigated yet
  • action

    • Required.
    • One of:
      • stop_and_report: the selected migration path cannot continue
      • remove_and_record: remove or exclude the unsupported source subpath, record the exclusion, and continue only if supported behavior remains
      • manual_implementation
      • check_docs
      • manual_review
  • workaround

    • Required, may be empty.
    • The accepted workaround when one exists.
  • note

    • Required, may be empty.
    • Brief explanation of the constraint.
  • source

    • Required.
    • List of references that justify the rule.
  • reviewed_by

    • Required, may be empty.
    • human,agent, or a more specific reviewer label.
  • reviewed_at

    • Required, may be empty.
    • ISO date string.

Maintenance Rules

  • Useunsupportedonly when the feature itself has no direct migration support in the current migration model.
  • Useaction: stop_and_reportfor blocking unsupported features that prevent the selected migration path from continuing.
  • Useaction: remove_and_recordfor unsupported subpaths that may be removed or excluded while preserving supported source-visible behavior.
  • Userestrictedwhen a workaround exists but carries limits or extra migration work.
  • If the rule still needs confirmation, useconditionalorunknown; do not overstate support.
  • Keep workarounds short in YAML and move long explanations to Markdown if needed.

General Update Workflow

When a human or agent updates rule references:

  1. Update the relevant YAML file first.
  2. Keeprule_idstable once introduced.
  3. Add or revisesource,note, andreviewed_at.
  4. Sync the Markdown browse view if the rule meaning changed.

【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体,本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skills

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

http://www.jsqmd.com/news/902807/

相关文章:

  • Windows HEIC Thumbnail Provider技术方案 - 基于COM Shell扩展的HEIC格式缩略图生成系统
  • 2026导轨式升降机优质生产厂家推荐指南 - 资讯速览
  • 2026年四川颗粒保温板厂家推荐:选购攻略与避坑指南 - 深度智识库
  • 分段SAR ADC中被动电荷共享技术的线性度分析与设计权衡
  • ChatGPT抖音脚本创作实战手册(抖音算法适配版):覆盖口播/剧情/知识类3大垂类,含平台限流规避清单
  • 2026年汕头澄海全屋定制选购指南:环保板材与透明交付的破局之道 - 年度推荐企业名录
  • 别再手动挂盘了!用CentOS 7 + targetcli 5分钟搞定iSCSI网络存储(附开机自启配置)
  • 后端与DevOps未来25年演进:从AIOps到量子安全的技术路线图
  • 辽宁省阜新CPPMSCMP官网报考入口,官方授权双证报考中心 - 众智商学院课程中心
  • 2026腾讯游戏发布会亮点多:42款游戏新动态,AI大招与玩法全球化齐登场!
  • Linux操作系统中的标准、重定向输入输出、过滤器和管道符的使用
  • 导电聚合物枝晶生长机制与神经形态计算应用
  • 3个企业级时间序列预测的关键架构决策:TimesFM动态协变量高级应用指南
  • AD17画3D封装踩过的坑:从丝印不封闭到高度设置,我的避坑指南全在这了
  • 激光割管加工全解析:选厂家必看的核心维度 - 奔跑123
  • 【独家首发】ChatGPT竞品性能雷达图(覆盖19个维度):我们用217小时压力测试揭开了行业不愿公开的5大真相
  • 从Pearl因果图到快手实验设计:一张图讲透如何用DAG避开数据分析的‘坑’
  • 心语5.27:看看咱们项目现在的成熟度,哪里是短板?各部分完成度这些数据有变化吗?
  • Go语言Redis源码分析:数据结构实现
  • COMEX:基于RDMA与内核虚拟内存的透明远程内存扩展技术解析
  • 基于硬件在环仿真的机床颤振主动控制:从延迟补偿到VFC/DVF协同策略
  • 别再硬啃官方文档了!用CentOS 7和Stein版手把手带你部署OpenStack(附避坑清单)
  • 安徽墙体广告常见疑问解答,行业投放调研汇总 - 百航
  • 微信投票制作全指引(2026):合规免费平台及实操流程 摘要 - 投票评选活动
  • 5分钟搞定!国家中小学智慧教育平台电子课本批量下载终极方案
  • AI代码助手安全审计:Claude生成代码的四大风险与三层防护策略
  • 智能隧道识别数据集 隧道裂缝数据集 隧道渗水数据集 地铁隧道剥落识别 隧道缺陷识别计算机视觉数据集 隧道巡检数据集 第10210期
  • 如何用Harepacker复活版打造你的专属MapleStory世界:从新手到创作者的终极指南
  • Nintendo Switch文件管理实战指南:NX-Shell深度解析
  • 深度解析10款降AIGC工具:帮你锁定真正好用靠谱的一款 - 降AI小能手