By FeRhodium
PyTorch to Ascend NPU migration analyzer and optimizer. Analyze models for Ascend compatibility and generate fully optimized migrated code with ALL performance optimizations (fused attention, torch.compile, data transfer optimization, etc.).
Analyze a PyTorch model repository for Ascend NPU compatibility. Runs parallel analysis: architecture, dependencies, memory, and computation.
Quick compatibility check for a PyTorch model against Ascend NPU. Analyzes if the model can be migrated and identifies blockers.
Generate fully optimized migrated code for Ascend NPU. Applies ALL performance optimizations including fused attention, torch.compile, and data transfer optimizations.
Analyze PyTorch model architecture for Ascend NPU compatibility. Use when examining model structure, CUDA usage, distributed training patterns, and identifying migration requirements.
Migrate CUDA code to Ascend NPU code. Use when implementing PyTorch to NPU migration, replacing CUDA APIs with torch_npu equivalents.
Analyze computation-intensive operators and performance for Ascend NPU. Use when examining model operations, performance bottlenecks, and CANN operator library support.
Analyze Python package dependencies for Ascend NPU compatibility. Use when examining requirements.txt, setup.py, environment files, and checking for CUDA-dependent packages.
Analyze memory access patterns and optimization opportunities for Ascend NPU. Use when examining data loading, host-device transfers, mixed precision training, and memory efficiency.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Claude Code plugin for analyzing and migrating PyTorch models to Huawei Ascend NPU (torch_npu) with ALL performance optimizations applied automatically.
This plugin provides tools to:
✅ ALL Performance Optimizations Applied Automatically:
torch_npu.npu_fused_attention) - 30-50% speeduptorch.compile optimization - 10-20% speedupnon_blocking=True) - 10-15% speedup✅ Better Output Structure:
{chip_name}_{model_name} format (e.g., ascend_whisper)ascend-migration/ directory (not in plugin folder)✅ Higher Performance Target:
# Navigate to your project directory
cd /path/to/your/project
# Start Claude Code with the plugin
claude --plugin-dir /path/to/ascend-analyzer/ascend-migration
# Install the plugin
claude plugin install ascend-migration
# Restart Claude Code to load the plugin
/ascend-migration:analyzeAnalyze a PyTorch model repository for Ascend NPU compatibility.
# Basic usage
/ascend-migration:analyze "Whisper" "./repos/whisper"
# With specific target chip
/ascend-migration:analyze "ModelName" "/path/to/repo" --target-chip Ascend910
What it does:
Output: analysis_{model_name}.md
/ascend-migration:check-compatibilityQuick compatibility check for a model against Ascend NPU.
/ascend-migration:check-compatibility "ModelName" "/path/to/repo"
What it does:
Output: Brief compatibility report
/ascend-migration:migrate (v2.0 - Fully Optimized)Generate production-ready, fully optimized migrated code for Ascend NPU.
# Basic usage (chip_name defaults to "ascend")
/ascend-migration:migrate "Whisper" "./repos/whisper" "analysis_whisper.md"
# With custom chip name
/ascend-migration:migrate "Whisper" "./repos/whisper" "analysis_whisper.md" "ascend"
What it does:
Output:
ascend-migration/{chip_name}_{model_name}/
├── src/ # Migrated source code
│ └── [with ALL optimizations]
├── models/ # Migrated model definitions
├── training/ # NPU training scripts
├── utils/ # NPU utilities
│ ├── npu_utils.py # NPU-specific utilities
│ ├── optimizations.py # All optimization functions
│ └── amp_utils.py # AMP helper functions
├── tests/ # Test suite
│ └── test_optimizations/ # Tests for all optimizations
├── config/
│ ├── npu_config.yaml # NPU configuration
│ └── optimization_config.yaml # Optimization settings
├── requirements.txt # NPU-compatible dependencies
├── setup.py # Package configuration
├── install.sh # Installation script
├── Dockerfile # NPU environment
├── MIGRATION_SUMMARY.txt # Detailed change log
└── README_NPU.md # NPU documentation
torch_npu.npu_fused_attentiontorch.compile(mode="max-autotune")non_blocking=True, combined transfersnpx claudepluginhub ferhodium/ascend-migration从 gitcode-ascend 同步的 Ascend 技能集,包含 91 个技能: - analyse-coverage: 分析测试覆盖率盲区,生成覆盖率分析报告 - arxiv-recommendation-npu: 自动化推荐系统论文发现流水线。抓取 arxiv 推荐论文,检测源码,生成待迁移任务清单,由 npu-model-migration skill 完成 NPU 适配。 - ascend-inference-repos-copilot: 昇腾(Ascend)推理生态开源代码仓库智能问答专家旨在为 vLLM、vLLM-Ascend、MindIE-LLM、MindIE-SD、MindIE-Motor、MindIE-Turbo 以及 msM - ... 等 88 个技能
Skills for NVIDIAs ecosystem spans GPU acceleration, CUDA, AI agents, inference, robotics, Physical AI, Omniverse, and simulation. This plugin helps you understand the pieces, choose a path, validate your setup, and build practical NVIDIA-powered workflows.
Transfer learning adaptation
Agent skills for the FlagOS multi-chip AI inference platform. Includes kernel generation and optimization, model migration, environment verification, vendor onboarding, and more.
GPU kernel knowledge-base, benchmarking, profiling, and optimization-loop skills for CUDA, Triton, CuTe DSL, CUTLASS, PyTorch, and Nsight Compute workflows.
Machine learning training and inference pipeline using cloud GPUs (Modal, Lambda Labs, RunPod) with HuggingFace ecosystem - no local GPU required