Overview
In a broad sense, a math library is a math function interface library that provides high-performance scalar and vector calculation. Common math libraries include Intel Math Kernel Library (Intel MKL for short) and some open-source math libraries. The Kunpeng Math Library (KML) provides high-performance math functions optimized based on the Kunpeng platform. When you migrate an application that uses math library functions to the Kunpeng computing platform, the program needs to be adapted because the function definitions of different computing platforms or math libraries are different. This document is intended to help you solve this problem.
This document describes how to migrate common libraries of Intel MKL to KML, for example, migrating VML of MKL to KML_VML and BLAS of MKL to KML_BLAS (see Migration from Intel MKL to KML). It also describes how to migrate other common libraries to KML (see Migrating Other Common Math Libraries to KML.) Through migration, you can obtain better computing performance than common open source math libraries on the Kunpeng computing platform.
Table 1 shows the mapping between the math libraries before and after the migration.
Math Library to be Migrated |
KML |
||
|---|---|---|---|
Library |
Header File |
Library |
Header File |
icc-imf |
math.h or mathimf.h |
KML_MATH |
km.h |
MKL-VML |
mkl.h or mkl_vml.h |
KML_VML |
kvml.h |
MKL-BLAS |
mkl.h or mkl_blas.h |
KML_BLAS |
kblas.h |
MKL-SPBLAS |
mkl.h or mkl_spblas.h |
KML_SPBLAS |
kspblas.h |
MKL-FFT |
mkl.h or mkl_dfti.h |
KML_FFT |
kfft.h |
MKL-LAPACK |
mkl.h or mkl_lapack.h |
KML_LAPACK |
klapack.h or kservice.h |
MKL-SOLVER |
mkl.h or mkl_rci.h |
KML_SOLVER (iterative solution) |
kml_iss.h |
MKL PARDISO or PARDISO-cluster |
mkl_pardiso.h or mkl_cluster_sparse_solver.h |
KML_SOLVER (direct solution) |
kml_scadss.h |
PETSc |
petscksp.h |
KML_SOLVER (iterative solution) |
kml_iss.h/kml_scaiss.h |
MUMPs |
dmumps_c.h, smumps_c.h, cmumps_c.h or zmumps_c.h |
KML_SOLVER (direct solution) |
kml_scadss.h |
OpenBLAS |
cblas.h |
KML_BLAS |
kblas.h |
FFTW |
fftw3.h |
KML_FFT |
kfft.h |
MKL ScaLAPACK |
mkl.h or mkl_scalapack.h |
KML_ScaLAPACK |
kscalapack.h, klapack.h or kservice.h |