From 970147505a393d5739e44bd6913e64b07b1ec1da Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Mon, 29 Jan 2018 18:04:44 -0800 Subject: [PATCH] Correct deps of threadpool (#7955) * refine channel test * follow comments * Add dependency enforce to threadpool * Revert changes to channel_test.cc * Revert changes to channel_test.cc * Add #include "paddle/framework/macros.h" --- paddle/framework/CMakeLists.txt | 2 +- paddle/framework/threadpool.cc | 2 ++ paddle/framework/threadpool.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/paddle/framework/CMakeLists.txt b/paddle/framework/CMakeLists.txt index 318661af8b..8c28709a68 100644 --- a/paddle/framework/CMakeLists.txt +++ b/paddle/framework/CMakeLists.txt @@ -26,7 +26,7 @@ nv_test(lod_tensor_gpu_test SRCS lod_tensor_test.cu DEPS lod_tensor) cc_test(variable_test SRCS variable_test.cc) -cc_library(threadpool SRCS threadpool.cc) +cc_library(threadpool SRCS threadpool.cc DEPS enforce) cc_test(threadpool_test SRCS threadpool_test.cc DEPS threadpool) cc_library(scope SRCS scope.cc DEPS glog threadpool) diff --git a/paddle/framework/threadpool.cc b/paddle/framework/threadpool.cc index b2f5ae4a96..b7d7c00bcf 100644 --- a/paddle/framework/threadpool.cc +++ b/paddle/framework/threadpool.cc @@ -14,6 +14,8 @@ #include "paddle/framework/threadpool.h" +#include "paddle/platform/enforce.h" + namespace paddle { namespace framework { diff --git a/paddle/framework/threadpool.h b/paddle/framework/threadpool.h index 8912b1a43a..4e9b58679d 100644 --- a/paddle/framework/threadpool.h +++ b/paddle/framework/threadpool.h @@ -22,7 +22,7 @@ limitations under the License. */ #include #include -#include "paddle/platform/enforce.h" +#include "paddle/platform/macros.h" // for DISABLE_COPY_AND_ASSIGN namespace paddle { namespace framework { -- GitLab