Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[infra/onert] Update coverage and strict build target #14470

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion runtime/contrib/gpu_cl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ target_link_libraries(${LIB_ONERT_BACKEND_GPU_CL} PRIVATE tflite-gpu-delegate)
target_link_libraries(${LIB_ONERT_BACKEND_GPU_CL} PRIVATE onert_core)
target_link_libraries(${LIB_ONERT_BACKEND_GPU_CL} PRIVATE ${LIB_ONERT_BACKEND_CL_COMMON})
target_link_libraries(${LIB_ONERT_BACKEND_GPU_CL} PRIVATE nnfw_common)
target_link_libraries(${LIB_ONERT_BACKEND_GPU_CL} PRIVATE nnfw_coverage)

set_target_properties(${LIB_ONERT_BACKEND_GPU_CL} PROPERTIES OUTPUT_NAME backend_gpu_cl)

Expand Down
1 change: 1 addition & 0 deletions runtime/onert/api/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ file(GLOB_RECURSE NNFW_API_PYBIND_SOURCES "src/*.cc")
pybind11_add_module(nnfw_api_pybind ${NNFW_API_PYBIND_SOURCES})
target_include_directories(nnfw_api_pybind PRIVATE include)
target_link_libraries(nnfw_api_pybind PRIVATE nnfw-dev)
target_link_libraries(nnfw_api_pybind PRIVATE nnfw_common nnfw_coverage)

# Install the Python module
install(TARGETS nnfw_api_pybind DESTINATION lib)
5 changes: 4 additions & 1 deletion runtime/onert/api/python/src/nnfw_api_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ void ensure_status(NNFW_STATUS status)
case NNFW_STATUS::NNFW_STATUS_INSUFFICIENT_OUTPUT_SIZE:
std::cout << "[ERROR]\tNNFW_STATUS_INSUFFICIENT_OUTPUT_SIZE\n";
exit(1);
case NNFW_STATUS::NNFW_STATUS_DEPRECATED_API:
std::cout << "[ERROR]\tNNFW_STATUS_DEPRECATED_API\n";
exit(1);
}
}

Expand Down Expand Up @@ -129,7 +132,7 @@ const char *getStringType(NNFW_TYPE type)
uint64_t num_elems(const nnfw_tensorinfo *tensor_info)
{
uint64_t n = 1;
for (uint32_t i = 0; i < tensor_info->rank; ++i)
for (int32_t i = 0; i < tensor_info->rank; ++i)
{
n *= tensor_info->dims[i];
}
Expand Down
1 change: 1 addition & 0 deletions runtime/onert/backend/cl_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ add_library(${LIB_ONERT_BACKEND_CL_COMMON} STATIC ${SOURCES})
target_include_directories(${LIB_ONERT_BACKEND_CL_COMMON} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
set_target_properties(${LIB_ONERT_BACKEND_CL_COMMON} PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(${LIB_ONERT_BACKEND_CL_COMMON} PUBLIC onert_core)
target_link_libraries(${LIB_ONERT_BACKEND_CL_COMMON} PRIVATE nnfw_common nnfw_coverage)
1 change: 0 additions & 1 deletion tests/libs/nnapi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ add_library(${LIB_NNAPI} STATIC ${SOURCES_FRONTEND})
target_include_directories(${LIB_NNAPI} PUBLIC include)
target_link_libraries(${LIB_NNAPI} PUBLIC onert_core) # TODO Link PRIVATE onert_core
target_link_libraries(${LIB_NNAPI} PRIVATE nnfw_common)
target_link_libraries(${LIB_NNAPI} PRIVATE nnfw_coverage)

if(NOT ENABLE_TEST)
return()
Expand Down