cancel
Showing results for 
Search instead for 
Did you mean: 

AI Discussions

erictayet
Journeyman III

GPU passthru for WSL2 in Win10

Hi there, I'm using a XFX 7900XTX/5900X/Asus X570 motherboard and recently started dabbling in AI on my PC.

 

OS is Win10 Pro Build 19045.5011 with WSL2 Ubuntu 22.04.

 

Ubuntu seems to run fine. I can get Ollama working.

 

However, ROCm cannot install property. I've followed the instructions and there's always failure in driver or ROCm installation. The driver seems to be installed.

 

Issue is clinfo show Number of devices as 0 and /dev/kfd is not created. ROCminfo crashes when run.

 

I have enabled SR-IOV and IOMMU in BIOS along with other VM settings. HyperV & VM & Sandbox is enabled in Win10 Pro since I've been using those.

 

I have narrowed down the issue to Win10 driver. In 24.6.1, WSL support was mentioned along with install docs in rocm.docs.and.com. However, the latest 24.9.1 driver doesn't mention this.

 

Can the driver team confirm that WSL GPU passthru is only supported in 24.6.1?

 

The 24.9.1 drivers are the best gaming drivers right now. I would rather stay on these drivers than downgrade. Are there Beta drivers with WSL support?

0 Likes
3 Replies
vokinko1
Journeyman III

I’m just theory crafting here. I’ve read a very little about setting x servers. Thinking of setups like how linode does it. Maybe you need to have one system act as a server and authorize use of the gpa. Then the subsystems can lease it out? Does that make any sense?

0 Likes

Thanks for your answer. I'm not sure I follow you. (I used to be a Windows dev, Linux is not my forte.)

 

X server is the windowing system/shell that sits on top of the Linux base. WSL doesn't support full desktop GUI experience, so X server is never loaded. WSL handles the windowing calls to draw Linux Windows in Windows 10/11 so simple apps like browsers can work.

 

My issue is Windows 10 doesn't expose the GPU to the Linux kernel so Ubuntu doesn't see my 7900XTX, only Microsoft Basic adaptor or something.

 

I believe the PCI device ID (address space etc.) needs to be passed to WSL2 for this to work. In essence, both Windows GDI & DX calls, and Linux Kernel calls can be passed to the hardware almost directly so ROCm and other tools can call 7900XTX and use its computing resources. I know some tools can call GPU resource directly without Linux GPU driver install but I'm not sure how that works.

 

When I query Ubuntu, it doesn't see the PCI device ID and hence cannot link the driver to hardware. I could be wrong, but I thought X server shouldn't be the software that leases out GPU resources since it needs this resources to be exposed by systemd if I remember correctly.

0 Likes
shing3232
Adept I

Windows 11 does expose GPU my 7900XTX to my ubuntu WSL.

but I have hard time compile vllm for my usecase.

0 Likes