Introduction
This document describes how to develop PyTorch on Kunpeng servers, including source code build, installation, and development verification.
PyTorch provides flexible and easy-to-use tensor computation and automatic differentiation capabilities based on its core features: dynamic computational graph (Define by Run) and immediate execution mode. Deploying PyTorch on Kunpeng servers allows for operator-level deep optimization for Ascend NPUs and Kunpeng processors through Kunpeng PyTorch extension (KPEX). Additionally, the collaboration between the KML math library and BiSheng compiler significantly accelerates intensive computations such as GEMM at the fully connected layer.
In GPU scenarios, CUDA must be enabled during the build phase to prevent the generation of build products that support only CPUs.