提交 9bd63617 authored 作者: David Warde-Farley's avatar David Warde-Farley

Whitespace.

上级 bb58f1a6
...@@ -1859,10 +1859,10 @@ class UsmmCscDense(gof.Op): ...@@ -1859,10 +1859,10 @@ class UsmmCscDense(gof.Op):
dtype_out = scalar.upcast(alpha.type.dtype, x_val.type.dtype, dtype_out = scalar.upcast(alpha.type.dtype, x_val.type.dtype,
y.type.dtype, z.type.dtype) y.type.dtype, z.type.dtype)
if dtype_out not in ('float32', 'float64'): if dtype_out not in ('float32', 'float64'):
raise NotImplementedError('only float types are supported in operands') raise NotImplementedError('only float types are supported in operands')
if self.inplace: if self.inplace:
assert z.type.dtype == dtype_out assert z.type.dtype == dtype_out
...@@ -1875,7 +1875,7 @@ class UsmmCscDense(gof.Op): ...@@ -1875,7 +1875,7 @@ class UsmmCscDense(gof.Op):
y = tensor.cast(y, dtype_out) y = tensor.cast(y, dtype_out)
if dtype_out != z.type.dtype: if dtype_out != z.type.dtype:
z = tensor.cast(z, dtype_out) z = tensor.cast(z, dtype_out)
r = gof.Apply(self, [alpha, x_val, x_ind, x_ptr, x_nrows, y, z], r = gof.Apply(self, [alpha, x_val, x_ind, x_ptr, x_nrows, y, z],
[tensor.tensor(dtype_out, (False, y.type.broadcastable[1]))]) [tensor.tensor(dtype_out, (False, y.type.broadcastable[1]))])
return r return r
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论