Overview
This document describes how to migrate Intel MKL or some common math libraries to the Kunpeng Math Library to maximize the performance of the Kunpeng platform.
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
This document describes how to migrate common libraries of Intel MKL to KML, for example, migrating VML of MKL to
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 |
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 |
kspblas.h |
|
MKL-FFT |
mkl.h or mkl_dfti.h |
kfft.h |
|
MKL-LAPACK |
mkl.h or mkl_lapack.h |
klapack.h or kservice.h |
|
MKL-SOLVER |
mkl.h or mkl_rci.h |
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 |
kscalapack.h, klapack.h or kservice.h |
|