Discussion:
[Numpy-discussion] NumPy in PyPy
Papa, Florin
2016-08-05 07:42:35 UTC
Permalink
Hi,

This is Florin Papa from the Dynamic Scripting Languages Optimizations team in Intel Corporation.

Our team is working on optimizing the PyPy interpreter and part of this work is to find and fix incompatibilities between NumPy and PyPy. Does anyone have knowledge of real life workloads that use NumPy and cannot be run using PyPy?

We are also interested in creating a repository with relevant benchmarks for real world usage of NumPy, like GUPB for CPython, but we have not found such workloads for NumPy.

Thank you,
Florin
Benjamin Root
2016-08-05 21:20:48 UTC
Permalink
Don't know if it is what you are looking for, but NumPy has a built-in
suite of benchmarks:
http://docs.scipy.org/doc/numpy/reference/generated/numpy.testing.Tester.bench.html

Also, some projects have taken to utilizing the "airspeed velocity" utility
to track benchmarking stats for their projects. I know astropy utilizes it.
So, maybe their benchmarks might be a good starting point since they
utilize numpy heavily?

Cheers!
Ben Root
Post by Papa, Florin
Hi,
This is Florin Papa from the Dynamic Scripting Languages Optimizations
team in Intel Corporation.
Our team is working on optimizing the PyPy interpreter and part of this
work is to find and fix incompatibilities between NumPy and PyPy. Does
anyone have knowledge of real life workloads that use NumPy and cannot be
run using PyPy?
We are also interested in creating a repository with relevant benchmarks
for real world usage of NumPy, like GUPB for CPython, but we have not found
such workloads for NumPy.
Thank you,
Florin
_______________________________________________
NumPy-Discussion mailing list
https://mail.scipy.org/mailman/listinfo/numpy-discussion
Ralf Gommers
2016-08-06 08:05:24 UTC
Permalink
Post by Benjamin Root
Don't know if it is what you are looking for, but NumPy has a built-in
suite of benchmarks: http://docs.scipy.org/doc/numpy/reference/generated/
numpy.testing.Tester.bench.html
That's the very old (now unused) benchmark runner. Numpy has had an ASV
test suite for a while, see
https://github.com/numpy/numpy/tree/master/benchmarks for how to run it.
Post by Benjamin Root
Also, some projects have taken to utilizing the "airspeed velocity"
utility to track benchmarking stats for their projects. I know astropy
utilizes it. So, maybe their benchmarks might be a good starting point
since they utilize numpy heavily?
Cheers!
Ben Root
Post by Papa, Florin
Hi,
This is Florin Papa from the Dynamic Scripting Languages Optimizations
team in Intel Corporation.
Our team is working on optimizing the PyPy interpreter and part of this
work is to find and fix incompatibilities between NumPy and PyPy. Does
anyone have knowledge of real life workloads that use NumPy and cannot be
run using PyPy?
We are also interested in creating a repository with relevant benchmarks
for real world usage of NumPy, like GUPB for CPython, but we have not found
such workloads for NumPy.
The approach of GUPB is interesting (the whole application part that is,
the rest looks much more cumbersome than ASV benchmarks), but of course
easier to create for Python than for Numpy. You'd need to find whole
applications that spend most of their time in numpy but not in too small a
set of numpy functions. Maybe benchmark suites of other projects aren't
such a bad idea for that. Or spend a bit of time collecting relevant
published ipython notebooks.

Ralf
Chris Barker
2016-08-08 22:11:37 UTC
Permalink
Post by Papa, Florin
Does anyone have knowledge of real life workloads that use NumPy and
cannot be run using PyPy?
We are also interested in creating a repository with relevant benchmarks
for real world usage of NumPy,
We have a numpy -- heavy app. bu tit, like many others, I'm sure, also
relies heavily on Cython-wrapped C++ code, as well as pure Cython
extensions.

As well as many other packages that are also wrappers around C libs, Cython
-optimized, etc.

I've never tried to run it under PyPy I've always assumed it's a
non-starter.

Is there any hope?


If you are curious:

https://github.com/NOAA-ORR-ERD/PyGnome

-CHB
--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

***@noaa.gov
Papa, Florin
2016-08-09 10:49:14 UTC
Permalink
We have a numpy -- heavy app. bu tit, like many others, I'm sure, also relies heavily on Cython-wrapped C++ code, as well as pure Cython extensions.
As well as many other packages that are also wrappers around C libs, Cython -optimized, etc.
I've never tried to run it under PyPy I've always assumed it's a non-starter.
Is there any hope?
https://github.com/NOAA-ORR-ERD/PyGnome
-CHB
Hi Christopher,

Thank you for the information, I will investigate whether we can use PyPy for this workload.

Regards,
Florin
Papa, Florin
2016-08-09 11:03:11 UTC
Permalink
Don't know if it is what you are looking for, but NumPy has a built-in suite of benchmarks: http://docs.scipy.org/doc/numpy/reference/generated/numpy.testing.Tester.bench.html
That's the very old (now unused) benchmark runner. Numpy has had an ASV test suite for a while, see https://github.com/numpy/numpy/tree/master/benchmarks for how to run it.
 
Also, some projects have taken to utilizing the "airspeed velocity" utility to track benchmarking stats for their projects. I know astropy utilizes it. So, maybe their benchmarks might be a good starting point since they utilize numpy heavily?
Cheers!
Ben Root
Post by Papa, Florin
Hi,
 
Post by Papa, Florin
This is Florin Papa from the Dynamic Scripting Languages Optimizations team in Intel Corporation.
 
Post by Papa, Florin
Our team is working on optimizing the PyPy interpreter and part of this work is to find and fix incompatibilities between NumPy and PyPy. Does anyone have knowledge of real life workloads that use NumPy and cannot be run using PyPy?
 
Post by Papa, Florin
We are also interested in creating a repository with relevant benchmarks for real world usage of NumPy, like GUPB for CPython, but we have not found such workloads for NumPy.
 
Post by Papa, Florin
The approach of GUPB is interesting (the whole application part that is, the rest looks much more cumbersome than ASV benchmarks), but of course easier to create for Python than for Numpy. You'd need to find whole applications that spend most of their time in numpy but not in too small a set of numpy functions. Maybe benchmark suites of other projects aren't such a bad idea for that. Or spend a bit of time collecting relevant published ipython notebooks.
Ralf
Astropy definitely looks like a good candidate for a real life workload. Thank you also for the useful information on ASV.

Regards,
Florin

Loading...