提交 e06a39ea authored 作者: Ian Goodfellow's avatar Ian Goodfellow

improved error messages, TODO comments

上级 a7d91eea
......@@ -107,7 +107,7 @@ def std_env(input_specs, output_specs, accept_inplace = False):
for node in env.nodes:
if getattr(node.op, 'destroy_map', None):
if not accept_inplace:
raise TypeError("Graph must not contain inplace operations", node)
raise TypeError("Graph must not contain inplace operations", node, node.op)
else:
env.extend(gof.DestroyHandler())
break
......
......@@ -88,7 +88,11 @@ class GpuElemwise(Op):
nout = property(lambda self: self.scalar_op.nout)
def __init__(self, scalar_op, inplace_pattern = {}, sync=None):
#TODO-- this looks like a bug-- either we should use the sync argument
# or get rid of it, we shouldn't let the client think they can control
#sync when they can't
sync = config.gpuelemwise.sync
self.scalar_op = scalar_op
self.inplace_pattern = inplace_pattern
......@@ -370,7 +374,7 @@ class GpuDimShuffle(Op):
return sio.getvalue()
def c_code_cache_version(self):
return (1,0)
return (3,0)
class GpuSum(Op):
"""GpuSum is a Reduction along some dimensions by summation.
......
......@@ -3225,6 +3225,8 @@ CudaNdarray_Dimshuffle(PyObject* _unused, PyObject* args)
goto CudaNdarray_dimshuffle_fail;
}
free(pattern);
return rval;
CudaNdarray_dimshuffle_fail:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论