提交 11b8a580 编写于 作者: M Megvii Engine Team 提交者: Wanwan1996

fix(opencl): misc fix

* config android c++ standard to c++17 to fix build failed when called
  by add_custom_command
* do not print lar summary log when iter 0

GitOrigin-RevId: 6f35b7b62f6f6874d44b5d7fb189c18b01ebce73
上级 d17673e7
......@@ -668,7 +668,8 @@ if(NOT MGE_ENABLE_EXCEPTIONS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
endif()
if(MGE_BUILD_IMPERATIVE_RT)
if(MGE_BUILD_IMPERATIVE_RT OR ANDROID)
message(STATUS "config cxx standard to 17.")
set(CMAKE_CXX_STANDARD 17)
endif()
......
......@@ -93,13 +93,15 @@ void NormalStrategy::run_subline() {
min_time = std::min(min_time, cur);
max_time = std::max(max_time, cur);
}
mgb_log("=== finished test #%u: time=%.3f ms avg_time=%.3f ms "
"standard_deviation=%.3f ms min=%.3f ms max=%.3f ms",
idx, time_sum, time_sum / run_num,
std::sqrt(
(time_sqrsum * run_num - time_sum * time_sum) /
(run_num * (run_num - 1))),
min_time, max_time);
if (run_num > 0) {
mgb_log("=== finished test #%u: time=%.3f ms avg_time=%.3f ms "
"standard_deviation=%.3f ms min=%.3f ms max=%.3f ms",
idx, time_sum, time_sum / run_num,
std::sqrt(
(time_sqrsum * run_num - time_sum * time_sum) /
(run_num * (run_num - 1))),
min_time, max_time);
}
return time_sum;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册