We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0b3d7f1 + d0fb00d commit 8f266e2Copy full SHA for 8f266e2
paddle/fluid/framework/init.cc
@@ -18,6 +18,7 @@ limitations under the License. */
18
19
#include "paddle/fluid/framework/init.h"
20
#include "paddle/fluid/framework/operator.h"
21
+#include "paddle/fluid/operators/math/blas.h"
22
#include "paddle/fluid/platform/device_context.h"
23
#include "paddle/fluid/platform/place.h"
24
#include "paddle/fluid/string/piece.h"
@@ -113,6 +114,9 @@ void InitDevices(bool init_p2p, const std::vector<int> devices) {
113
114
}
115
places.emplace_back(platform::CPUPlace());
116
platform::DeviceContextPool::Init(places);
117
+#ifndef PADDLE_WITH_MKLDNN
118
+ operators::math::SetNumThreads(1);
119
+#endif
120
121
122
void InitGLOG(const std::string &prog_name) {
0 commit comments