未验证 提交 d74838bd 编写于 作者: W whs 提交者: GitHub

Prune dims supported by reduce op. (#11113)

上级 23812490
...@@ -135,15 +135,16 @@ class ReduceKernel : public framework::OpKernel<T> { ...@@ -135,15 +135,16 @@ class ReduceKernel : public framework::OpKernel<T> {
} else { } else {
int ndim = context.Input<Tensor>("X")->dims().size(); int ndim = context.Input<Tensor>("X")->dims().size();
int rdim = context.Attr<std::vector<int>>("dim").size(); int rdim = context.Attr<std::vector<int>>("dim").size();
HANDLE_DIM(6, 5); // comments for accelerating compiling temporarily.
HANDLE_DIM(6, 4); // HANDLE_DIM(6, 5);
HANDLE_DIM(6, 3); // HANDLE_DIM(6, 4);
HANDLE_DIM(6, 2); // HANDLE_DIM(6, 3);
HANDLE_DIM(6, 1); // HANDLE_DIM(6, 2);
HANDLE_DIM(5, 4); // HANDLE_DIM(6, 1);
HANDLE_DIM(5, 3); // HANDLE_DIM(5, 4);
HANDLE_DIM(5, 2); // HANDLE_DIM(5, 3);
HANDLE_DIM(5, 1); // HANDLE_DIM(5, 2);
// HANDLE_DIM(5, 1);
HANDLE_DIM(4, 3); HANDLE_DIM(4, 3);
HANDLE_DIM(4, 2); HANDLE_DIM(4, 2);
HANDLE_DIM(4, 1); HANDLE_DIM(4, 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册