dionhaefner / pyhpc-benchmarks Goto Github PK
View Code? Open in Web Editor NEWA suite of benchmarks for CPU and GPU performance of the most popular high-performance libraries for Python :rocket:
License: The Unlicense
A suite of benchmarks for CPU and GPU performance of the most popular high-performance libraries for Python :rocket:
License: The Unlicense
DaCe (https://github.com/spcl/dace) is a parallel computing framework that also support Numpy frontend, similar to JAX and Numba. It runs on CPU/GPU/FPGA. Would be interesting to add it for comparison!
The Tensor Algebra Compiler (https://github.com/tensor-compiler/taco) seems to be good at sparse/dense linear algebra and has Python frontend: http://tensor-compiler.org/docs/pycomputations/index.html
Jax now supports using the TPU on Google Colab. It would be nice to try how it performs out of the box.
This project https://github.com/spcl/open-earth-compiler/ provides a DSL frontend for stencil/PDE programs, and rely on MLIR & LLVM to run on NVIDIA and AMD GPUs. It is not a Python frontend, but can be called from Python I think (see https://arxiv.org/abs/2005.13014)
Using:
conda env create -f environment-gpu.yml
leads to an error saying:
Exception:
=========================================================
The "tensorflow-gpu" package has been removed!
Please install "tensorflow" instead.
Other than the name, the two packages have been identical
since TensorFlow 2.1, or roughly since Sep 2019. For more
information, see: pypi.org/project/tensorflow-gpu
=========================================================
[end of output]
https://github.com/weld-project/weld can accelerate Python/numpy code by optimizing data movement.
the call
for backend in jax; do python run.py benchmarks/isoneutral_mixing/ --device gpu -b $backend -b numpy; done
yields
dTdz = jax.ops.index_update(
AttributeError: module 'jax.ops' has no attribute 'index_update'
and indeed index_update
is no longer a thing: https://jax.readthedocs.io/en/latest/jax.ops.html
Hi @dionhaefner, great comparisons, thanks for that! Out of interest. Did you ever try to run numba with fastmath=True
; does it make any difference, and if, how much?
https://github.com/fluiddyn/transonic can accelerate Python/Numpy code and run on accelerators
I am working on #14.
The command has inconsistent result output:
$ python run.py -r 2 -s 1048576 --device cpu -b pytorch benchmarks/turbulent_kinetic_energy/
Using pytorch version 1.13.0.dev20220617+cu113
Running 3 benchmarks... [------------------------------------] 0%Error: inconsistent results for size 1048576
Error: inconsistent results for size 1048576
Error: inconsistent results for size 1048576
Running 3 benchmarks... [####################################] 100%
benchmarks.turbulent_kinetic_energy
===================================
Running on CPU
size backend calls mean stdev min 25% median 75% max ฮ
------------------------------------------------------------------------------------------------------------------
1,048,576 pytorch 2 0.573 0.028 0.544 0.559 0.573 0.587 0.601 1.000
(time in wall seconds, less is better)
Looks like two consecutive runs will generate inconsistent results for turbulent_kinetic_energy. I guess the root cause is this line: https://github.com/dionhaefner/pyhpc-benchmarks/blob/master/benchmarks/turbulent_kinetic_energy/tke_pytorch.py#L264
There could be non-deterministic numeric results when running mask = tke[2:-2, 2:-2, -1, taup1] < 0.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.