Windows DDP on RTX 50-series only: use_libuv was requested but PyTorch was built without libuv support (works on 40/20-series)

Swati_sd: <h2><a name="p-476359-goal-1" class="anchor" href="#p-476359-goal-1"></a><strong>Goal</strong></h2>
<p>Run PatchCore (FAISS + PyTorch) with DDP on Windows using <code>python -m torch.distributed.run --nproc_per_node=2</code>.</p>
<p><strong>Command</strong></p>
<pre><code class="lang-auto">set USE_LIBUV=0 &amp;&amp; set MASTER_ADDR=127.0.0.1 &amp;&amp; set MASTER_PORT=29500 ^
&amp;&amp; python -m torch.distributed.run --nproc_per_node=2 train_tuple.py --ddp --use_gpu

</code></pre>
<p>(Also tried <code>torchrun</code> alias, same result.)</p>
<p><strong>Error (excerpt)</strong></p>
<pre><code class="lang-auto">torch.distributed.DistStoreError: use_libuv was requested but PyTorch was built without libuv support, run with USE_LIBUV
</code></pre>
<h2><a name="p-476359-system-environment-2" class="anchor" href="#p-476359-system-environment-2"></a>System &amp; environment</h2>
<p><strong>OS / GPU</strong></p>
<ul>
<li>
<p>Windows 10/11 (x64)</p>
</li>
<li>
<p>(RTX 5090) — Driver version: <em>(please advise if you need exact <code>nvidia-smi</code> output; can share)</em></p>
</li>
</ul>
<p><strong>Python</strong></p>
<ul>
<li><code>python 3.11.14</code></li>
</ul>
<p><strong>PyTorch / CUDA / FAISS (conda + pip mix)</strong></p>
<pre><code class="lang-auto">torch                        2.10.0.dev20251022+cu128  (pip)
torchvision                  0.25.0.dev20251022+cu128  (pip)
torchaudio                   2.10.0.dev20251022+cu128  (pip))
faiss                        1.9.0  py311cuda126...    (conda-forge)
faiss-gpu                    1.9.0  ...                (conda-forge)
cuda-toolkit                 12.8.0                    (conda, NVIDIA label)
cudnn                        9.13.1                    (conda-forge)
</code></pre>
<p>the error message specifically complains about <strong>libuv rendezvous</strong>.</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/3/f/3f05b13d0ace9f4ee92a2c3fb318271883fc2fb4.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/3f05b13d0ace9f4ee92a2c3fb318271883fc2fb4" title="Screenshot 2025-10-25 080632"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/3/f/3f05b13d0ace9f4ee92a2c3fb318271883fc2fb4_2_690x359.jpeg" alt="Screenshot 2025-10-25 080632" data-base62-sha1="8Zwh8xyEPFTYkSrtQOXnPWxuode" width="690" height="359" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/3/f/3f05b13d0ace9f4ee92a2c3fb318271883fc2fb4_2_690x359.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/3/f/3f05b13d0ace9f4ee92a2c3fb318271883fc2fb4_2_1035x538.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/3/f/3f05b13d0ace9f4ee92a2c3fb318271883fc2fb4_2_1380x718.jpeg 2x" data-dominant-color="151516"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot 2025-10-25 080632</span><span class="informations">1920×999 173 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>Things I already tried</p>
<ol>
<li>
<p>Setting <code>USE_LIBUV=0</code> in the shell <strong>and</strong> at the very top of the script (before any <code>torch</code> import).</p>
</li>
<li>
<p>Explicit <code>backend="gloo"</code> in <code>init_process_group</code>.</p>
</li>
<li>
<p>Using <code>python -m torch.distributed.run</code> vs <code>torchrun</code>.</p>
</li>
<li>
<p>Ensuring <code>MASTER_ADDR/MASTER_PORT</code> are set and free.</p>
</li>
<li>
<p>Verifying single-process execution works.</p>
</li>
<li>
<p>Verified that <code>os.environ["USE_LIBUV"]</code> prints <code>0</code> inside the script right before importing <code>torch.distributed</code>.</p>
</li>
<li>
<p>I have looked into all the forums and tried various version of nightly and different suggested combinations of torch and cuda the error still remain.</p>
</li>
</ol>
<hr>
<h2><a name="p-476359-questions-for-the-community-3" class="anchor" href="#p-476359-questions-for-the-community-3"></a>Questions for the community</h2>
<ol>
<li>
<p><strong>Is libuv rendezvous expected/required</strong> on current PyTorch nightlies for Windows, or should <code>USE_LIBUV=0</code> fully disable it?</p>
</li>
<li>
<p>What’s the <strong>recommended, known-good install matrix</strong> for:</p>
<ul>
<li>
<p>Windows + CUDA 12.6/12.8</p>
</li>
<li>
<p>PyTorch (stable/nightly) + torchvision/torchaudio</p>
</li>
<li>
<p>FAISS (GPU)<br>
so that DDP (gloo backend) works with <code>nproc_per_node&gt;1</code>?</p>
</li>
</ul>
</li>
<li>
<p>If libuv rendezvous is the intended default on Windows nightlies, <strong>how do I force TCPStore/gloo</strong> without libuv, or <strong>how do I install a libuv-enabled/non-libuv PyTorch build</strong> for Windows?</p>
</li>
<li>
<p>Any <strong>guidance on FAISS build compatibility</strong> with the above stack on Windows would also be appreciated (I’m fine to re-create a clean env).</p>
</li>
</ol>
<h2><a name="p-476359-what-works-vs-fails-using-the-same-exact-code-base-4" class="anchor" href="#p-476359-what-works-vs-fails-using-the-same-exact-code-base-4"></a>What works vs fails (using the same exact code base)</h2>
<ul>
<li>
<p><img src="https://discuss.pytorch.org/images/emoji/apple/white_check_mark.png?v=14" title=":white_check_mark:" class="emoji" alt=":white_check_mark:" loading="lazy" width="20" height="20"> RTX <strong>4090</strong> — OK (DDP with <code>nproc_per_node=2</code>)</p>
</li>
<li>
<p><img src="https://discuss.pytorch.org/images/emoji/apple/white_check_mark.png?v=14" title=":white_check_mark:" class="emoji" alt=":white_check_mark:" loading="lazy" width="20" height="20"> RTX <strong>2080 Ti</strong> — OK</p>
</li>
<li>
<p><img src="https://discuss.pytorch.org/images/emoji/apple/cross_mark.png?v=14" title=":cross_mark:" class="emoji" alt=":cross_mark:" loading="lazy" width="20" height="20"> RTX <strong>50-series</strong> — <strong>fails</strong> with the libuv rendezvous error</p>
</li>
</ul>
<hr>