提交 1719e905 authored 作者: Reyhane Askari's avatar Reyhane Askari

fix for GpuContiguous and GpuElemwise

上级 ac885511
...@@ -424,7 +424,8 @@ class GraphToGPU(Optimizer): ...@@ -424,7 +424,8 @@ class GraphToGPU(Optimizer):
outputs = [] outputs = []
if isinstance(new_ops, theano.Op): if isinstance(new_ops, theano.Op):
outputs = new_ops(*[mapping[i] for i in node.inputs], return_list=True) with inherit_stack_trace(node.outputs):
outputs = new_ops(*[mapping[i] for i in node.inputs], return_list=True)
elif not new_ops: elif not new_ops:
newnode = node.clone_with_new_inputs([mapping.get(i) for i in node.inputs]) newnode = node.clone_with_new_inputs([mapping.get(i) for i in node.inputs])
outputs = newnode.outputs outputs = newnode.outputs
......
...@@ -40,8 +40,6 @@ def _check_stack_trace(thing): ...@@ -40,8 +40,6 @@ def _check_stack_trace(thing):
theano.tensor.elemwise.Elemwise, theano.tensor.elemwise.Elemwise,
theano.ifelse.IfElse, theano.ifelse.IfElse,
GpuFromHost, HostFromGpu, GpuFromHost, HostFromGpu,
basic_ops.GpuContiguous,
GpuElemwise,
)) ))
return check_stack_trace(thing, ops_to_check=_ops_to_check, return check_stack_trace(thing, ops_to_check=_ops_to_check,
bug_print="ignore") bug_print="ignore")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论