提交 0f25beee authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix tests in DebugMode with DNN convolutions

上级 22b943c3
......@@ -158,9 +158,16 @@ class GpuDnnConvDesc(GpuOp):
if kern_shape.type.ndim != 1 or kern_shape.type.dtype != 'int64':
raise TypeError('kern must be 1D shape tensor')
return Apply(self, [img_shape, kern_shape],
node = Apply(self, [img_shape, kern_shape],
[CDataType("cudnnConvolutionDescriptor_t",
freefunc="cudnnDestroyConvolutionDescriptor")()])
# DebugMode cannot compare the values of CDataType variables, so by
# default it returns False all the time. To prevent DebugMode from
# complaining because of the MergeOptimizer, we make this variable
# always compare to True.
out = node.outputs[0]
out.tag.values_eq_approx = tensor.type.values_eq_approx_always_true
return node
def c_code(self, node, name, inputs, outputs, sub):
img_shape, kern_shape = inputs
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论