We put in the key the Op. So if two op have its __eq__ and __hash__ fct
generate fast/different value, the key end up being different. So it
trigger new generation of c code. (then after that their is a step to merge
idem c code).

Arnaud, with that extra info, do you think this PR is ready to be merged?
If so, do it. I didn't review it.


On Tue, Mar 11, 2014 at 1:33 PM, abergeron <notifications@github.com> wrote:

> In theano/sandbox/cuda/extra_ops.py:
>
> > +            cuda = theano.sandbox.cuda
> > +            device_id = cuda.use.device_number
> > +            if device_id is None:
> > +                cuda.use("gpu",
> > +                         force=False,
> > +                         default_to_move_computation_to_gpu=False,
> > +                         move_shared_float32_to_gpu=False,
> > +                         enable_cuda=False,
> > +                         test_driver=True)
> > +                device_id = cuda.use.device_number
> > +            cuda_ndarray = theano.sandbox.cuda.cuda_ndarray.cuda_ndarray
> > +            prop = cuda_ndarray.device_properties(device_id)
> > +            node_.op.max_threads_dim0 = prop['maxThreadsDim0']
> > +            node_.op.max_grid_size1 = prop['maxGridSize1']
> > +        return super(GpuCumsum, node_.op).make_thunk(node_, storage_map,
> > +                                                     compute_map, no_recycling)
>
> I never said that the hash was in the key. I was under the impression that
> if you generated different code, it would get cached along its differing
> versions based on the hash.
>
> If I understand you correctly, it seems like we have to fetch this info in
> the constructor and add it to the c_code_cache_version() or something.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/Theano/Theano/pull/1760/files#r10485427>
> .
>