Skip to content

Commit d1a98df

Browse files
committed
update inductor windows cpu
1 parent 10b6d4b commit d1a98df

File tree

1 file changed

+36
-6
lines changed

1 file changed

+36
-6
lines changed

prototype_source/inductor_windows_cpu.rst

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
How to use TorchInductor on Windows CPU
22
=======================================
33

4-
**Author**: `Xu, Han <https://github.com/xuhancn>`_, `Zhaoqiong Zheng <https://github.com/ZhaoqiongZ>`_
4+
**Author**: `Zhaoqiong Zheng <https://github.com/ZhaoqiongZ>`_, `Xu, Han <https://github.com/xuhancn>`_
55

66

77
Introduction
@@ -29,7 +29,8 @@ During Installation, chosse `Desktop Development with C++` in the `Desktop & Mob
2929

3030
.. note::
3131

32-
You can also choose other compiler like Clang & Intel Compiler.
32+
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>`_.
33+
Intel compiler setup guide(TODO: Intel will provide URL for this guide recently)
3334

3435

3536
Install Miniforge
@@ -41,21 +42,26 @@ Set Up Environment
4142
^^^^^^^^^^^^^^^^^^
4243

4344
1. Open a command line environment via cmd.exe.
45+
4446
2. Activate `MSVC` via below command:
4547
::
4648

4749
"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvars64.bat"
48-
3. Activate `conda` via below command:
50+
51+
1. Activate `conda` via below command:
4952
::
5053

5154
"C:/ProgramData/miniforge3/Scripts/activate.bat"
52-
4. Create and activate customer conda environment:
55+
56+
1. Create and activate customer conda environment:
5357
::
5458

5559
conda create -n inductor_cpu_windows python=3.10 -y
5660
conda activate inductor_cpu_windows
57-
5. Install `PyTorch 2.5 <https://pytorch.org/get-started/locally/>`_ or later.
58-
6. Try `torchinductor` on Windows CPU:
61+
62+
1. Install `PyTorch 2.5 <https://pytorch.org/get-started/locally/>`_ or later.
63+
64+
2. Try `torchinductor` on Windows CPU:
5965
::
6066

6167
import torch
@@ -66,6 +72,30 @@ Set Up Environment
6672
opt_foo1 = torch.compile(foo)
6773
print(opt_foo1(torch.randn(10, 10), torch.randn(10, 10)))
6874

75+
output of the above example.
76+
::
77+
78+
tensor([[-3.9074e-02, 1.3994e+00, 1.3894e+00, 3.2630e-01, 8.3060e-01,
79+
1.1833e+00, 1.4016e+00, 7.1905e-01, 9.0637e-01, -1.3648e+00],
80+
[ 1.3728e+00, 7.2863e-01, 8.6888e-01, -6.5442e-01, 5.6790e-01,
81+
5.2025e-01, -1.2647e+00, 1.2684e+00, -1.2483e+00, -7.2845e-01],
82+
[-6.7747e-01, 1.2028e+00, 1.1431e+00, 2.7196e-02, 5.5304e-01,
83+
6.1945e-01, 4.6654e-01, -3.7376e-01, 9.3644e-01, 1.3600e+00],
84+
[-1.0157e-01, 7.7200e-02, 1.0146e+00, 8.8175e-02, -1.4057e+00,
85+
8.8119e-01, 6.2853e-01, 3.2773e-01, 8.5082e-01, 8.4615e-01],
86+
[ 1.4140e+00, 1.2130e+00, -2.0762e-01, 3.3914e-01, 4.1122e-01,
87+
8.6895e-01, 5.8852e-01, 9.3310e-01, 1.4101e+00, 9.8318e-01],
88+
[ 1.2355e+00, 7.9290e-02, 1.3707e+00, 1.3754e+00, 1.3768e+00,
89+
9.8970e-01, 1.1171e+00, -5.9944e-01, 1.2553e+00, 1.3394e+00],
90+
[-1.3428e+00, 1.8400e-01, 1.1756e+00, -3.0654e-01, 9.7973e-01,
91+
1.4019e+00, 1.1886e+00, -1.9194e-01, 1.3632e+00, 1.1811e+00],
92+
[-7.1615e-01, 4.6622e-01, 1.2089e+00, 9.2011e-01, 1.0659e+00,
93+
9.0892e-01, 1.1932e+00, 1.3888e+00, 1.3898e+00, 1.3218e+00],
94+
[ 1.4139e+00, -1.4000e-01, 9.1192e-01, 3.0175e-01, -9.6432e-01,
95+
-1.0498e+00, 1.4115e+00, -9.3212e-01, -9.0964e-01, 1.0127e+00],
96+
[ 5.7244e-04, 1.2799e+00, 1.3595e+00, 1.0907e+00, 3.7191e-01,
97+
1.4062e+00, 1.3672e+00, 6.8502e-02, 8.5216e-01, 8.6046e-01]])
98+
6999
Conclusion
70100
----------
71101

0 commit comments

Comments
 (0)