Overview
Ascend NPU is an up-and-comer in the AI computing field, but most training and online inference scripts are based on GPUs. Due to the architecture differences between NPUs and GPUs, GPU-based training and online inference scripts cannot be directly used on NPUs.
The analysis and migration tool provides the capabilities of migrating PyTorch training scripts to the Ascend NPU platform, with no or minimal changes to the code. The tool provides the PyTorch Analyse function to enable users to analyze APIs, third-party library APIs, affinity APIs, and dynamic shapes in PyTorch training scripts. It also provides automatic migration and PyTorch GPU2Ascend tool-based migration to migrate GPU scripts into NPU scripts. This automatic migration mode reduces the learning cost and workload of manual script migration, thereby improving the migration efficiency.
- (Recommended) Automatic migration: You can simply import the library code into a training script and run it directly on the Ascend NPU platform after migration, with minimal code modifications required.
- PyTorch GPU2Ascend tool-based migration: The migration process generates an analysis file, which allows you to view the API support analysis report and the modification to the original training script during migration. This mode also enables the migration of single-device scripts to multi-device scripts.
Before using the analysis and migration tool to migrate data, check whether the parameters in the original project are accurate and can be successfully executed.