未验证 提交 e2130502 编写于 作者: W Wang Guibao 提交者: GitHub

Fix multi-threading bug with WItH_MKL=ON (#14882)

fixes #14884
上级 5384206a
......@@ -26,6 +26,7 @@ limitations under the License. */
#include "paddle/fluid/framework/reader.h"
#include "paddle/fluid/framework/variable_helper.h"
#include "paddle/fluid/inference/io.h"
#include "paddle/fluid/platform/cpu_helper.h"
#include "paddle/fluid/platform/place.h"
#include "paddle/fluid/pybind/pybind.h"
namespace paddle {
......@@ -174,6 +175,8 @@ void print_fetch_var(Scope* scope, std::string var_name) {
}
void ExecutorThreadWorker::TrainFiles() {
platform::SetNumThreads(1);
// todo: configurable
SetDevice();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册