未验证 提交 a50a8bea 编写于 作者: Y Yuan Shuai 提交者: GitHub

[LITE][CMAKE] Armv7 gcc opencl compile (#3200)

* [LITE][OPENCL] Change fp32 fc to fp16's. test=develop

* fix act in conv3x3opt opencl kernel. test=develop

* [LITE][CMAKE] fix cmake for opencl tiny_pubish compile. test=develop
上级 50407e7c
......@@ -57,22 +57,20 @@ function(check_linker_flag)
endforeach()
set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} PARENT_SCOPE)
endfunction()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
if (LITE_ON_TINY_PUBLISH)
if((NOT LITE_WITH_PYTHON))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
endif()
if(LITE_WITH_OPENCL AND (ARM_TARGET_LANG STREQUAL "clang"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math -Ofast -Os -fomit-frame-pointer -fno-asynchronous-unwind-tables -fno-unwind-tables")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -ffunction-sections")
check_linker_flag(-Wl,--gc-sections)
endif()
if(LITE_WITH_OPENCL)
if(ARM_TARGET_LANG STREQUAL "clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
endif()
endif()
if(LITE_WITH_OPENMP)
find_package(OpenMP REQUIRED)
if(OPENMP_FOUND OR OpenMP_CXX_FOUND)
......
......@@ -101,7 +101,7 @@ void RunModel(std::string model_dir,
// 5. Get output
std::cout << "\n====== output summary ====== " << std::endl;
size_t output_tensor_num = predictor->GetOutputNames().size();
std::cout << "output tesnor num:" << output_tensor_num << std::endl;
std::cout << "output tensor num:" << output_tensor_num << std::endl;
for (size_t tidx = 0; tidx < output_tensor_num; ++tidx) {
std::unique_ptr<const paddle::lite_api::Tensor> output_tensor =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册