Arm are proud to announce that we have now released our first version of Arm Performance Libraries (ArmPL) fully compatible with M-series Apple silicon running macOS. This release brings the full support for all the areas included in the usual Linux releases.
Arm Performance Libraries itself has been available for Linux-based AArch64 systems since 2015 and is already commonly used for HPC applications. It provides a high-performing CPU-based implementations of the following commonly used numerical functionality:
The use of the standard APIs for BLAS, LAPACK and the FFTs means users can easily switching between using other libraries and ArmPL. All existing applications that use these interfaces will work without code changes.
Hopefully nothing! This version includes both C/C++ and Fortran interfaces. Full documentation is available online for all functions. The library also has a set of example programs provided at installation time that can be used, not only to verify you can link correctly, but also to demonstrate how to use our custom sparse interfaces.
Optimizations in this release are tailored to the M1 and M2 families of chips for Mac, including parallel implementations using OpenMP on the available cores. We're looking forward to getting feedback from users on how they get to accelerate their own application performance using this product.
In order to get Arm Performance Libraries simply head over to our Download page. No payment or license is needed, simply install and you will be good to go.
The libraries are provided from a standard Mac mountable disk image (.dmg) which contains an installation script. Once installed, simply modify the build environment of your application to point to your ArmPL install directory and link in the correct library.
.dmg
As with existing versions of Arm PL, we provide builds using 32-bit and 64-bit integers, and with and without OpenMP. For the Mac version we ensure compatibility with the latest released version of LLVM, i.e. LLVM 16. C/C++ users are therefore advised to install clang version 16 or above, including support for OpenMP run time libraries. We suggest using either Homebrew (https://brew.sh/) or MacPorts (https://ports.macports.org). Installing LLVM using each of these is done, respectively, using the commands:
brew install llvm@16
or
port install clang-16
In addition, users are advised to set the following environment variables, especially if running the examples provided:
export ARMPL_DIR=<location of Arm PL armpl_23.06_flang-new_clang_16 directory> export OPENMP_DIR=<location of libomp.dylib>
For convenience we provide a version of libomp.dylib in ${ARMPL_DIR}/lib.
libomp.dylib
${ARMPL_DIR}/lib
Users who wish to link to the libraries only from C/C++ will still need to link to the Fortran runtime libraries, libFortranDecimal.a and libFortranRuntime.a which are also provided in ${ARMPL_DIR}/lib.
libFortranDecimal.a
libFortranRuntime.a
Today there are limited choices of Fortran compilers available for Macs, and we are very pleased to announce that we have produced the Fortran parts of the library using the new LLVM Flang project. Whilst Flang is still in development we are confident that we have ArmPL as a good proof point of the continued development of that compiler as it heads towards production level. Fortran users, those who have Fortran source code to compile, should download. and build the LLVM Fortran compiler for MacOS. The source repository can be downloaded from https://github.com/llvm/llvm-project.git.
The following libraries are provided:
libarmpl_lp64
libarmpl_lp64_mp
libarmpl_ilp64
libarmpl_ilp64_mp
Each of the library types are provided as static (e.g. libarmpl_lp64.a) and dynamic (e.g. libarmpl_lp64.dylib). Advice on how to use dynamic libraries is given in our documentation. Note that the availability of both 32-bit and 64-bit integers version is one of the advantages of using ArmPL over some other frameworks which just offers a single choice of interface.
libarmpl_lp64.a
libarmpl_lp64.dylib
An example of linking to the OpenMP version of the library with 32-bit integer interfaces using clang would be:
clang foo.o -fopenmp -L${ARMPL_DIR}/lib -larmpl_lp64_mp -lFortranDecimal -lFortranRuntime -lm -lc++ -o foo.exe
The releases of Arm Performance Libraries for Apple silicon on macOS will be continued going forward as part of our regular release cycle. This aims for two major releases each year with the 23.10 being the next scheduled release in October. Getting feedback from users will help us plan all future work so don't hesitate to get in contact through our user forum.