提交 43f5be2a 编写于 作者: B BUG1989

fix debug of -DTENGINE_DEBUG_TIME=ON

上级 5cf95a58
...@@ -125,7 +125,7 @@ static int run(struct device* dev, struct subgraph* subgraph) ...@@ -125,7 +125,7 @@ static int run(struct device* dev, struct subgraph* subgraph)
/* TODO: add dynamic skip feature */ /* TODO: add dynamic skip feature */
#ifdef DEBUG_TIME #ifdef DEBUG_TIME
double start = get_cur_time(); double start = get_current_time();
#endif #endif
double st_time, end_time; double st_time, end_time;
if (exec_graph->timer) if (exec_graph->timer)
...@@ -139,8 +139,8 @@ static int run(struct device* dev, struct subgraph* subgraph) ...@@ -139,8 +139,8 @@ static int run(struct device* dev, struct subgraph* subgraph)
} }
char* name = node->ir_node->name; char* name = node->ir_node->name;
#ifdef DEBUG_TIME #ifdef DEBUG_TIME
double end = get_cur_time(); double end = get_current_time();
fprintf(stderr, "%-20s %8.2f ms %s\n", get_op_name(node->ir_node->op.op_type), end - start, name); fprintf(stderr, "%-20s %8.2f ms %s\n", get_op_name_from_type(node->ir_node->op.type), end - start, name);
#endif #endif
if (exec_graph->timer) if (exec_graph->timer)
{ {
......
...@@ -109,23 +109,6 @@ if(PROTOBUF_FOUND) ...@@ -109,23 +109,6 @@ if(PROTOBUF_FOUND)
else() else()
message(WARNING "Protobuf not found, onnx op test won't be built") message(WARNING "Protobuf not found, onnx op test won't be built")
endif() endif()
# macro for adding test
function (tengine_onnx_op_test name file)
target_link_libraries (${name} PRIVATE ${CMAKE_PROJECT_NAME})
target_include_directories (${name} PRIVATE "${PROJECT_SOURCE_DIR}/source")
target_include_directories (${name} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
target_include_directories (${name} PRIVATE "${PROJECT_BINARY_DIR}")
target_include_directories (${name} PRIVATE "${PROJECT_BINARY_DIR}/source")
target_include_directories (${name} PRIVATE "${PROJECT_SOURCE_DIR}/tests/common")
if (${TENGINE_TARGET_PROCESSOR} MATCHES "ARM" AND (NOT ANDROID AND NOT OHOS) AND TENGINE_TARGET_PROCESSOR_32Bit)
target_compile_options (${name} PRIVATE "-mfp16-format=ieee")
endif()
add_test (${name} ${name})
endfunction()
# operator level test using opencv # operator level test using opencv
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册