@@ -75,4 +75,73 @@ Installation
7575
7676* Build -> Install Torch-TensorRT
7777
78- Note: After successful installation, the artifacts will be present at installRoot.
78+ Note: After successful installation, the artifacts will be present at installRoot.
79+
80+
81+ Building With Visual Studio Code
82+ ==================================
83+
84+ 1. Install Visual Studio Code
85+ 2. Install Build Tools for Visual Studio 2022
86+
87+ - Select "Desktop Development with C++"
88+ > Currently, this installs MSVC v143 - 2022. There are also options to install previous 2019/2017/2015 editions of MSVC
89+ > License term "1b Build Tools additional use right" allows using Build Tools to compile Open Source Dependencies
90+ > Also allows using Build Tools to develop and test Open Source Dependencies, to the minor extend of ensuring compatibility with Build Tools
91+
92+ 3. Install CUDA (e.g. 11.7.1)
93+ 4. Install cuDNN (e.g. 8.5.0.96)
94+
95+ - Set ``cuDNN_ROOT_DIR ``
96+
97+ 5. Install `TensorRT ` (e.g 8.5.1.7)
98+
99+ - Set ``TensorRT_ROOT ``
100+ - Add ``TensorRT_ROOT\lib `` to ``PATH ``
101+
102+ 6. Install "libtorch-win-shared-with-deps-latest.zip"
103+
104+ - Select build targeting the appropriate CUDA version
105+ - Set ``Torch_DIR ``
106+ - Add ``Torch_DIR\lib `` to ``PATH ``
107+
108+ 7. Clone TensorRT repo
109+ 8. Install C++ and CMake Tools extensions from MS
110+
111+ - Change build to ``RelWithDebInfo ``
112+
113+ 9. Update ``.vscode\settings.json ``
114+
115+ - Clean, configure, build
116+
117+ e.g. /.vscode/settings.json
118+
119+ .. code-block :: json
120+
121+ {
122+ "cmake.generator" : " Ninja" ,
123+ "cmake.configureSettings" : {
124+ "CMAKE_MODULE_PATH" : {
125+ "type" : " FILEPATH" ,
126+ "value" : " $PWD\\ cmake\\ Modules"
127+ },
128+ "CMAKE_CXX_FLAGS" : {
129+ "type" : " STRING" ,
130+ "value" : " -D_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING"
131+ },
132+ "Torch_DIR" : {
133+ "type" : " FILEPATH" ,
134+ "value" : " X:\\ libtorch\\ share\\ cmake\\ Torch"
135+ },
136+ "TensorRT_ROOT" : {
137+ "type" : " FILEPATH" ,
138+ "value" : " X:\\ path\\ to\\ tensorrt"
139+ },
140+ "cuDNN_ROOT_DIR" : {
141+ "type" : " FILEPATH" ,
142+ "value" : " X:\\ path\\ to\\ cudnn"
143+ },
144+ "CMAKE_CUDA_FLAGS" : " -allow-unsupported-compiler"
145+ },
146+ "cmake.buildDirectory" : " ${workspaceFolder}/torch_tensorrt_build"
147+ }
0 commit comments