Skip to content

Commit c52fd8d

Browse files
committed
update alternative compiler section
1 parent 2532f65 commit c52fd8d

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

prototype_source/inductor_windows_cpu.rst

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ TorchInductor is the new compiler backend that compiles the FX Graphs generated
1212
This tutorial introduces the steps for utilizing TorchInductor on Windows CPU.
1313

1414

15-
1615
Software Installation
1716
---------------------
1817

@@ -32,21 +31,6 @@ During Installation, chosse `Desktop Development with C++` in the `Desktop & Mob
3231
Windows inductor also support C++ compiler `LLVM Compiler <https://github.com/llvm/llvm-project/releases>`_ and `Intel Compiler <https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler-download.html>`_ for better performance.
3332
Please check `Alternative Compiler for better performance <#alternative-compiler-for-better-performance>`_.
3433

35-
Alternative Compiler for better performance
36-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37-
38-
To enhance performance on Windows inductor, you can use the Intel Compiler or LLVM Compiler. However, windows inductor rely on the runtime libraries from Microsoft Visual C++ (MSVC). Therefore, your first step should be to install MSVC.
39-
40-
Intel Compiler
41-
~~~~~~~~~~~~~~
42-
#. Download and install `Intel Compiler <https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler-download.html>`_ with Windows version.
43-
#. Set compiler `CXX=icx-cl`
44-
45-
LLVM Compiler
46-
~~~~~~~~~~~~~
47-
#. Download and install `LLVM Compiler <https://github.com/llvm/llvm-project/releases>`_ with Windows version.
48-
#. Set compiler `CXX=clang-cl`
49-
5034
Install Miniforge
5135
^^^^^^^^^^^^^^^^^
5236

@@ -65,6 +49,8 @@ Set Up Environment
6549
#. Create and activate customer conda environment::
6650

6751
conda create -n inductor_cpu_windows python=3.10 -y
52+
#. Activate customer conda environment::
53+
6854
conda activate inductor_cpu_windows
6955
#. Install `PyTorch 2.5 <https://pytorch.org/get-started/locally/>`_ or later.
7056
#. Use torchinductor on Windows CPU::
@@ -100,7 +86,24 @@ Set Up Environment
10086
[ 5.7244e-04, 1.2799e+00, 1.3595e+00, 1.0907e+00, 3.7191e-01,
10187
1.4062e+00, 1.3672e+00, 6.8502e-02, 8.5216e-01, 8.6046e-01]])
10288

89+
Alternative Compiler for better performance
90+
-------------------------------------------
91+
92+
To enhance performance on Windows inductor, you can use the Intel Compiler or LLVM Compiler. However, windows inductor rely on the runtime libraries from Microsoft Visual C++ (MSVC). Therefore, your first step should be to install MSVC.
93+
94+
Intel Compiler
95+
^^^^^^^^^^^^^^
96+
97+
#. Download and install `Intel Compiler <https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler-download.html>`_ with Windows version.
98+
#. Set compiler `CXX=icx-cl`
99+
100+
LLVM Compiler
101+
^^^^^^^^^^^^^
102+
103+
#. Download and install `LLVM Compiler <https://github.com/llvm/llvm-project/releases>`_ with Windows version.
104+
#. Set compiler `CXX=clang-cl`
105+
103106
Conclusion
104107
----------
105108

106-
With this tutorial, we introduce how to use Inductor on Windows CPU with PyTorch 2.5 or later.
109+
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

Comments
 (0)