You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1cb13f8
Browse filesBrowse the repository at this point in the historyBrowse files
Every CI job ran on ubuntu-latest, so nothing exercised the macOS code
paths. Building on an M2 surfaced a lint failure, an example that had
drifted, and a memory field that was never populated.
- kfd: `ComputeNode` and the non-Linux `nodes()` stub are only reachable
from the Linux-gated `drm::detect`, so the lib target — built without
`cfg(test)`, where the only caller lives — failed `-D warnings` on
macOS.
- metal: report used/free on Apple Silicon from `vm_stat`, counting
active + wired + compressor pages, the figure Activity Monitor labels
"Memory Used". Unified memory means system-wide usage is the GPU's
usage; a discrete card on an Intel Mac reported its own VRAM and is
left untouched. Read lazily, so such a Mac spawns no subprocess.
- metal: map M5 to apple10, per Apple's Metal Feature Set Tables
(May 21, 2026). Apple documents these per series, so one row covers
M5, M5 Pro and M5 Max, as `1 => 7` already does for M1.
- watch: print `vulkan_host()`, missing since the probe landed in #17.
- ci: add a macos-latest job. The Linux jobs structurally cannot cover
these paths — the modules are cfg'd per target, so code that is dead
or broken only on macOS still compiles clean on ubuntu.
Verified on an M2 MacBook Air (macOS 26.5): detects Apple M2 / apple8 /
8.0 GiB, with used/free matching an independent vm_stat calculation.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
<sup>†</sup> Intel Macs only — discrete and integrated GPUs are read from `system_profiler`.
18
18
@@ -245,7 +245,8 @@ three.
245
245
246
246
## Notes
247
247
248
-
-`total_bytes` is dedicated VRAM on discrete GPUs. On integrated/unified GPUs (Intel iGPUs, AMD APUs, Apple Silicon) it's the shared system-memory ceiling, and `free_bytes` / `used_bytes` are usually `None`.
248
+
-`total_bytes` is dedicated VRAM on discrete GPUs. On integrated/unified GPUs (Intel iGPUs, AMD APUs, Apple Silicon) it's the shared system-memory ceiling, and `free_bytes` / `used_bytes` are often `None`.
249
+
- Apple Silicon is an exception: because CPU and GPU share one pool, `free_bytes` / `used_bytes` come from system-wide paging statistics (`vm_stat`), counting active + wired + compressor pages. That is the same figure Activity Monitor reports as "Memory Used", so it reflects the whole machine rather than the GPU alone. Discrete GPUs on Intel Macs report their own VRAM and are left untouched.
249
250
- AMD APUs are a special case: their `mem_info_vram_total` is only a BIOS carveout (512 MiB on a BC-250), so `total_bytes` adds the GTT pool they really allocate from — sized by the kernel's `ttm.pages_limit` — and `free_bytes` / `used_bytes` cover both pools. The result matches Vulkan/RADV to the byte; ROCm reports ~512 MiB less, since KFD publishes only the GTT-backed bank.
250
251
- AMD GPU names come from the KFD ASIC codename (`AMD cyan_skillfish`), falling back to the DRM node (`AMD GPU (card1)`) when KFD reports none.
251
252
-`oneapi_host()` covers the **toolkit**, not the GPU runtime: a host using a distro-packaged Level Zero driver with no toolkit reports `None`, since reading that runtime's version needs linking rather than a file read. Not yet verified against a real install.
0 commit comments