CI / test (push) Successful in 1m37s
NVML is the only source of NVLink topology, and that topology is what keeps a tensor-parallel group off the slow path inside a node. It needs cgo, so it sits behind the nvml tag and the default build keeps using nvidia-smi. Discover() picks the backend and falls back to nvidia-smi when NVML fails, logging the fallback rather than performing it silently: on a node that is meant to have working NVML, a quiet downgrade hides a broken driver installation and costs the scheduler its topology. CI now compiles the tagged build. That immediately paid for itself: ErrNoNVML was declared only in the untagged file, so the tests did not compile under -tags nvml. It is now declared where both builds can see it. Not verified: the NVML path has never run against a driver, because there is no GPU machine available. The NVLink domains it reports should be treated as unverified until someone runs `llmgw agent inventory` on a real node. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
# Runs on a containerized act_runner (label: ubuntu-latest).
|
|
#
|
|
# The runner needs outbound access to the Docker registry for its job image and
|
|
# to github.com for the actions below. If GitHub is unreachable from the runner,
|
|
# replace the checkout step with a plain `git clone` and install Go by hand —
|
|
# see .gitea/workflows/README.md in maas-proxmox for that pattern.
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
# Lets a queued or failed run be retried from the UI without a new commit.
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
# Track the toolchain in go.mod rather than pinning it twice.
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- name: Check formatting
|
|
run: |
|
|
out=$(gofmt -l .)
|
|
if [ -n "$out" ]; then echo "gofmt needed on:"; echo "$out"; exit 1; fi
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|
|
|
|
- name: Test with the race detector
|
|
run: go test -race ./...
|
|
|
|
- name: Build
|
|
run: go build ./...
|
|
|
|
# The NVML backend needs cgo and cannot run without a driver, but it must
|
|
# at least keep compiling: it is the only source of NVLink topology and a
|
|
# break would otherwise surface on a GPU node, far from here.
|
|
- name: Build the NVML backend
|
|
env:
|
|
CGO_ENABLED: "1"
|
|
run: go build -tags nvml ./...
|