Open tianleiwu opened 3 weeks ago
@tianleiwu
I assume you add /Zc:__cplusplus
in the cmake file, therefore the__cplusplus
macro is 201703L
due to /std:c++17,
then it enables the TRT_DEPRECATED macro as [[deprecated]]
// Items that are marked as deprecated will be removed in a future release.
#if __cplusplus >= 201402L
#define TRT_DEPRECATED [[deprecated]]
#if __GNUC__ < 6
#define TRT_DEPRECATED_ENUM
#else
#define TRT_DEPRECATED_ENUM TRT_DEPRECATED
#endif
#ifdef _MSC_VER
#define TRT_DEPRECATED_API __declspec(dllexport)
#else
#define TRT_DEPRECATED_API [[deprecated]] __attribute__((visibility("default")))
#endif
#else
#ifdef _MSC_VER
#define TRT_DEPRECATED
#define TRT_DEPRECATED_ENUM
#define TRT_DEPRECATED_API __declspec(dllexport)
#else
#define TRT_DEPRECATED __attribute__((deprecated))
#define TRT_DEPRECATED_ENUM
#define TRT_DEPRECATED_API __attribute__((deprecated, visibility("default")))
#endif
#endif
Previously, we didn't specify /Zc:__cplusplus
, so __cplusplus
is 199711L
by default.
We might need to replace all the TRT deprecated functions with the new ones or simply add /wd4996
Describe the issue
I tried build with CUDA 12.5 and TensorRT 10.0 in Windows, and saw errors like
error C4996: 'nvinfer1::IPluginV2': was declared deprecated
in build.Urgency
None
Target platform
windows 11
Build script
build.bat --cmake_generator "Visual Studio 17 2022" --config Release --build_wheel --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=61;70;75;80;90" --parallel --build_shared_lib --use_cuda --cuda_version "12.5" --cuda_home "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.5" --cudnn_home "C:\CuDNN\9.1.1.17_cuda12" --use_tensorrt --tensorrt_home "C:\TensorRT\10.0.1.6.cuda-12.4"
Error / output
Visual Studio Version
Enterprise 2022 (64-bit) 17.9.7
GCC / Compiler Version
No response