-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Adding a guideline to build on Windows platform (#1337)
* chore: Adding Windows build guideline Signed-off-by: Anurag Dixit <a.dixit91@gmail.com> * chore: Fix formatting Signed-off-by: Anurag Dixit <a.dixit91@gmail.com> Signed-off-by: Anurag Dixit <a.dixit91@gmail.com>
- Loading branch information
Showing
1 changed file
with
78 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,78 @@ | ||
.. _getting_started_windows: | ||
|
||
Building Torch-TensorRT on Windows | ||
==================================== | ||
|
||
Torch-TensorRT has community support for Windows platform using CMake | ||
|
||
Prerequisite: | ||
|
||
* Microsoft Visual Studio | ||
* LibTorch | ||
* TensorRT | ||
* CUDA | ||
* cuDNN | ||
|
||
|
||
Build configuration | ||
------------------- | ||
|
||
* Open Microsoft Visual Studio | ||
* Open Torch-TensorRT source code folder | ||
* Open Manage configurations -> Edit JSON to open CMakeSettings.json file. | ||
* Configure the CMake build configurations. Following is an example configuration: | ||
|
||
.. code-block:: none | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "x64-Debug", | ||
"generator": "Ninja", | ||
"configurationType": "Debug", | ||
"inheritEnvironments": [ "msvc_x64_x64" ], | ||
"buildRoot": "${projectDir}\\out\\build\\${name}", | ||
"installRoot": "${projectDir}\\out\\install\\${name}", | ||
"cmakeCommandArgs": "-S . -B out", | ||
"buildCommandArgs": "cmake --build out", | ||
"ctestCommandArgs": "", | ||
"variables": [ | ||
{ | ||
"name": "CMAKE_MODULE_PATH", | ||
"value": "$PWD\cmake\Modules", | ||
"type": "FILEPATH" | ||
}, | ||
{ | ||
"name": "Torch_DIR", | ||
"value": "<Path to libtorch>\share\cmake\Torch", | ||
"type": "FILEPATH" | ||
}, | ||
{ | ||
"name": "TensorRT_ROOT", | ||
"value": "<Path to TensorRT directory>", | ||
"type": "FILEPATH" | ||
}, | ||
{ | ||
"name": "CMAKE_BUILD_TYPE", | ||
"value": "Release", | ||
"type": " STRING" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
Compilation | ||
----------- | ||
|
||
* Click Build -> Build All or directly press Ctrl + Shift + B | ||
|
||
Note: After successful compilation, the build artifacts will be present at buildRoot path configured. | ||
|
||
Installation | ||
------------ | ||
|
||
* Build -> Install Torch-TensorRT | ||
|
||
Note: After successful installation, the artifacts will be present at installRoot. |