提交 0e747e8d 编写于 作者: Q Qiao Longfei

change the limit of thead num

上级 39a40034
...@@ -490,9 +490,10 @@ class AdamOpKernel : public framework::OpKernel<T> { ...@@ -490,9 +490,10 @@ class AdamOpKernel : public framework::OpKernel<T> {
<< FLAGS_inner_op_parallelism << FLAGS_inner_op_parallelism
<< " min_param_size_to_use_multithread=" << " min_param_size_to_use_multithread="
<< FLAGS_min_param_size_to_use_multithread; << FLAGS_min_param_size_to_use_multithread;
PADDLE_ENFORCE_LE( if (FLAGS_inner_op_parallelism > 10) {
FLAGS_inner_op_parallelism, 8, LOG(WARNING) << "FLAGS_inner_op_parallelism "
"FLAGS_inner_op_parallelism should not be larger then 8"); << FLAGS_inner_op_parallelism << " is two large!";
}
auto& grad_rows = grad_merge.rows(); auto& grad_rows = grad_merge.rows();
std::unordered_map<size_t, int> row_id_to_grad_row_offset; std::unordered_map<size_t, int> row_id_to_grad_row_offset;
size_t param_row_count = param.numel() / row_numel; size_t param_row_count = param.numel() / row_numel;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册