torch_npu

Community

Seamless PyTorch acceleration on Huawei Ascend NPU devices.

Authordongg622
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill enables developers to efficiently utilize Huawei Ascend NPU hardware within PyTorch, enhancing training and inference speed.

Core Features & Use Cases

  • Environment setup and validation: Check if PyTorch and Ascend NPU environment are correctly configured for development.
  • Device management and memory utilization: Manage NPU devices, monitor memory, and optimize resource allocation.
  • Code conversion and optimization: Assist in format casting and tensor layout adjustments for better performance and compatibility.
  • Distributed training support: Enable multi-device and multi-node training with HCCL and RPC.
  • Use Case: Transitioning a PyTorch image classification model from GPU to Ascend NPU for faster training and deployment.

Quick Start

Install the torch_npu package, source the environment setup script, and verify device availability before running your training scripts directly on the NPU.

Dependency Matrix

Required Modules

torch-npupyyamlsetuptools

Components

scriptsreferences

💻 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: torch_npu
Download link: https://github.com/dongg622/china-ai-chip-skill/archive/main.zip#torch-npu

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.