提交 c234fae1 authored 作者: Frederic Bastien's avatar Frederic Bastien

Re allow gemm related to be done when the dimensions are zeros.

上级 e4ee1833
...@@ -478,12 +478,8 @@ class GemmRelated(Op): ...@@ -478,12 +478,8 @@ class GemmRelated(Op):
(long int)Ny[1], (long int)Nz[1]); (long int)Ny[1], (long int)Nz[1]);
%(fail)s; %(fail)s;
} }
if (Nx[1] == 0) // We must not raise an error when Nx[1] == 0. This would disable case
{ // that numpy.dot accept.
PyErr_Format(PyExc_ValueError,
"Undefined semantics: x has 0 cols");
%(fail)s;
}
""" """
check_strides = """ check_strides = """
...@@ -643,7 +639,7 @@ class GemmRelated(Op): ...@@ -643,7 +639,7 @@ class GemmRelated(Op):
self.end_switch_typenum), '') self.end_switch_typenum), '')
def build_gemm_version(self): def build_gemm_version(self):
return (7,) return (8,)
class Gemm(GemmRelated): class Gemm(GemmRelated):
"""In-place version of matrix-matrix multiplication (with accumulation): """In-place version of matrix-matrix multiplication (with accumulation):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论