Repository navigation
install: detect AMD GPUs (amdgpu, ROCm, GTT) with regression fixtures - #153
Merged
Merged
Conversation
lib.sh: when nvidia-smi sees no GPU, hw_gpu/hw_driver/hw_vram/hw_summary read the first amdgpu card (sysfs) and rocminfo (marketing name, gfx target), hw_rocm the ROCm version, hw_gtt/hw_gtt_used the GTT pool an APU's GPU maps. hw_match gains optional hardware.min_rocm, hardware.gfx and hardware.min_gtt_gib. The NVIDIA and macOS paths are unchanged. doctor.sh: the free-memory warning reads hardware.min_free_gib (default 88, as before) and, on AMD, shows GTT in use and AMD-side hints; a deploy.service of "systemd-transient" (systemd-run --user) is checked by is-active instead of a unit file.
…he CPU tools/install/test_amd.sh runs lib.sh's detection against four recorded hosts in tests/fixtures/amd (a sysfs tree, rocminfo output, ROCm's version file and nvidia-smi answers; no GPU needed): - strix-halo: Radeon 8060S (gfx1151) APU, 96 GiB GTT, a 4 GiB carve-out that is not VRAM, connector entries (card1-DP-1) beside the card - discrete: an Intel CPU and iGPU beside a Radeon RX 7900 XTX with real VRAM - nvidia: an NVIDIA GPU and an AMD card on one box; the NVIDIA path wins and says what it said before AMD detection existed (checked against main's lib.sh) - none: no GPU The fixtures caught one bug: amd_name took the first rocminfo Marketing Name that was not an AMD CPU, so an Intel CPU agent named the GPU. It now takes the first agent whose Device Type is GPU. LR_SYSFS (default /sys) points the sysfs reads at a fixture. CI runs the script.
This was referenced Nov 16, 2026
smfworks
added a commit
to smfworks/localrouter
that referenced
this pull request
Nov 17, 2026
# Conflicts: # .github/workflows/ci.yml
smfworks
added a commit
to smfworks/localrouter
that referenced
this pull request
Nov 17, 2026
smfworks
added a commit
to smfworks/localrouter
that referenced
this pull request
Nov 17, 2026
# Conflicts: # .github/workflows/ci.yml
smfworks
added a commit
to smfworks/localrouter
that referenced
this pull request
Nov 17, 2026
smfworks
added a commit
to smfworks/localrouter
that referenced
this pull request
Nov 17, 2026
# Conflicts: # .github/workflows/ci.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of 5 (split from #152).
Split from #152 as suggested. The installer and doctor detect AMD GPUs (amdgpu sysfs, ROCm version, GTT pool) next to the existing NVIDIA path; hosts without an AMD GPU take the same path as before.
tools/install/test_amd.sh: 27 checks against recorded hosts intests/fixtures/amd/{strix-halo,discrete,nvidia,none}(sysfs trees, rocminfo, nvidia-smi and nvcc output;LR_SYSFSpoints lib.sh at a fixture). The NVIDIA checks also pass against main's lib.sh.amd_namereturned the first rocminfo agent, which is the CPU on an APU. It now takes the first agent whose Device Type is GPU.test_amd.sh.Checks run locally:
zig build test,zig build test-unit(26/26), test_amd 27/27,bash -n/jq empty/ bootstrap--dry-runon every profile,git diff --check.