Skip to content

Commit

Permalink
Updated linkbackend cmake file
Browse files Browse the repository at this point in the history
  • Loading branch information
olibartfast committed Feb 11, 2025
1 parent 541f0a6 commit f169a32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmake/LinkBackend.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ elseif (DEFAULT_BACKEND STREQUAL "ONNX_RUNTIME")
elseif (DEFAULT_BACKEND STREQUAL "LIBTORCH")
target_include_directories(${PROJECT_NAME} PRIVATE ${InferenceEngines_SOURCE_DIR}/backends/libtorch/src)
target_link_libraries(${PROJECT_NAME} PRIVATE ${TORCH_LIBRARIES})
target_compile_definitions(${PROJECT_NAME} PRIVATE C10_USE_GLOG)
elseif (DEFAULT_BACKEND STREQUAL "TENSORRT")
target_include_directories(${PROJECT_NAME} PRIVATE /usr/local/cuda/include ${TENSORRT_DIR}/include ${InferenceEngines_SOURCE_DIR}/backends/tensorrt/src)
target_link_directories(${PROJECT_NAME} PRIVATE /usr/local/cuda/lib64 ${TENSORRT_DIR}/lib)
Expand All @@ -19,3 +20,4 @@ elseif(DEFAULT_BACKEND STREQUAL "OPENVINO")
target_include_directories(${PROJECT_NAME} PRIVATE ${InferenceEngine_INCLUDE_DIRS} ${InferenceEngines_SOURCE_DIR}/backends/openvino/src)
target_link_libraries(${PROJECT_NAME} PRIVATE openvino::runtime )
endif()

8 changes: 7 additions & 1 deletion detectors/src/models/Detector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ class Detector {
network_height_ = static_cast<size_t>(first_input[1]);
network_width_ = static_cast<size_t>(first_input[2]);
LOG(INFO) << "Sizes: " << channels_ << " " << network_width_ << " " << network_height_;
}
}
else if (first_input.size() == 4) {
channels_ = static_cast<int>(first_input[1]);
network_height_ = static_cast<size_t>(first_input[2]);
network_width_ = static_cast<size_t>(first_input[3]);
LOG(INFO) << "Sizes: " << channels_ << " " << network_width_ << " " << network_height_;
}
else {
LOG(ERROR) << "Input shape does not match expected format (CHW), Found " << first_input.size() << " inputs: ";
for(auto& s : first_input)
Expand Down

0 comments on commit f169a32

Please sign in to comment.