Skip to content

Package implementing NumPy's UFuncs based on SLEEF

License

BSD-3-Clause, BSD-3-Clause licenses found

Licenses found

BSD-3-Clause
LICENSE
BSD-3-Clause
LICENSE_intel_mkl_umath
Notifications You must be signed in to change notification settings

fujitsu/mkl_umath

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

mkl_umath for SVE

This repository provides Python module mkl_umath for SVE to speed up transcendental-function calculation of NumPy on CPUs supporting the AArch64 SVE instruction set. mkl_umath for SVE is based on mkl_umath.

Supported environment

  • Linux running on AArch64 CPU which supports SVE instructions.

Requirement

  • Linux
  • cmake
  • Cython
  • GCC (10.2.x or later is mandatory, because ACLE (Arm C Language Extension) support is needed.)
  • ninja-build
  • NumPy (1.24.x or later is recommended.)
  • Python3 (3.9.x or later is recommended.)

Build and Install

Build SLEEF

Because SLEEF (SIMD Library for for Evaluating Elementary Functions) is used as the vectorized implementation of transcendental functions, SLEEF must be built beforehand.

git clone https://github.com/shibatch/sleef sleef
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=directory_path_where_you_want_to_install_sleef -DENFORCE_SVE=TRUE -DBUILD_SHARED_LIBS=FALSE -G "Ninja" ../sleef
ninja
ninja test (This step can be skipped.)
ninja install

Build mkl_umath for SVE

git clone git@github.com:fujitsu/mkl_umath.git
cd mkl_umath
CC=gcc CXX=g++ SLEEF_PATH=directory_path_where_you_installed_sleef python setup.py build install

Usage

import numpy as np
a = np.double(np.random.random_sample(1024))
np.sin(a) # NumPy's transcendental function

import mkl_umath as um
um._patch.use_in_numpy()
np.sin(a) # mkl_umath for SVE

LICENCE

mkl_umath for SVE is licensed under BSD 3-Clause "New" or "Revised" License. Refer to the "LICENSE" file for the full license text and copyright notice.

This distribution includes and/or uses third party software governed by separate license terms.

About

Package implementing NumPy's UFuncs based on SLEEF

Topics

Resources

License

BSD-3-Clause, BSD-3-Clause licenses found

Licenses found

BSD-3-Clause
LICENSE
BSD-3-Clause
LICENSE_intel_mkl_umath

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 75.6%
  • C 21.0%
  • Cython 3.4%