Commit b7e06ff
WSL AMD/Intel iGPU detection via Windows interop + wsl2-amd/intel.yaml
Operator-flagged 2026-05-17: "we have and AMD iGPU here on the
Windows Host's (WSL--Podman-WSL/MiOS) Machine!!" -- the Ryzen iGPU
was undetected because mios-cdi-detect's AMD branch only checked
for /dev/kfd, which doesn't exist under WSL2 (AMD iGPUs there share
/dev/dxg with NVIDIA via the WDDM paravirt driver).
Two-part fix:
1. mios-cdi-detect detection block now queries the Windows host
via powershell.exe Get-CimInstance Win32_VideoController when
/dev/dxg is present. Matches AMD/Radeon and Intel name regexes
case-insensitively. New HAS_AMD_WSL / HAS_INTEL_WSL flags so
the downstream spec-generation branches know whether to hand-
roll the WSL CDI spec or fall back to amd-ctk / intel-cdi-
specs-generator. 5s timeout on the PSH call; fails open
(boot never breaks on enumeration failure).
Live on this host: "windows GPUs: Microsoft Remote Display
Adapter, AMD Radeon(TM) Graphics, NVIDIA GeForce RTX 4090"
-> nvidia=1 amd=1 (wsl=1) intel=0 (wsl=0).
2. New WSL CDI spec generation. Mirrors the existing wsl2-nvidia
.yaml pattern (which hand-rolls /dev/dxg + /usr/lib/wsl rbind
when nvidia-ctk is unavailable). Two new specs:
/run/cdi/wsl2-amd.yaml kind: amd.com/gpu name: all
/run/cdi/wsl2-intel.yaml kind: intel.com/gpu name: all
Both register /dev/dxg as the device node + rbind-mount
/usr/lib/wsl so the container can use Vulkan (mesa3d via WSL)
or DirectML against the Windows-side AMD/Intel driver. Bare-
metal hosts still get amd-ctk / intel-cdi-specs-generator
output via the existing branches (HAS_*_WSL=0 path).
3. mios-gpu-passthrough now recognizes the WSL spec naming too
(wsl2-amd.yaml / wsl2-intel.yaml) -- the earlier only-match
for amd.json/amd.yaml meant the helper saw AMD_PRESENT=0
even though the WSL spec was sitting at /run/cdi/wsl2-amd.yaml.
Operator clarification on scope ("iGPU's are ONLY micro-llms"
-> "wire to ollama!! JUST ONLY USES Micro-llms in MiOS stack"):
ollama IS in MIOS_AI_QUADLETS by design. MiOS-stack consumers of
Ollama (mios-daemon -> qwen3:0.6b-cpu, pipe refine/polish ->
qwen2.5-coder:7b, prefilter -> small) only ask for small models;
big-model tags on disk (qwen3-coder:30b, gpt-oss:20b) are parked
for ad-hoc operator use. With NVIDIA + AMD both registered as
CDI devices, Ollama spreads the MiOS-stack small models across
them without contending with the dGPU big-model VRAM. Comment
block in mios-gpu-passthrough reflects the two-step directive.
Live verification after restart of mios-cdi-detect.service:
* status JSON shows nvidia=1, amd=1, intel=0
* drop-ins written to ollama.container.d + mios-open-webui.
container.d with AddDevice=amd.com/gpu=all
* ollama systemd ExecStart now reads
`--device nvidia.com/gpu=all --device amd.com/gpu=all`
Day-0 deployable: all in /usr/libexec/mios/ + /usr/lib/systemd/,
both in repo; fresh clone + image build wires automatically.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1f765ea commit b7e06ff
2 files changed
Lines changed: 126 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
| |||
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
49 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
50 | 91 | | |
51 | 92 | | |
52 | 93 | | |
| |||
118 | 159 | | |
119 | 160 | | |
120 | 161 | | |
121 | | - | |
| 162 | + | |
| 163 | + | |
122 | 164 | | |
123 | 165 | | |
124 | | - | |
125 | | - | |
126 | 166 | | |
127 | 167 | | |
128 | 168 | | |
| |||
132 | 172 | | |
133 | 173 | | |
134 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
135 | 204 | | |
136 | 205 | | |
137 | 206 | | |
| |||
142 | 211 | | |
143 | 212 | | |
144 | 213 | | |
145 | | - | |
| 214 | + | |
146 | 215 | | |
147 | 216 | | |
148 | 217 | | |
| |||
158 | 227 | | |
159 | 228 | | |
160 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
161 | 252 | | |
162 | 253 | | |
163 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
27 | 41 | | |
28 | 42 | | |
29 | 43 | | |
| |||
75 | 89 | | |
76 | 90 | | |
77 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
78 | 96 | | |
79 | 97 | | |
80 | 98 | | |
81 | 99 | | |
82 | 100 | | |
83 | | - | |
84 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
85 | 111 | | |
86 | 112 | | |
87 | 113 | | |
| |||
0 commit comments