-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Add TensorRT C++ interface for yolort (#245)
* Add TensorRT support * update and format
- Loading branch information
Showing
3 changed files
with
1,169 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Oops, something went wrong.