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

Reply via email to