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.