From 34a290c8a7688595771bbdc0961736040991b188 Mon Sep 17 00:00:00 2001 From: ZhenWang Date: Thu, 20 Jun 2019 22:28:09 +0800 Subject: [PATCH] replace cc_test with lite_cc_test. --- paddle/fluid/lite/opencl/CMakeLists.txt | 2 +- paddle/fluid/lite/opencl/cl_test.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/lite/opencl/CMakeLists.txt b/paddle/fluid/lite/opencl/CMakeLists.txt index c2452ee2af..00c0e35b07 100644 --- a/paddle/fluid/lite/opencl/CMakeLists.txt +++ b/paddle/fluid/lite/opencl/CMakeLists.txt @@ -18,7 +18,7 @@ if (WITH_LITE AND LITE_WITH_LIGHT_WEIGHT_FRAMEWORK) cc_library(cl_helper SRCS cl_helper.cc DEPS cl_context) cc_library(cl_image_converter SRCS cl_image_converter.cc DEPS cl_half lite_tensor) cc_library(cl_image SRCS cl_image.cc DEPS cl_half lite_tensor cl_image_converter cl_engine) - cc_test(test_cl_runtime SRCS cl_test.cc DEPS cl_engine cl_context) + lite_cc_test(test_cl_runtime SRCS cl_test.cc DEPS cl_engine cl_context) target_link_libraries(test_cl_runtime opencl-lib) add_dependencies(cl_tool opencl_clhpp) endif() diff --git a/paddle/fluid/lite/opencl/cl_test.cc b/paddle/fluid/lite/opencl/cl_test.cc index 62f9fdc9f6..0d3d9d7a38 100644 --- a/paddle/fluid/lite/opencl/cl_test.cc +++ b/paddle/fluid/lite/opencl/cl_test.cc @@ -23,7 +23,7 @@ namespace lite { TEST(cl_test, engine_test) { auto* engine = CLEngine::Global(); CHECK(engine->IsInitSuccess()); - engine->set_cl_path("/work/Develop/Paddle/paddle/fluid/lite/opencl"); + engine->set_cl_path("/data/local/tmp/opencl"); engine->platform(); engine->device(); engine->command_queue(); @@ -37,9 +37,9 @@ TEST(cl_test, engine_test) { TEST(cl_test, context_test) { auto* engine = CLEngine::Global(); CHECK(engine->IsInitSuccess()); - engine->set_cl_path("/work/Develop/Paddle/paddle/fluid/lite/opencl"); + engine->set_cl_path("/data/local/tmp/opencl"); CLContext context; - context.GetKernel("batchnorm", "batchnorm_kernel.cl", ""); + context.GetKernel("pool_max", "pool_kernel.cl", ""); context.GetKernel("elementwise_add", "elementwise_add_kernel.cl", ""); context.GetKernel("elementwise_add", "elementwise_add_kernel.cl", ""); } -- GitLab