[PyOpenCL] API evolution (Important!)

Andreas Kloeckner lists at informa.tiker.net
Thu Jul 8 17:13:12 PDT 2010


Hi all,

On Sat, 26 Jun 2010 18:14:44 -0600, Cyrus Omar <cyology at gmail.com> wrote:
> How about sum[queue, global_size, local_size] does the bind (sorta like
> <<<>>> in CUDA) so a whole call looks like this:
> 
> sum[queue, a.shape, (256,)](a, b, dest)
> 
> Btw you can just use functools.partial, no need to implement it manually
> (unless you want to support Python 2.4 or earlier still?)

First of all, thanks for your suggestions! 

As of right now, I don't see a compelling reason to switch away from the
now-current convention

kernel(queue, global, local, kernel args...)

I see the point of keeping kernel arguments apart from meta-arguments,
but the cost just seems too high at present--paid either in verbosity
(kwargs), extraneous state (.bind), in untruthful representation of the
underlying interface (.bind), or interfaces that aren't like anything
else in Python (knl[]()).

So as a matter of closing off this discussion: It's going to stay as is
for now--also because there's a fair bunch of code using that convention
now. :)

Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pyopencl/attachments/20100708/65c94c84/attachment.pgp>


More information about the PyOpenCL mailing list