Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Inductor windows tutorial with xpu support #3309

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

ZhaoqiongZ
Copy link
Contributor

@ZhaoqiongZ ZhaoqiongZ commented Mar 31, 2025

Description

Update Inductor windows tutorial with xpu support

cc @gujinghui @EikanWang @fengyuan14 @guangyey

ZhaoqiongZ and others added 9 commits October 21, 2024 09:18

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link

pytorch-bot bot commented Mar 31, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3309

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@ZhaoqiongZ
Copy link
Contributor Author

Hi @svekars , could you help review it?

@svekars svekars added 2.7 module: xpu XPU related issues labels Mar 31, 2025
@svekars svekars requested a review from AlannaBurke March 31, 2025 15:08

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link
Contributor

@guangyey guangyey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just need a final approval from the Meta team.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@ZhaoqiongZ
Copy link
Contributor Author

Hi @svekars @AlannaBurke , Could you please review this update at your earliest convenience? We need to add this updated link to pytorch/pytorch#150397 before the release of v2.7. Thank you!

@@ -1,130 +0,0 @@
How to use TorchInductor on Windows CPU
=======================================
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make this file a redirect like this:

This tutorial has been moved to https://pytorch.org/tutorials/prototype/inductor_windows.html.

Redirecting in 3 seconds...

.. raw:: html

   <meta http-equiv="Refresh" content="3; url='https://pytorch.org/tutorials/prototype/inductor_windows.html'" />

Copy link
Contributor Author

@ZhaoqiongZ ZhaoqiongZ Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have added back inductor_windows_cpu and redirect to inductor_windows

Copy link
Contributor

@AlannaBurke AlannaBurke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a couple of comments on minor things, otherwise this LGTM.


Download and install `MSVC <https://visualstudio.microsoft.com/downloads/>`_.

During Installation, select ``Workloads`` table then ``Desktop & Mobile`` Section, check mark on ``Desktop Development with C++`` and then install.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be nice to have screenshots here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a screenshot here

Windows CPU 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.
Please check `Alternative Compiler for better performance on CPU <#alternative-compiler-for-better-performance>`_.

Conda Installation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per pytorch/pytorch#149551, Conda is no longer being used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the conda installation and let user create and activate virtual environment on their own

Install a Compiler
^^^^^^^^^^^^^^^^^^

C++ compiler is required for torchinductor optimization, let's take Microsoft Visual C++ (MSVC) as an example.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep formatting consistent, ie, TorchInductor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep formatting for all the TorchInductor

@ZhaoqiongZ
Copy link
Contributor Author

ZhaoqiongZ commented Apr 4, 2025

Hi @svekars @AlannaBurke , all the comments have been addressed, please help review again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants