Theano/Theano — Issue #383: ger no copy when both input are backward.
Author: nouiz
Created: 2012-01-25 15:35:14+00:00
State: open

from: https://github.com/nouiz/Theano/commit/6174405c6b1ed988e66ea07c788f12d9e0432a4c#commitcomment-900480

Anyway, this brings to mind a special case that if both x.stride < 0 and A.stride[0] < 0 then no copy is needed because you can do the whole dot-product backward. Same thing for y.stride and A.stride[1]. This same thinking goes for the CPU implementation as well. But it's a tricky thing to write and test (would take an hour or two at least) so how about adding this text as a comment, or making a ticket for it. Someone trying to optimize his backward GER / GEMM may some day implement it.