code-migration
CommunityMigrate CUDA to Ascend NPU confidently
AuthorFeRhodium
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides a structured guide to migrate CUDA-based PyTorch code to Ascend NPU, detailing API replacements, migration patterns, and best practices to minimize manual effort and errors.
Core Features & Use Cases
- API Replacements: Map CUDA APIs to torch_npu equivalents to ensure correct device placement and execution.
- Migration Patterns: Common code patterns for initializing models, moving tensors, and training loops.
- Best Practices & Validation: Guidance on testing correctness and performance after migration across typical PyTorch workloads.
Quick Start
Start by identifying CUDA code sections, apply the CUDA-to-NPU mapping guide, and validate results on Ascend NPU using torch_npu, iterating until parity is achieved.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: code-migration Download link: https://github.com/FeRhodium/ascend-migration/archive/main.zip#code-migration Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.