提交 1eb701aa authored 作者: Thomas George's avatar Thomas George

made requested changes

上级 f6f2e926
...@@ -72,7 +72,7 @@ class GpuGemv(BlasOp): ...@@ -72,7 +72,7 @@ class GpuGemv(BlasOp):
def perform(self, node, inputs, out_storage, params): def perform(self, node, inputs, out_storage, params):
y, alpha, A, x, beta = inputs y, alpha, A, x, beta = inputs
inplace = params['inplace'] inplace = params.inplace
if inplace and y.strides[0] < 0: if inplace and y.strides[0] < 0:
inplace = False inplace = False
if A.shape[1] == 0: if A.shape[1] == 0:
...@@ -97,10 +97,6 @@ class GpuGemv(BlasOp): ...@@ -97,10 +97,6 @@ class GpuGemv(BlasOp):
%(out)s = %(y)s; %(out)s = %(y)s;
Py_INCREF(%(out)s); Py_INCREF(%(out)s);
} }
%(out)s = theano_try_copy(%(out)s, %(y)s);
if (%(out)s == NULL) {
%(fail)s
}
""" % vars """ % vars
# in case of possible speed up using blas dot, # in case of possible speed up using blas dot,
# temporary hack A to 1D for vector-vector dot # temporary hack A to 1D for vector-vector dot
...@@ -201,7 +197,7 @@ class GpuGemm(BlasOp): ...@@ -201,7 +197,7 @@ class GpuGemm(BlasOp):
def perform(self, node, inputs, outputs, params): def perform(self, node, inputs, outputs, params):
C, alpha, A, B, beta = inputs C, alpha, A, B, beta = inputs
inplace = params['inplace'] inplace = params.inplace
if inplace and not C.flags.forc: if inplace and not C.flags.forc:
inplace = False inplace = False
outputs[0][0] = blas.gemm(alpha, A, B, beta, C, outputs[0][0] = blas.gemm(alpha, A, B, beta, C,
...@@ -276,7 +272,7 @@ class GpuGer(BlasOp): ...@@ -276,7 +272,7 @@ class GpuGer(BlasOp):
def perform(self, node, inp, out, params): def perform(self, node, inp, out, params):
A, alpha, x, y = inp A, alpha, x, y = inp
inplace = params['inplace'] inplace = params.inplace
if inplace and not A.flags.forc: if inplace and not A.flags.forc:
inplace = False inplace = False
out[0][0] = blas.ger(alpha, x, y, A, out[0][0] = blas.ger(alpha, x, y, A,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论