Repository navigation
Linux AMD support (#135) with NVIDIA kept as the auto default - #136
Merged
Merged
Conversation
…D support On a host with nvidia-smi and a supported AMD GPU, auto refused to start. That covers Phoenix laptops with an RTX dGPU and Ryzen 8000G desktops with a GeForce card, where an installed unit has no --gpu-backend, so berthd would stop starting after an upgrade. Auto now picks NVIDIA as it did before AMD support and scans for AMD only without nvidia-smi. The guarded broker tests read the host's sysfs through the VFIO fallback, so they failed on a machine whose card was bound to vfio-pci. They now use an empty sysfs root, as the VFIO tests do.
9 tasks done
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.
This carries #135 from @jenerestain unchanged (its commits and authorship are kept) and adds one commit on top.
What the extra commit changes
--gpu-backend autorefused to start when it found bothnvidia-smiand a supported AMD GPU. Every installedberthdunit runs with auto, so NVIDIA users on a Phoenix laptop with an RTX dGPU, or a Ryzen 8000G desktop with a GeForce card, would lose berthd after upgrading. Auto now keeps NVIDIA whenevernvidia-smiis installed, which is how it behaved before AMD support. It only scans for AMD whennvidia-smiis missing. To govern the AMD card on a host with both vendors, pass--gpu-backend amd.vfio-pci, a stale read was treated as passthrough andTestGuardedStaleSuccessCannotFreeLeasefailed every time. The tests now use an empty sysfs root, as the VFIO tests do.Review of #135
NVIDIA behavior is unchanged apart from backend selection: every new check is gated on
Snapshot.GuardedorSnapshot.APU, which only the AMD probe sets, and NVIDIA probes leaveProc.Startat 0, so the new PID identity check does not run for them.Proof
go build ./..., gofmt,go vet ./...,go test -count=1 ./...GOOS=windows go build ./...andgo vet ./...go test -race -count=3on gpu, broker, cli and serverOpenand passes with the fix.Not proven here: a live AMD run (no AMD card on this host), and a live NVIDIA run, because the card was in a VM during the review.