diff --git a/paddle/fluid/lite/opencl/CMakeLists.txt b/paddle/fluid/lite/opencl/CMakeLists.txt index c2452ee2afff1ec2d7bea27afcca6f981d4c7ec8..00c0e35b07430fe6fb0a3e83a6cb4af1f4c6a97b 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 62f9fdc9f619be81b3f1e55de002aa9f9425c516..0d3d9d7a389fe9885ec4d90e2447aa105425641d 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", ""); }