# Windows support timeline for torch.compile

**URL:** <https://discuss.pytorch.org/t/windows-support-timeline-for-torch-compile/182268>\
**Category:** torch.\_dynamo\
**Created:** [June 16, 2023, 6:45pm UTC](https://discuss.pytorch.org/t/windows-support-timeline-for-torch-compile/182268 "2023-06-16T18:45:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![KHersey](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/k/839c29/32.png) [@KHersey](https://discuss.pytorch.org/u/KHersey)\
**Post date:** [June 16, 2023, 6:45pm UTC](https://discuss.pytorch.org/t/windows-support-timeline-for-torch-compile/182268/1 "2023-06-16T18:45:24Z")

</div>

Is there a rough timeline for when/if we can expect Windows to be supported for torch.compile and torch.\_dynamo.optimize?

A cursory search didn’t yield anything so posting it here.

---

<div class="post-metadata">

**Author:** ![marksaroufim](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/marksaroufim/32/36747_2.png) [@marksaroufim](https://discuss.pytorch.org/u/marksaroufim)\
**Post date:** [June 18, 2023, 5:08pm UTC](https://discuss.pytorch.org/t/windows-support-timeline-for-torch-compile/182268/2 "2023-06-18T17:08:27Z")

</div>

torch.compile will work, it’s just that inductor the default compiler which leverages triton under the hood does not.

You can +1 this if you like [Is there a plan to support Windows? · Issue #1640 · openai/triton · GitHub](https://github.com/openai/triton/issues/1640)

---

<div class="post-metadata">

**Author:** ![kartikpodugu](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/kartikpodugu/32/12673_2.png) [@kartikpodugu](https://discuss.pytorch.org/u/kartikpodugu)\
**Post date:** [March 8, 2024, 5:48am UTC](https://discuss.pytorch.org/t/windows-support-timeline-for-torch-compile/182268/3 "2024-03-08T05:48:53Z")

</div>

@marksaroufim I didn’t understand. Can you please elaborate ?

---

<div class="post-metadata">

**Author:** ![marksaroufim](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/marksaroufim/32/36747_2.png) [@marksaroufim](https://discuss.pytorch.org/u/marksaroufim)\
**Post date:** [March 8, 2024, 6:02am UTC](https://discuss.pytorch.org/t/windows-support-timeline-for-torch-compile/182268/4 "2024-03-08T06:02:43Z")

</div>

A simplified view of torch.compile on GPU is that it takes your python code and generates openai/triton code (we call the compiler that does this transformation inductor) and because triton does not support Windows then it’s not obvious how torch.compile will support Windows GPU

However supporting Windows on CPU should be fine and there are other backends you can pass in to `torch.compile(backend="example_backend")` that might have better Windows support

---

<div class="post-metadata">

**Author:** ![kartikpodugu](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/kartikpodugu/32/12673_2.png) [@kartikpodugu](https://discuss.pytorch.org/u/kartikpodugu)\
**Post date:** [March 8, 2024, 6:23am UTC](https://discuss.pytorch.org/t/windows-support-timeline-for-torch-compile/182268/5 "2024-03-08T06:23:26Z")

</div>

Thanks for a detailed reply. From what I understand, you are saying that **torch.compile** should work on CPU on windows. Am I correct in my understanding. I am trying to do **torch.compile** on CPU only

---

<div class="post-metadata">

**Author:** ![NicolasMejiaPetit](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/nicolasmejiapetit/32/69746_2.png) [@NicolasMejiaPetit](https://discuss.pytorch.org/u/NicolasMejiaPetit)\
**Post date:** [May 4, 2024, 6:54am UTC](https://discuss.pytorch.org/t/windows-support-timeline-for-torch-compile/182268/6 "2024-05-04T06:54:09Z")

</div>

Sort of. I have triton installed on native windows along with deepspeed. you just gotta find the wheels or build them your selves. A wonderful gentleman by the name of “wkpark” makes triton wheels and their libraries for windows here is my link to the ones i have installed, but you can find the official ones from him in GitHub. Here is the install i made to use unsloth on windows at the bottom you’ll find a home.md where the instructions are at the very bottom, and at the bottom of the github issue, there is detailed pictures for certain requirments. [I got unsloth running in native windows. · Issue #210 · unslothai/unsloth · GitHub](https://github.com/unslothai/unsloth/issues/210)

> Blockquote

---

<div class="post-metadata">

**Author:** ![Chris\_Fellows](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/chris_fellows/32/64488_2.png) [@Chris\_Fellows](https://discuss.pytorch.org/u/Chris_Fellows)\
**Post date:** [July 8, 2024, 1:08pm UTC](https://discuss.pytorch.org/t/windows-support-timeline-for-torch-compile/182268/7 "2024-07-08T13:08:36Z")

</div>

for what it’s worth, I now have torch.compile working on CPU using the openvino backend, though you have to get some updated packages.

pip install torch==2.3.1+cpu openvino --extra-index-url [https://download.pytorch.org/whl/cpu](https://download.pytorch.org/whl/cpu)

transformer = torch.compile(transformer, fullgraph=True, backend=‘openvino’)

I’m on an older AMD CPU so I’m not really getting a substantial benefit from openvino, through I do think my test cases have gone from crushingly slow to just very slow, which is nice.

See here for some other discussion:

> **[Stable Diffusion OpenVINO : "BackendCompilerFailed: openvino\_fx..."](https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Stable-Diffusion-OpenVINO-quot-BackendCompilerFailed-openvino-fx/m-p/1561371#M30502)**
>
> Hello! I would like to experiment with OpenVINO and Stable Diffusion but I can't seem to get it to work. I saw someone else had the same error as me, but I didn't see a solution on their post since the user seems to have stopped responding...
