Windows support timeline for torch.compile

username: KHersey
cooked: <p>Is there a rough timeline for when/if we can expect Windows to be supported for torch.compile and torch._dynamo.optimize?</p>
<p>A cursory search didn’t yield anything so posting it here.</p>

username: marksaroufim
cooked: <p>torch.compile will work, it’s just that inductor the default compiler which leverages triton under the hood does not.</p>
<p>You can +1 this if you like <a href="https://github.com/openai/triton/issues/1640" class="inline-onebox">Is there a plan to support Windows? · Issue #1640 · openai/triton · GitHub</a></p>

username: kartikpodugu
cooked: <p><a class="mention" href="/u/marksaroufim">@marksaroufim</a> I didn’t understand. Can you please elaborate ?</p>

username: marksaroufim
cooked: <p>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</p>
<p>However supporting Windows on CPU should be fine and there are other backends you can pass in to <code>torch.compile(backend="example_backend")</code> that might have better Windows support</p>

username: kartikpodugu
cooked: <p>Thanks for a detailed reply. From what I understand, you are saying that <strong>torch.compile</strong> should work on CPU on windows. Am I correct in my understanding. I am trying to do <strong>torch.compile</strong> on CPU only</p>

username: NicolasMejiaPetit
cooked: <p>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. <a href="https://github.com/unslothai/unsloth/issues/210" class="inline-onebox" rel="noopener nofollow ugc">I got unsloth running in native windows. · Issue #210 · unslothai/unsloth · GitHub</a></p>
<blockquote>
<p>Blockquote</p>
</blockquote>

username: Chris_Fellows
cooked: <p>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.</p>
<p>pip install torch==2.3.1+cpu openvino --extra-index-url <a href="https://download.pytorch.org/whl/cpu" rel="noopener nofollow ugc">https://download.pytorch.org/whl/cpu</a></p>
<p>transformer = torch.compile(transformer, fullgraph=True, backend=‘openvino’)</p>
<p>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.</p>
<p>See here for some other discussion:</p><aside class="onebox allowlistedgeneric" data-onebox-src="https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Stable-Diffusion-OpenVINO-quot-BackendCompilerFailed-openvino-fx/m-p/1561371#M30502">
  <header class="source">

      <a href="https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Stable-Diffusion-OpenVINO-quot-BackendCompilerFailed-openvino-fx/m-p/1561371#M30502" target="_blank" rel="noopener nofollow ugc" title="06:05AM - 10 January 2024">community.intel.com – 10 Jan 24</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/175;"><img src="https://community.intel.com/t5/image/serverpage/image-id/50292iF465A4D058E24D95?v=v2&amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" class="thumbnail" width="690" height="176"></div>

<h3><a href="https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Stable-Diffusion-OpenVINO-quot-BackendCompilerFailed-openvino-fx/m-p/1561371#M30502" target="_blank" rel="noopener nofollow ugc">Stable Diffusion OpenVINO : "BackendCompilerFailed: openvino_fx..."</a></h3>

  <p>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...</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>