You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: prototype_source/inductor_windows_cpu.rst
+25-8Lines changed: 25 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,30 +24,30 @@ This tutorial will guide you through the process of using TorchInductor on a Win
24
24
* Miniforge for Windows
25
25
26
26
Install the Required Software
27
-
-------------------------------------------
27
+
-----------------------------
28
28
29
29
First, let's install the required software. C++ compiler is required for TorchInductor optimization.
30
30
We will use Microsoft Visual C++ (MSVC) for this example.
31
31
32
32
1. Download and install `MSVC <https://visualstudio.microsoft.com/downloads/>`_.
33
33
34
-
2. During the installation, choose **Desktop Development with C++** in the **Desktop & Mobile** section. Then install the software
34
+
2. During the installation, choose **Desktop Development with C++** in the **Desktop & Mobile** section in **Workloads** table. Then install the software
35
35
36
36
.. note::
37
37
38
38
We recommend C++ compiler `Clang <https://github.com/llvm/llvm-project/releases>`_ and `Intel Compiler <https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html>`_.
39
-
39
+
Please check `Alternative Compiler for better performance <#alternative-compiler-for-better-performance>`_.
40
40
41
41
3. Download and install `Miniforge3-Windows-x86_64.exe <https://github.com/conda-forge/miniforge/releases/latest/>`__.
42
42
43
43
Set Up the Environment
44
-
------------------------------
44
+
----------------------
45
45
46
46
#. Open the command line environment via ``cmd.exe``.
To enhance performance on Windows inductor, you can use the Intel Compiler or LLVM Compiler. However, they rely on the runtime libraries from Microsoft Visual C++ (MSVC). Therefore, your first step should be to install MSVC.
109
+
110
+
Intel Compiler
111
+
^^^^^^^^^^^^^^
112
+
113
+
#. Download and install `Intel Compiler <https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler-download.html>`_ with Windows version.
114
+
#. Set Windows Inductor Compiler via environment variable ``set CXX=icx-cl``
115
+
116
+
LLVM Compiler
117
+
^^^^^^^^^^^^^
118
+
119
+
#. Download and install `LLVM Compiler <https://github.com/llvm/llvm-project/releases>`_ and choose win64 version.
120
+
#. Set Windows Inductor Compiler via environment variable ``set CXX=clang-cl``
121
+
105
122
Conclusion
106
123
----------
107
124
108
-
In this tutorial, we have learned how to use Inductor on Windows CPU with PyTorch 2.5 or later.
125
+
With this tutorial, we introduce how to use Inductor on Windows CPU with PyTorch 2.5 or later. We can use Intel Compiler or LLVM Compiler to get better performance.
0 commit comments