[Numpy-discussion] Fwd: GPU Numpy
Francesc Alted
faltet@pytables....
Wed Sep 9 09:41:17 CDT 2009
A Wednesday 09 September 2009 11:26:06 Francesc Alted escrigué:
> A Tuesday 08 September 2009 23:21:53 Christopher Barker escrigué:
> > Also, perhaps a GPU-aware numexpr could be helpful which I think is the
> > kind of thing that Sturla was refering to when she wrote:
> >
> > "Incidentally, this will also make it easier to leverage on modern
> > GPUs."
>
> Numexpr mainly supports functions that are meant to be used element-wise,
> so the operation/element ratio is normally 1 (or close to 1). In these
> scenarios is where improved memory access is much more important than CPU
> (or, for that matter, GPU), and is the reason why numexpr is much more
> efficient than NumPy when evaluating complex expressions like
> ``a*b+c*sqrt(d)``.
>
> In other words, a GPU-enabled numexpr makes little sense.
Er, I forgot the fact that one exception to operation/element ratio being
normally 1 in numexpr is the computation of transcendental functions
(trigonometrical, exponential, logarithmic...) where the number of CPU
operations per element is much larger than 1 (normally in the 100s). Right
now, there is support for accelerating them in numexpr via VML (Intel's Vector
Math Library), but I suppose that a library making use of a GPU would be very
interesting too (and the same applies to numpy).
But again, it makes more sense to rely on external packages or libraries
(similar to the VML above) for this sort of things. After having a look at
CULA (thanks for the pointer, Lev!), my hope is that in short we will see
other libraries allowing for efficient evaluation of transcendental functions
using GPUs too.
--
Francesc Alted
More information about the NumPy-Discussion
mailing list