원클릭으로
model-migration
Model code migration for Ascend NPU. Invoke when user needs to clone open-source repo and apply NPU adaptation patches.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Model code migration for Ascend NPU. Invoke when user needs to clone open-source repo and apply NPU adaptation patches.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Kubernetes 集群健康检查与安全修复 — 诊断问题,用户确认后执行修复
排查并优化 Ascend C 算子性能。当用户开发、审查或优化 Ascend C kernel 算子时使用,或当用户提及 Ascend C 性能优化、算子优化、tiling、流水、搬运、 内存优化、NPU/昇腾等关键词时触发。
多语言安全代码审查 (Security Code Review)。对 Python、C++、Shell、Markdown 文件进行系统性安全漏洞检测与修复指导。覆盖 OWASP Top 10、CWE Top 25、CERT 安全编码标准。当用户提及以下内容时,务必使用此技能:安全审查、安全代码审查、security review、code review 中的安全检查、漏洞扫描、安全合规检查(CWE/CERT/OWASP)、编写安全代码、检查代码安全性、推理服务安全审计、多模态 Token 安全校验、JSON 嵌套深度攻击防护。即使用户没有明确说'安全审查',只要涉及代码安全性评估、漏洞检测、安全最佳实践,都应触发此技能。
昇腾NPU CANN Toolkit+Kernels+NNAL安装部署技能。支持从官网下载run包安装和从Docker镜像提取两种方式,覆盖驱动检查、包下载、安装、环境变量配置与验证全流程。当用户需要安装CANN全套组件或指定版本CANN到自定义路径时调用。
根据设计文档生成 AscendC 算子完整代码实现并完成框架适配。TRIGGER when: 设计文档已完成,需要生成 op_host/op_kernel 代码、注册到 PyTorch 框架、编译测试。关键词:代码生成、op_host、op_kernel、tiling、kernel、框架适配、算子注册。
完成AscendC算子设计 - 帮助用户完成算子的架构设计、接口定义和性能规划。当用户提到算子设计、算子开发、tiling策略、内存规划、AscendC kernel设计、两级tiling、核间切分、核内切分时,使用此skill。
| name | model-migration |
| description | Model code migration for Ascend NPU. Invoke when user needs to clone open-source repo and apply NPU adaptation patches. |
Clone open-source model repositories and apply NPU adaptation patches for Ascend NPU training.
Ask user for the following:
1. Model name (e.g., BEVFormer)
2. Working directory path on server
3. Dataset path (if already prepared)
4. Pre-trained weights path (if available)
重要:DrivingSDK仓库地址为 https://gitcode.com/Ascend/DrivingSDK,包含所有必要的patch文件和训练脚本。
重要:必须在 DrivingSDK/model_examples/<model_name>/ 目录下克隆模型仓库,而不是在外部创建新目录。
# 进入DrivingSDK的model_examples目录
cd <DrivingSDK_path>/model_examples/BEVFormer
# 克隆模型仓库(会在当前目录下创建BEVFormer子目录)
git clone https://github.com/fundamentalvision/BEVFormer.git
# 将patch文件复制到克隆的模型目录中
cp bev_former_config.patch BEVFormer/
cd BEVFormer
git checkout 66b65f3a1f58caf0507cb2a971b9c0e7f842376c
# 在模型目录内应用patch
git apply --reject --whitespace=fix bev_former_config.patch
# 创建数据和权重目录
mkdir -p data ckpts
# 设置数据集软链接
ln -sf <dataset_path>/nuscenes data/nuscenes
ln -sf <dataset_path>/can_bus data/can_bus
# 设置预训练权重软链接
ln -sf <weight_path>/r101_dcn_fcos3d_pretrain.pth ckpts/
# 返回到model_examples/BEVFormer目录
cd ..
# 执行训练脚本
bash test/train_performance_8p_base_fp32.sh --batch-size=1 --num-npu=8
Repository: https://github.com/fundamentalvision/BEVFormer.git
Commit: 66b65f3a1f58caf0507cb2a971b9c0e7f842376c
Patch: bev_former_config.patch
Dataset Required:
Weights Required:
r101_dcn_fcos3d_pretrain.pthCommands:
# 进入DrivingSDK的model_examples/BEVFormer目录
cd <DrivingSDK_path>/model_examples/BEVFormer
# 克隆BEVFormer仓库
git clone https://github.com/fundamentalvision/BEVFormer.git
# 复制patch到BEVFormer目录
cp bev_former_config.patch BEVFormer/
# 进入BEVFormer目录
cd BEVFormer
# 切换到指定commit
git checkout 66b65f3a1f58caf0507cb2a971b9c0e7f842376c
# 应用patch
git apply --reject --whitespace=fix bev_former_config.patch
# 创建数据和权重目录
mkdir -p data ckpts
# 设置数据集软链接
ln -sf <dataset_path>/nuscenes data/nuscenes
ln -sf <dataset_path>/can_bus data/can_bus
# 设置预训练权重软链接
ln -sf <weight_path>/r101_dcn_fcos3d_pretrain.pth ckpts/
# 返回上级目录执行训练
cd ..
bash test/train_performance_8p_base_fp32.sh --batch-size=1 --num-npu=8
| Situation | Strategy |
|---|---|
| Server can access GitHub | Direct git clone on server |
| Server network timeout | Configure proxy or clone locally → scp to server |
| Proxy available | Configure proxy: export http_proxy=http://proxy:port |
重要:所有GitHub仓库克隆都应使用GitHub官方链接,不使用镜像站点。如果网络超时,优先配置代理。
If server cannot access GitHub:
# On local machine
git clone https://github.com/fundamentalvision/BEVFormer.git
cd BEVFormer
git checkout 66b65f3a1f58caf0507cb2a971b9c0e7f842376c
# Transfer to server
scp -r BEVFormer <user>@<server>:<working_directory>/
After migration, verify setup:
# Check directory structure
ls -la <model_directory>/
# Check patch applied
cd <model_directory> && git status
# Check data links
ls -la data/
ls -la ckpts/
.rej files for manual mergeDrivingSDK/model_examples/DrivingSDK/model_examples/<model>/README.md