diff --git a/paddle/platform/CMakeLists.txt b/paddle/platform/CMakeLists.txt index 4e34e8d02cc676235a607c94c08ddae213de3a90..5e2f203555cdc0b2a39b58b14272d85ebcee28b6 100644 --- a/paddle/platform/CMakeLists.txt +++ b/paddle/platform/CMakeLists.txt @@ -5,4 +5,4 @@ nv_test(cuda_test SRCS cuda_test.cu DEPS dynload_cuda) cc_library(place SRCS place.cc) cc_test(place_test SRCS place_test.cc DEPS place glog gflags) -nv_test(device_context_test SRCS device_context_test.cc DEPS place eigen3 dynload_cuda) +nv_test(device_context_test SRCS device_context_test.cc DEPS dynload_cuda dynamic_loader eigen3 place) diff --git a/paddle/platform/cuda_device_context.h b/paddle/platform/cuda_device_context.h index e0d79631c57596810d25b2f790fb6b3a20b5e062..0ba1f802a60190516615322414a1c77f74f2c007 100644 --- a/paddle/platform/cuda_device_context.h +++ b/paddle/platform/cuda_device_context.h @@ -21,6 +21,7 @@ limitations under the License. */ #include "paddle/platform/dynload/curand.h" #define EIGEN_USE_GPU #include "paddle/platform/place.h" +#include "paddle/platform/device_context.h" #include "unsupported/Eigen/CXX11/Tensor" namespace paddle {