未验证 提交 e89a50c1 编写于 作者: Y Yiqun Liu 提交者: GitHub

Try add eval() to speedup the eigen performance. (#48855)

上级 d3e9e73a
......@@ -51,7 +51,7 @@ struct LogsumexpFunctor {
auto x_mt = (*x).template cast<MT>();
auto y_dim = y->dimensions();
auto x_max = x_mt.maximum(dim);
auto x_max = x_mt.maximum(dim).eval();
y->device(place) =
(x_max +
(x_mt - x_max.reshape(t_dim).broadcast(r_dim)).exp().sum(dim).log())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册