提交 25085feb authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix opt crash and better error msg.

上级 1f8fbab3
......@@ -763,7 +763,7 @@ def local_gpua_gemm(node, context_name):
@op_lifter([tensor.blas.BatchedDot])
def local_gpua_gemmbatch(node, context_name):
a, b = node.inputs
c = tensor.AllocEmpty((a.shape[0], a.shape[1], b.shape[2]))
c = tensor.AllocEmpty(a.dtype)(a.shape[0], a.shape[1], b.shape[2])
return gpugemmbatch_no_inplace(c, 1.0, a, b, 0.0)
......
......@@ -6218,7 +6218,7 @@ class AllocEmpty(gof.Op):
# specify the type of the data
def __init__(self, dtype):
assert isinstance(dtype, str)
assert isinstance(dtype, str), dtype
self.dtype = dtype.lower()
def validate_shape(self, shape):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论