Just wondering, what's the performance for initialising a large
pyopencl.array in PyPy?
I'm asking because numpy.empty has abysmal performance on PyPy when you get
to large dimensions:
CPython:
>> timeit('np.empty((5,),
dtype=np.float64)', setup='import numpy as np',
number=1e6)
0.45080995559692383
>> timeit('np.empty((500000,),
dtype=np.float64)', setup='import numpy as
np', number=1e6)
0.5748040676116943
PyPy:
>
>> timeit('np.empty((5,),
dtype=np.float64)', setup='import numpy as np',
number=1e6)
0.20131182670593262
>
>> timeit('np.empty((500000,),
dtype=np.float64)', setup='import numpy as
np', number=1e3)
1.2475969791412354
PyPy is 2000 times slower than CPython when allocating 4MB worth of memory
O_O
On 31 May 2014 19:18, Andreas Kloeckner <lists(a)informa.tiker.net> wrote:
Tomasz Rybak <tomasz.rybak(a)post.pl> writes:
First - general comment.
I quite like an idea of changing PyOpenCL to work with PyPy.
Can I assume that this is just for PyOpenCL, and PyCUDA stays
Boost (and thus CPython) only for now?
Yep, I have no plans currently to port PyCUDA to cffi. If someone
decided to do that, I'd be supportive, but for now only PyOpenCL will
support PyPy.
I do not know yet how packaging will look like
for package
that both supports CPython and PyPy - I'll need to check that.
To be safe, I think pyopencl-bpl and pyopencl-cffi should be two
different packages, perhaps with a virtual package for dependencies to
use. pyopencl-cffi works on both CPython and PyPy, so it'd be nice if
the package exposed that. The two packages should conflict with each
other because they both supply a module called "pyopencl".
As for testing in the wild - if I'm able to
build PyPy
version I hope to be able to upload it to Debian experimental,
so interested Debian users could test it. I think that
some separate versioning for PyPy version will help here.
Great. PyPy's numpy isn't packaged yet, and PyPy 2.3 (which fixes a lot
of bugs, thus making all of this possible) is only a recent addition to
the Debian archive.
[1]
https://bitbucket.org/pypy/numpy
Andreas
_______________________________________________
PyOpenCL mailing list
PyOpenCL(a)tiker.net
http://lists.tiker.net/listinfo/pyopencl