All Projects → spcl → npbench

spcl / npbench

Licence: BSD-3-Clause license
NPBench - A Benchmarking Suite for High-Performance NumPy

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to npbench

Datscan
DatScan is an initiative to build an open-source CMS that will have the capability to solve any problem using data Analysis just with the help of various modules and a vast standardized module library
Stars: ✭ 13 (-67.5%)
Mutual labels:  numpy
SimplePythonCNN
Only in native python & numpy with Keras interface
Stars: ✭ 31 (-22.5%)
Mutual labels:  numpy
lidar-buster
Collection of Python snippets for processing LiDAR point cloud.
Stars: ✭ 15 (-62.5%)
Mutual labels:  numpy
Data-Science-Resources
A guide to getting started with Data Science and ML.
Stars: ✭ 17 (-57.5%)
Mutual labels:  numpy
PVMismatch
An explicit Python PV system IV & PV curve trace calculator which can also calculate mismatch.
Stars: ✭ 51 (+27.5%)
Mutual labels:  numpy
saddle
SADDLE: Scala Data Library
Stars: ✭ 23 (-42.5%)
Mutual labels:  numpy
linbaser
The program on a given grid from a file builds an approximation of the function by a piecewise linear basis. Made mostly in Russian, because of university subject.
Stars: ✭ 10 (-75%)
Mutual labels:  numpy
datasets
🤗 The largest hub of ready-to-use datasets for ML models with fast, easy-to-use and efficient data manipulation tools
Stars: ✭ 13,870 (+34575%)
Mutual labels:  numpy
introduction to ml with python
도서 "[개정판] 파이썬 라이브러리를 활용한 머신 러닝"의 주피터 노트북과 코드입니다.
Stars: ✭ 211 (+427.5%)
Mutual labels:  numpy
natural-neighbor-interpolation
Fast, discrete natural neighbor interpolation in 3D on the CPU.
Stars: ✭ 63 (+57.5%)
Mutual labels:  numpy
datascienv
datascienv is package that helps you to setup your environment in single line of code with all dependency and it is also include pyforest that provide single line of import all required ml libraries
Stars: ✭ 53 (+32.5%)
Mutual labels:  numpy
hamilton
A scalable general purpose micro-framework for defining dataflows. You can use it to create dataframes, numpy matrices, python objects, ML models, etc.
Stars: ✭ 612 (+1430%)
Mutual labels:  numpy
onelinerhub
2.5k code solutions with clear explanation @ onelinerhub.com
Stars: ✭ 645 (+1512.5%)
Mutual labels:  numpy
skinner
Skin export / import tools for Autodesk Maya
Stars: ✭ 68 (+70%)
Mutual labels:  numpy
NDScala
N-dimensional arrays in Scala 3. Think NumPy ndarray, but type-safe over shapes, array/axis labels & numeric data types
Stars: ✭ 37 (-7.5%)
Mutual labels:  numpy
transonic
🚀 Make your Python code fly at transonic speeds!
Stars: ✭ 93 (+132.5%)
Mutual labels:  numpy
numpy-neuralnet-exercise
Implementation of key concepts of neuralnetwork via numpy
Stars: ✭ 49 (+22.5%)
Mutual labels:  numpy
python demo
一些简单有趣的Python小Demo
Stars: ✭ 109 (+172.5%)
Mutual labels:  numpy
NothingButNumPy
This repo is part of a series of blog post titled "Nothing but NumPy"
Stars: ✭ 43 (+7.5%)
Mutual labels:  numpy
audiophile
Audio fingerprinting and recognition
Stars: ✭ 17 (-57.5%)
Mutual labels:  numpy

npbench-logo

NPBench

Quickstart

To install NPBench, simply execute:

python -m pip install -r requirements.txt
python -m pip install .

You can then run a subset of the benchmarks with NumPy, Numba, and DaCe and plot the speedup of DaCe and Numba against NumPy:

python -m pip install numba
python -m pip install dace
python quickstart.py
python plot_results.py

Supported Frameworks

Currently, the following frameworks are supported (in alphabetical order):

  • CuPy
  • DaCe
  • Numba
  • NumPy
  • Pythran

Support will also be added shortly for:

  • Legate

Please note that the NPBench setup only installs NumPy. To run benchmarks with other frameworks, you have to install them separately. Below, we provide some tips about installing each of the above frameworks:

CuPy

If you already have CUDA installed, then you can install CuPy with pip:

python -m pip install cupy-cuda<version>

For example, if you have CUDA 11.1, then you should install CuPy with:

python -m pip install cupy-cuda111

For more installation options, consult the CuPy installation guide.

DaCe

DaCe can be install with pip:

python -m pip install dace

However, you may want to install the latest version from the GitHub repository. To run NPBench with DaCe, you have to select as framework (see details below) either dace_cpu or dace_gpu.

Numba

Numba can be installed with pip:

python -m pip install numba

If you use Anaconda on an Intel-based machine, then you can install an optimized version of Numba that uses Intel SVML:

conda install -c numba icc_rt

For more installation options, please consult the Numba installation guide.

Pythran

Pythran can be install with pip and Anaconda. For detailed installation options, please consult the Pythran installation guide.

Running benchmarks

To run individual bencharks, you can use the run_benchmark script:

python run_benchmark.py -b <benchmark> -f <framework>

The available benchmarks are listed in the bench_info folder. The supported frameworks are listed in the framework_info folder. Please use the corresponding JSON filenames. For example, to run adi with NumPy, execute the following:

python run_benchmark.py -b adi -f numpy

You can run all the available benchmarks with a specific framework using the run_framework script:

python run_framework.py -f <framework>

Presets

Each benchmark has four different presets; S, M, L, and paper. The S, M, and L presets have been selected so that NumPy finishes execution in about 10, 100, and 1000ms respectively in a machine with two 16-core Intel Xeon Gold 6130 processors. Exception to that are atax, bicg, mlp, mvt, and trisolv, which have been tuned for 5, 20 and 100ms approximately due to very high memory requirements. The paper preset is the problem sizes used in the NPBench paper. By default, the provided python scripts execute the benchmarks using the S preset. You can select a different preset with the optional -p flag:

python run_benchmark.py -b gemm -f numpy -p L

Visualization

After running some benchmarks with different frameworks, you can generate plots of the speedups and line-count differences (experimental) against NumPy:

python plot_results.py
python plot_lines.py

Customization

It is possible to use the NPBench infrastructure with your own benchmarks and frameworks. For more information on this functionality please read the documentation for benchmarks and frameworks.

Publication

Please cite NPBench as follows:

@inproceedings{
    npbench,
    author = {Ziogas, Alexandros Nikolaos and Ben-Nun, Tal and Schneider, Timo and Hoefler, Torsten},
    title = {NPBench: A Benchmarking Suite for High-Performance NumPy},
    year = {2021},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    url = {https://doi.org/10.1145/3447818.3460360},
    doi = {10.1145/3447818.3460360},
    booktitle = {Proceedings of the ACM International Conference on Supercomputing},
    series = {ICS '21}
}

Acknowledgements

NPBench is a collection of scientific Python/NumPy codes from various domains that we adapted from the following sources:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].