Just a trivial function that have a rebroadcast and check that it get moved
to the GPU.

Rebroadcast don't inherit from ViewOp. Its perform work for all type, but
we should make a registry and add c code for the new back-end type.


On Wed, Apr 23, 2014 at 10:19 AM, abergeron <notifications@github.com>wrote:

> In theano/sandbox/gpuarray/opt.py:
>
> > @@ -159,6 +184,13 @@ def local_gpureshape(node):
> >
> >
> >  @register_opt()
> > +@op_lifter([tensor.Rebroadcast])
> > +def local_gpu_rebroadcast(node):
> > +    if isinstance(node.inputs[0].owner.op, HostFromGpu):
> > +        return node.op(node.inputs[0].owner.inputs[0])
>
> I really don't see what kind of test this can have. It's essentially a
> ViewOp that changes the broadcastable properties (and that remains in the
> graph, which should be fixed eventually I guess).
>
> Do you just want me to test that we can make graphs with it? Or that it
> introduces no transfers?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Theano/Theano/pull/1807/files#r11902093>
> .
>