From b10e42719746661b644d59bfda74118786ef53cc Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Fri, 3 Mar 2023 23:15:39 +0800 Subject: [PATCH 1/2] Get windows build working --- core/plugins/CMakeLists.txt | 1 + core/runtime/CMakeLists.txt | 2 +- core/runtime/TRTEngine.h | 2 +- core/runtime/TRTEngineProfiler.cpp | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/plugins/CMakeLists.txt b/core/plugins/CMakeLists.txt index 90b039c94a..2b1eaaf73f 100644 --- a/core/plugins/CMakeLists.txt +++ b/core/plugins/CMakeLists.txt @@ -23,6 +23,7 @@ target_link_libraries(${lib_name} TensorRT::nvinfer_plugin torch core_util + cuDNN::cuDNN PRIVATE Threads::Threads ) diff --git a/core/runtime/CMakeLists.txt b/core/runtime/CMakeLists.txt index d21c661af1..a1493f77ae 100644 --- a/core/runtime/CMakeLists.txt +++ b/core/runtime/CMakeLists.txt @@ -33,7 +33,7 @@ target_link_libraries(${lib_name} TensorRT::nvinfer torch core_util - stdc++fs + #stdc++fs ) # Install diff --git a/core/runtime/TRTEngine.h b/core/runtime/TRTEngine.h index 5615a824a2..1a2df1f2e3 100644 --- a/core/runtime/TRTEngine.h +++ b/core/runtime/TRTEngine.h @@ -25,7 +25,7 @@ struct TRTEngine : torch::CustomClassHolder { std::string name; RTDevice device_info; - std::string profile_path_prefix = std::experimental::filesystem::temp_directory_path(); + std::string profile_path_prefix = std::experimental::filesystem::temp_directory_path().string(); std::unordered_map in_binding_map = {}; // TRT IDX -> PYT IDX std::unordered_map out_binding_map = {}; // TRT IDX -> PYT IDX diff --git a/core/runtime/TRTEngineProfiler.cpp b/core/runtime/TRTEngineProfiler.cpp index a115951610..7857a467f0 100644 --- a/core/runtime/TRTEngineProfiler.cpp +++ b/core/runtime/TRTEngineProfiler.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include "core/runtime/TRTEngineProfiler.h" From caf8ad6cd38cc3900d1a2aead56290aa30271560 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Tue, 7 Mar 2023 15:29:49 +0800 Subject: [PATCH 2/2] Attempt to pass CI --- core/runtime/CMakeLists.txt | 8 +++++++- core/runtime/TRTEngineProfiler.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/runtime/CMakeLists.txt b/core/runtime/CMakeLists.txt index a1493f77ae..610dbf46f7 100644 --- a/core/runtime/CMakeLists.txt +++ b/core/runtime/CMakeLists.txt @@ -33,8 +33,14 @@ target_link_libraries(${lib_name} TensorRT::nvinfer torch core_util - #stdc++fs ) +if(NOT WIN32) + target_link_libraries(${lib_name} + PUBLIC + stdc++fs + ) +endif(NOT WIN32) + # Install install(FILES ${HEADER_FILES} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/torch_tensorrt/core/runtime") diff --git a/core/runtime/TRTEngineProfiler.cpp b/core/runtime/TRTEngineProfiler.cpp index 7857a467f0..8f7f0ac4e9 100644 --- a/core/runtime/TRTEngineProfiler.cpp +++ b/core/runtime/TRTEngineProfiler.cpp @@ -1,7 +1,7 @@ #include #include -#include #include +#include #include "core/runtime/TRTEngineProfiler.h"