提交 d607f0b7 编写于 作者: Q qijun

use cached rank

上级 95851116
......@@ -226,7 +226,7 @@ Eigen::DSizes<Eigen::DenseIndex, NDIMS> ToEigenDSizes(DDim dims) const {
int rank = paddle::framework::arity(dims);
PADDLE_ENFORCE(rank == NDIMS, "DDim and NDIMS must be same")
Eigen::DSizes<Eigen::DenseIndex, NDIMS> dsizes;
for (int d = 0; d < paddle::framework::arity(dims); d++) {
for (int d = 0; d < rank; d++) {
dsizes[d] = dims[d];
}
return dsizes;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册