Theano do it itself. Don't worry for this. The branch elemwise_0 is the
same as reorg. Did you forgot to commit/push? I understand that it won't
fix the prepared call now, but as my gpureduce PR don't need it, it can
wait. This would be a better fix then hacking this in Theano.


On Mon, Jan 20, 2014 at 3:36 PM, abergeron <notifications@github.com> wrote:

> In theano/sandbox/gpuarray/type.py:
>
> > @@ -105,6 +108,9 @@ def values_eq_approx(a, b,
> >                           rtol=None, atol=None):
> >          if a.shape != b.shape or a.dtype != b.dtype:
> >              return False
> > +        # Can't compare 0-sized arrays.
> > +        if a.size == 0:
> > +            return True
>
> Gpuarray can be 0-sized, that's not a problem.
>
> But for ElemwiseKernel, there are a lot of possible entry points and no
> single chokehold where I can easily insert the check.
>
> I have a tentative patch to do this in the elemwise_0 branch on compyte,
> but it doesn't deal with prepared calls. It also only covers the "call"
> interfaces so if you retrieve the kernel code manually the way GpuElemwise
> does, you have to deal with 0-size yourself.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Theano/Theano/pull/1702/files#r9017684>
> .
>