From 5d81651ab308719370c6d343071bda50eef222df Mon Sep 17 00:00:00 2001 From: superjomn Date: Mon, 6 May 2019 19:27:44 +0800 Subject: [PATCH] bugfix for server CPU --- cmake/generic.cmake | 1 + paddle/fluid/lite/core/context.h | 8 ++++---- paddle/fluid/lite/core/mir/runtime_context_assign_pass.cc | 4 ++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cmake/generic.cmake b/cmake/generic.cmake index 43350333a5..39ebaf7d95 100644 --- a/cmake/generic.cmake +++ b/cmake/generic.cmake @@ -437,6 +437,7 @@ function(lite_cc_test args) message(STATUS "building lite raw test: ${args}") raw_cc_test(${args} ${ARGN}) else() + message(STATUS "building lite heavy test: ${args}") cc_test(${args} ${ARGN}) endif() endfunction() diff --git a/paddle/fluid/lite/core/context.h b/paddle/fluid/lite/core/context.h index a7ec521dac..50ec1708d2 100644 --- a/paddle/fluid/lite/core/context.h +++ b/paddle/fluid/lite/core/context.h @@ -13,15 +13,15 @@ // limitations under the License. #pragma once + +#ifdef LITE_WITH_CUDA #include +#include "paddle/fluid/lite/cuda/cuda_utils.h" +#endif #include #include #include "paddle/fluid/lite/core/target_wrapper.h" -#ifdef PADDLE_WITH_CUDA -#include "paddle/fluid/lite/cuda/cuda_utils.h" -#endif - namespace paddle { namespace lite { diff --git a/paddle/fluid/lite/core/mir/runtime_context_assign_pass.cc b/paddle/fluid/lite/core/mir/runtime_context_assign_pass.cc index 48149ec1a5..2919de96f9 100644 --- a/paddle/fluid/lite/core/mir/runtime_context_assign_pass.cc +++ b/paddle/fluid/lite/core/mir/runtime_context_assign_pass.cc @@ -68,12 +68,16 @@ class RuntimeContextAssignPass : public StmtPass { } #endif +#ifdef LITE_WITH_CUDA void InitCudaBlas() { cublas_fp32_ = std::make_shared>(); } +#endif private: +#ifdef LITE_WITH_CUDA std::shared_ptr> cublas_fp32_; +#endif }; } // namespace mir -- GitLab