提交 87f8288b authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #2977 from abergeron/gemm16_fix

Disable local_dot_to_gemm16 if nervanagpu could not be imported.
...@@ -163,6 +163,8 @@ if (GpuKernel_init(&k_%(name)s, c->ops, c->ctx, 1, &bcode, &sz, ...@@ -163,6 +163,8 @@ if (GpuKernel_init(&k_%(name)s, c->ops, c->ctx, 1, &bcode, &sz,
@opt.register_opt() @opt.register_opt()
@opt.op_lifter([tensor.Dot]) @opt.op_lifter([tensor.Dot])
def local_dot_to_gemm16(node): def local_dot_to_gemm16(node):
if nerv is None:
return
A = node.inputs[0] A = node.inputs[0]
B = node.inputs[1] B = node.inputs[1]
if (A.ndim == 2 and B.ndim == 2 and if (A.ndim == 2 and B.ndim == 2 and
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论