| name | external-gitcode-ascend-drivingsdk-ascend-model-migration |
| description | Ascend NPU model migration suite. Invoke when user wants to migrate/train models on Ascend NPU, setup environment, or deploy models from open-source repositories. |
| original-name | ascend-model-migration |
| synced-from | https://gitcode.com/Ascend/agent-skills |
| synced-date | 2026-05-26 |
| synced-commit | 1f7666e7768a0ceb21bb1d40ce4b5179fcb6f1d6 |
| license | UNKNOWN |
Ascend Model Migration Suite
Complete model migration and training suite for Ascend NPU environment. This suite provides end-to-end workflow from SSH connection to model training.
When to Invoke
- User wants to migrate open-source models to Ascend NPU
- User needs to setup training environment on Ascend NPU
- User wants to train models (BEVFormer, etc.) on Ascend NPU
- User asks about model deployment on Ascend platform
Suite Structure
ascend-model-migration/
โโโ SKILL.md # Main skill (this file)
โโโ ssh-connection/ # SSH connection skill (from ssh-dev-suite)
โ โโโ SKILL.md
โโโ model-migration/ # Model migration skill
โ โโโ SKILL.md
โโโ model-training/ # Model training skill
โโโ SKILL.md
# External Dependencies (in AgentSkills/skills/)
โโโ ascend-mmlab-install-suite/ # MMLab environment setup
โโโ SKILL.md
Workflow Overview
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ ssh-connection โ โโโบ โ mmlab-install โ โโโบ โ model-migration โ โโโบ โ model-training โ
โ โ โ -suite โ โ โ โ โ
โ Connect to โ โ Install mmcv, โ โ Clone repo, โ โ Execute โ
โ Ascend server โ โ mmdet, mmdet3d โ โ apply patches โ โ training scriptโ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
Complete Workflow
Phase 0: DrivingSDK Preparation
DrivingSDKไปๅบๅฐๅ๏ผhttps://gitcode.com/Ascend/DrivingSDK
ๅจๅผๅงไปปไฝๅทฅไฝๅ๏ผ็กฎ่ฎคDrivingSDKๅทฒๅ
้ๅฐๅทฅไฝ็ฎๅฝ๏ผ
cd <working_directory>
git clone https://gitcode.com/Ascend/DrivingSDK
้่ฆ๏ผDrivingSDKๅ
ๅซๆๆๅฟ
่ฆ็patchๆไปถๅ่ฎญ็ป่ๆฌ๏ผๆ ้ๅ็จๆท่ฏข้ฎpatchไฝ็ฝฎใ
Phase 1: Environment Information Collection
Ask user for the following information:
1. Server IP address (e.g., 192.168.13.151)
2. SSH username (e.g., root)
3. Docker container name (if applicable, e.g., qianqian_0312)
4. Conda environment name (e.g., qianqian_2)
5. Working directory path (e.g., /home/zqq/0312_trae_new)
Use ssh-connection skill (this suite) to establish connection.
Phase 2: Environment Setup
Use AgentSkills/skills/ascend-mmlab-install-suite/ to install dependencies:
- Verify base environment (torch, torch_npu, CANN)
- Install MMLab dependencies:
- mmcv-full (with NPU operators)
- mmdetection
- mmsegmentation
- mmdetection3d
- detectron2
Phase 3: Model Migration
Use model-migration skill (this suite) to prepare model code:
- Clone open-source repository
- Apply NPU adaptation patches
- Setup dataset and weight links
Phase 4: Model Training
Use model-training skill (this suite) to launch training:
- Select training mode (performance/accuracy)
- Execute training script
- Monitor training progress
Supported Models
| Model | Status | DrivingSDK Path |
|---|
| BEVFormer | โ
Supported | model_examples/BEVFormer |
| More models | ๐ Coming soon | - |
Quick Start Example
User: "I want to train BEVFormer on Ascend NPU"
Agent workflow:
1. [ssh-connection] Ask for server info โ Connect
2. [ascend-mmlab-install-suite] Check environment โ Install MMLab deps
3. [model-migration] Clone BEVFormer โ Apply patch โ Link data
4. [model-training] Launch training โ Monitor progress
Key Principles
NPU Compatibility Check
After installation, verify NPU compatibility:
python -c "import site; print([p for p in site.getsitepackages() if 'cuda' in p.lower()])"
Should return empty list [] for NPU environment.
Network Strategy
| 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ๅฎๆน้พๆฅ๏ผไธไฝฟ็จ้ๅ็ซ็นใๅฆๆ็ฝ็ป่ถ
ๆถ๏ผไผๅ
้
็ฝฎไปฃ็ใ
Error Handling
Each sub-skill handles its own errors and provides recovery suggestions. Common issues:
- SSH connection failed: Check IP, username, password/key
- NPU device not found: Check environment variables
- CUDA paths conflict: Reinstall with NPU support
- Patch application fails: Check code version
Environment Variables Reference
Common Ascend NPU environment variables:
export ASCEND_SLOG_PRINT_TO_STDOUT=0
export ASCEND_GLOBAL_LOG_LEVEL=3
export TASK_QUEUE_ENABLE=2
export COMBINED_ENABLE=1
export HCCL_WHITELIST_DISABLE=1
export HCCL_CONNECT_TIMEOUT=1200
Note: ASCEND_RT_VISIBLE_DEVICES may be required in specific environments.
Reference Files
- SSH connection:
ssh-connection/SKILL.md (this suite)
- MMLab install suite:
AgentSkills/skills/ascend-mmlab-install-suite/SKILL.md
- DrivingSDK path:
DrivingSDK/model_examples/
- Model migration:
model-migration/SKILL.md (this suite)
- Model training:
model-training/SKILL.md (this suite)