Skip to content

Commit

Permalink
[WIP] Add TensorRT C++ interface for yolort (#245)
Browse files Browse the repository at this point in the history
* Add TensorRT support

* update and format
  • Loading branch information
ShiquanYu authored Dec 9, 2021
1 parent 23d0432 commit 92dd18e
Show file tree
Hide file tree
Showing 3 changed files with 1,169 additions and 0 deletions.
23 changes: 23 additions & 0 deletions deployment/tensorrt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.18.0)
project(yolort_trt)

option(TENSORRT_DIR "Path to built TensorRT directory." STRING)
message(STATUS "TENSORRT_DIR: ${TENSORRT_DIR}")

find_package(OpenCV REQUIRED)

add_compile_options(-Wextra -Wall -Wno-unused -Wno-deprecated-declarations)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# cuda
include_directories(/usr/local/cuda/include)
link_directories(/usr/local/cuda/lib64)

# tensorrt
include_directories(${TENSORRT_DIR}/include)
link_directories(${TENSORRT_DIR}/lib)

add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS} nvinfer cudart nvonnxparser)
Loading

0 comments on commit 92dd18e

Please sign in to comment.