12GB×2 の Blackwell + WSL2 で exllamav3 の Tensor Parallel を動かすまで 「WSL では NCCL 無理」の壁と gather カーネルのレースThis article documents how to enable exllamav3 Tensor Parallel inference on…
匿名の公開いいねです。記事の保存・お気に入りではなく、Featured、Top 3、重要度、掲載順位には影響しません。仕組みとプライバシーAnonymous public likes are reactions, not saved articles or bookmarks. They do not affect Featured, Top 3, importance, or listing order.How it works and privacy
デュアル 12GB Blackwell GPU と WSL2 という制約環境で exllamav3 の Tensor Parallel 推論を実現するまでの試行錯誤を解説しており、NCCL の WSL 非対応問題や gather カーネルの競合状態への対処法を具体的に示している。
This article documents how to enable exllamav3 Tensor Parallel inference on dual 12 GB Blackwell GPUs under WSL2, detailing workarounds for NCCL incompatibility with WSL and race conditions in the gather kernel.
本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (qiita.com) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (qiita.com).
要約と収集メタデータに基づく AI 解説。元記事全文の転載・翻訳ではありません。AI explainer based on the summaries and collected metadata, not a copy or translation of the full source article.
家庭向けの複数 GPU 環境で大規模言語モデル(LLM)を高速に動かす需要が高まる中、量子化推論ライブラリ exllamav3 の Tensor Parallel(TP)を、12GB の Blackwell 世代 GPU 2 枚と WSL2 という制約下で動作させるまでの記録が公開された。VRAM の限られた民生 GPU を組み合わせて実用的な推論環境を構築する上での、実践的な知見として参考になる内容だ。
exllamav3 は、EXL3 形式などの量子化モデルを効率よく扱う推論エンジンで、単一 GPU に載りきらないモデルを複数 GPU に分割する Tensor Parallel に対応する。TP は各層の行列演算を複数デバイスに分散し、全 GPU が並列に計算した結果を集約(gather や all-reduce)することでスループットを高める手法だが、GPU 間の高速な通信が前提となる。
ここで壁となったのが NCCL(NVIDIA Collective Communications Library)だ。TP の集団通信で標準的に使われる NCCL は、Windows 上の WSL2 環境では GPU 間の Peer-to-Peer 通信を十分にサポートしておらず、そのまま動作させることが難しいとされる。記事では NCCL に依存しない通信経路へ切り替えるといった回避策で対処している。
さらに、GPU 間で計算結果を集める gather カーネルにおいて、同期の不備に起因すると見られるレースコンディション(競合状態)が発生し、出力が破損する問題にも直面したという。こうした競合は、複数ストリームやデバイスをまたぐ処理でタイミング依存の不具合として現れやすく、適切な同期を挿入することで安定動作にこぎ着けたとしている。
背景として、NVIDIA の Blackwell 世代は新しいアーキテクチャゆえにドライバや CUDA、各種ライブラリの対応が発展途上で、既存コードがそのまま動かない場面も少なくない。WSL2 は Windows 上で Linux 向けの機械学習ツールを扱える利便性がある一方、ネイティブ Linux と比べてハードウェア寄りの機能に制約が残る場合がある。llama.cpp や vLLM など他の推論基盤でもマルチ GPU 構成の相性問題は報告されており、環境固有の検証が依然として重要であることを示す事例と言えるだろう。
Running large language models locally on consumer hardware increasingly means combining more than one mid-range GPU, and this write-up walks through the practical obstacles of doing exactly that: enabling exllamav3's Tensor Parallel inference across two 12 GB Blackwell-generation cards inside a WSL2 environment. The exercise matters because it sits at the intersection of three trends — the rise of quantized inference engines, the growing viability of multi-GPU setups for enthusiasts, and the reality that many hobbyists run their AI stack on Windows through the Windows Subsystem for Linux rather than on bare-metal Linux.
By way of background, exllamav3 is a high-performance inference library optimized for its EXL3 quantization format, designed to squeeze large models onto limited VRAM while retaining acceptable quality. Tensor Parallel, the technique at the center of this article, splits individual weight matrices across multiple GPUs so that each device handles a slice of every layer. This differs from simple layer-wise or pipeline splitting, where whole layers are assigned to separate cards. Tensor parallelism can improve throughput and lets a model that would not fit on a single 12 GB card span two of them, but it demands frequent, low-latency communication between the GPUs to combine partial results after each parallelized operation.
That communication requirement is where the first wall appears. Multi-GPU inference frameworks typically rely on NCCL, NVIDIA's Collective Communications Library, to handle the all-reduce and all-gather operations that stitch tensor-parallel shards back together. NCCL, however, is not fully supported under WSL2. The virtualized GPU path that WSL exposes does not provide the peer-to-peer and device-to-device transport features NCCL expects, so attempts to initialize an NCCL communicator inside WSL commonly fail or hang. The article frames this bluntly as the "NCCL is impossible on WSL" barrier, and it is a well-known limitation that has affected other projects attempting distributed workloads on the subsystem.
The workaround, as described, is to avoid NCCL entirely and route the cross-GPU synchronization through an alternative communication path. In practice this appears to mean falling back to a non-NCCL backend for the collective operations — for example, staging data through host memory or using a custom gather implementation rather than the library's optimized collectives. This sidesteps the incompatibility but shifts the burden onto exllamav3's own kernels to move and combine tensors between the two Blackwell devices, which is where the second problem surfaces.
That second issue is a race condition in the gather kernel. When partial outputs from each GPU are gathered and recombined, correct results depend on all contributing operations completing before the gathered buffer is read. If synchronization is missing or incorrectly placed, one GPU can begin reading or writing shared data before the other has finished, producing corrupted activations, non-deterministic output, or outright crashes. The article documents diagnosing and addressing this timing hazard, likely by adding or correcting stream synchronization so that the gather step waits for the relevant kernels and memory transfers to finish. Race conditions of this kind are notoriously intermittent, which makes them difficult to reproduce and easy to mistake for other faults, so pinning the behavior to the gather path is a meaningful part of the story.
The Blackwell context adds another layer of nuance. As a newer architecture, Blackwell cards can require recent CUDA toolkits, driver versions, and framework builds, and support in inference libraries may still be maturing. Combining bleeding-edge hardware with the constraints of WSL2 compounds the risk that a given code path has not been widely tested, which is one reason low-level bugs like the gather race can go unnoticed until someone runs this specific configuration.
For readers weighing a similar build, the takeaways are pragmatic rather than universal. Dual 12 GB GPUs can serve as an affordable route to running larger quantized models with tensor parallelism, but the software path is not turnkey on WSL2, and users should expect to substitute non-NCCL communication and to verify output correctness carefully. Those who can run native Linux may avoid the NCCL limitation altogether, and anyone attempting this on Windows should treat the described fixes as a starting point that may shift as exllamav3 and Blackwell support continue to evolve.
