提交 5d81651a 编写于 作者: S superjomn

bugfix for server CPU

上级 706e83af
...@@ -437,6 +437,7 @@ function(lite_cc_test args) ...@@ -437,6 +437,7 @@ function(lite_cc_test args)
message(STATUS "building lite raw test: ${args}") message(STATUS "building lite raw test: ${args}")
raw_cc_test(${args} ${ARGN}) raw_cc_test(${args} ${ARGN})
else() else()
message(STATUS "building lite heavy test: ${args}")
cc_test(${args} ${ARGN}) cc_test(${args} ${ARGN})
endif() endif()
endfunction() endfunction()
......
...@@ -13,15 +13,15 @@ ...@@ -13,15 +13,15 @@
// limitations under the License. // limitations under the License.
#pragma once #pragma once
#ifdef LITE_WITH_CUDA
#include <paddle/fluid/lite/cuda/blas.h> #include <paddle/fluid/lite/cuda/blas.h>
#include "paddle/fluid/lite/cuda/cuda_utils.h"
#endif
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "paddle/fluid/lite/core/target_wrapper.h" #include "paddle/fluid/lite/core/target_wrapper.h"
#ifdef PADDLE_WITH_CUDA
#include "paddle/fluid/lite/cuda/cuda_utils.h"
#endif
namespace paddle { namespace paddle {
namespace lite { namespace lite {
......
...@@ -68,12 +68,16 @@ class RuntimeContextAssignPass : public StmtPass { ...@@ -68,12 +68,16 @@ class RuntimeContextAssignPass : public StmtPass {
} }
#endif #endif
#ifdef LITE_WITH_CUDA
void InitCudaBlas() { void InitCudaBlas() {
cublas_fp32_ = std::make_shared<lite::cuda::Blas<float>>(); cublas_fp32_ = std::make_shared<lite::cuda::Blas<float>>();
} }
#endif
private: private:
#ifdef LITE_WITH_CUDA
std::shared_ptr<lite::cuda::Blas<float>> cublas_fp32_; std::shared_ptr<lite::cuda::Blas<float>> cublas_fp32_;
#endif
}; };
} // namespace mir } // namespace mir
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册