Re: [PyCUDA] non-contiguous array support

2018-02-23 Thread Andreas Kloeckner
Syam Gadde  writes:

> Sorry if this comes through multiple times, I've been having problems posting 
> from an email alias.
>
>
> Andreas suggested I mail the mailing list and solicit comments here.
>
> I submitted a pull request that adapts the element-wise kernels to support 
> non-contiguous arrays (including negative-strided arrays):
>
> https://github.com/inducer/pycuda/pull/171
>
> There have been a number of requests for this kind of functionality, so I'm 
> hoping this is useful (at least as a proof-of-concept).  It passes all 
> current PyCUDA tests, but I've got some local code that fail for some more 
> complicated cases.  (Unfortunately can't reduce it to a unit test yet)  But 
> most things work.
>
> In some ways it's an elaborate monkey-patch meant to disturb existing code as 
> little as possible, but if you create your own element-wise kernels, to get 
> the new functionality you have to make a few changes.
>
>
> More details at the above PR.
>
>
> Anyway, if anyone is interested in trying it out, I'd be interested to hear 
> how it works for you, or whether you have suggestions for fixes.  The code is 
> in my fork:
>
> https://github.com/SyamGadde/pycuda.git
>
> in the 'noncontig' branch.

Please help take a look and help review the code. If there's one thing I'm
super short of these days, it's code review bandwidth. And so it helps a
lot if potential issues get highlighted and discussed. Thanks!

Here's that link again:

https://github.com/inducer/pycuda/pull/171

Also, thanks again Syam for working on and submitting this!

Andreas

___
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda


[PyCUDA] non-contiguous array support

2018-02-23 Thread Syam Gadde
Sorry if this comes through multiple times, I've been having problems posting 
from an email alias.


Andreas suggested I mail the mailing list and solicit comments here.

I submitted a pull request that adapts the element-wise kernels to support 
non-contiguous arrays (including negative-strided arrays):

https://github.com/inducer/pycuda/pull/171

There have been a number of requests for this kind of functionality, so I'm 
hoping this is useful (at least as a proof-of-concept).  It passes all current 
PyCUDA tests, but I've got some local code that fail for some more complicated 
cases.  (Unfortunately can't reduce it to a unit test yet)  But most things 
work.

In some ways it's an elaborate monkey-patch meant to disturb existing code as 
little as possible, but if you create your own element-wise kernels, to get the 
new functionality you have to make a few changes.


More details at the above PR.


Anyway, if anyone is interested in trying it out, I'd be interested to hear how 
it works for you, or whether you have suggestions for fixes.  The code is in my 
fork:

https://github.com/SyamGadde/pycuda.git

in the 'noncontig' branch.

Cheers,

-syam

___
PyCUDA mailing list
PyCUDA@tiker.net
https://lists.tiker.net/listinfo/pycuda