[Numpy-discussion] Direct GPU support on NumPy

Stefan Seefeld stefan at seefeld.name
Tue Jan 2 15:38:41 EST 2018

On 02.01.2018 15:22, Jerome Kieffer wrote:
> On Tue, 02 Jan 2018 15:37:16 +0000
> Yasunori Endo <jo7ueb at gmail.com> wrote:
>> If the reason is just about human resources,
>> I'd like to try implementing GPU support on my NumPy fork.
>> My goal is to create standard NumPy interface which supports
>> both CUDA and OpenCL, and more devices if available.
> I think this initiative already exists ... something which merges the
> approach of cuda and opencl but I have no idea on the momentum behind
> it.
>> Are there other reason not to support GPU on NumPy?
> yes. Matlab has such support and the performances gain are in the order
> of 2x vs 10x when addressing the GPU directly. All the time is spent in
> sending data back & forth. Numba is indeed a good candidate bu limited
> to the PTX assembly (i.e. cuda, hence nvidia hardware) 

This suggests a new, higher-level data model which supports replicating
data into different memory spaces (e.g. host and GPU). Then users (or
some higher layer in the software stack) can dispatch operations to
suitable implementations to minimize data movement.

Given NumPy's current raw-pointer C API this seems difficult to
implement, though, as it is very hard to track memory aliases.




      ...ich hab' noch einen Koffer in Berlin...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180102/fd64da18/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.png
Type: image/png
Size: 1478 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180102/fd64da18/attachment.png>

More information about the NumPy-Discussion mailing list