Skip to content

Commit

Permalink
chore: Adding a guideline to build on Windows platform (#1337)
Browse files Browse the repository at this point in the history
* 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
andi4191 authored Sep 8, 2022
1 parent d1768aa commit 00a1f03
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions docsrc/getting_started/getting_started_with_windows.rst
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.

0 comments on commit 00a1f03

Please sign in to comment.