Skip to content

Commit

Permalink
vstrt/win32.cpp: fix branching on trt version
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium committed Apr 25, 2024
1 parent 5fea4b3 commit 34bc885
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vstrt/win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@

#include <NvInferVersion.h>

#if NV_TENSORRT_VERSION >= 100100
#if NV_TENSORRT_VERSION >= 100001
#define CONCAT_VERSION(name, version) (name "_" #version ".dll")
#endif // NV_TENSORRT_VERSION >= 100100
#endif // NV_TENSORRT_VERSION >= 100001

namespace {
std::vector<std::wstring> dlls = {
// This list must be sorted by dependency.
#if NV_TENSORRT_VERSION >= 100100
#if NV_TENSORRT_VERSION >= 100001
#ifdef USE_NVINFER_PLUGIN
// nvinfer_plugin dependencies
CONCAT_VERSION(L"nvinfer", NV_TENSORRT_MAJOR),
CONCAT_VERSION(L"nvinfer_plugin", NV_TENSORRT_MAJOR),
#endif // USE_NVINFER_PLUGIN
// Finally, nvinfer again.
CONCAT_VERSION(L"nvinfer", NV_TENSORRT_MAJOR), // must be the last
#else // NV_TENSORRT_VERSION >= 100100
#else // NV_TENSORRT_VERSION >= 100001
#ifdef USE_NVINFER_PLUGIN
// nvinfer_plugin dependencies
L"nvinfer.dll",
L"nvinfer_plugin.dll",
#endif // USE_NVINFER_PLUGIN
// Finally, nvinfer again.
L"nvinfer.dll", // must be the last
#endif // NV_TENSORRT_VERSION >= 100100
#endif // NV_TENSORRT_VERSION >= 100001
};

namespace fs = std::filesystem;
Expand Down

0 comments on commit 34bc885

Please sign in to comment.