提交 71f30a96 authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix opt warning/not moving to GPU some node.

上级 a5735a1b
......@@ -8,8 +8,8 @@ from theano.tensor.basic import as_tensor_variable
from theano.tensor.opt import in2out
from .basic_ops import as_gpuarray_variable, infer_context_name
from .opt_util import inplace_allocempty
from .type import GpuArrayType
try:
import pygpu
......@@ -281,7 +281,12 @@ class GpuDot22(BlasOp):
assert x.ndim == 2
assert y.ndim == 2
assert x.dtype == y.dtype
return Apply(self, [x, y], [x.type()])
otype = GpuArrayType(
dtype=x.dtype,
broadcastable=(x.type.broadcastable[0], y.type.broadcastable[1]),
# Here I suppose both inputs are on the same context.
context_name=x.type.context_name)
return Apply(self, [x, y], [otype()])
def perform(self, node, inputs, outputs):
x, y = inputs
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论