A research group led by Chen Mohan from Peking University adapted ABACUS—an open-source density functional theory (DFT) package developed in China—for the full line of Huawei Kunpeng 920 processors. Furthermore, the team optimized 19 different classes of core operators. This was reported by Huawei Computing in a publication on October 31, as learned by IT Home. The code was uploaded to the project repository on GitHub.
Density functional theory (DFT) is a primary first-principles method for studying the properties of materials such as metals and semiconductors. ABACUS was jointly developed by several institutions and has over a thousand users across more than one hundred organizations.
According to the team's data, when configuring both sides to 28 cores with 28 processes running one thread each, the Kunpeng 920 build, utilizing the SVE instruction set, showed speeds 1.3 to 3.9 times faster than a standard x86 CPU when working with a standard set of 10 material systems containing 8 to 216 atoms, including GaAs, MoS2, BaTiO3, iron, and silicon. When using the chip's matrix computation unit, the speedup reached up to 10.7 times when operating on all cores of a single node. In cases of stochastic DFT, the team recorded a speed increase of 2.8 to 3.1 times for SVE and 6.1 to 20.1 times for the build using the matrix block.
The initial step was porting, as various Kunpeng 920 models support vector instructions NEON, SVE, or SVE512, as well as a dedicated matrix block, which remain unused when using general compiler options. The team created separate toolchains: gcc with OpenMPI and OpenBLAS was used for NEON and SVE builds, while clang with HMPI and KBLAS from Huawei was used for others, and the USE_KML option was added for integration with the Kunpeng Math Library. All compiled versions passed ABACUS integration tests covering DFT for plane waves and LCAO Kohn-Sham, stochastic DFT, and DeePKS, with results matching the main implementations.
Next, the team rewrote frequently called small operators. Replacing the recursive procedure for the generalized Laguerre polynomial with an iterative recurrence allowed complexity reduction to O(n) and made it approximately eight times faster in a million-test run. Switching interpolation search to binary search reduced the average number of comparisons in a 400-entry table from about 200 to nine. Other changes included trigonometric recurrences, cycle invariant lifting, mixed-precision tuning, and memory layout, with the numerical results of each operator being re-verified.
Using automatic source code optimization in Huawei's DevKit, the team also increased the processing speed for an 8-atom high-density carbon case by 2.28 times and a 512-atom silicon case by 2.66 times on the newer Kunpeng 920 model. Huawei notes that the resulting tuning experience can be applied to other scientific software.


