Skip to content

docs(skills): add GPU vendor toolkit interface spec - #971

Open
kubestellar-hive[bot] wants to merge 2 commits into
mainfrom
arch/gpu-toolkit-interface-spec-963
Open

docs(skills): add GPU vendor toolkit interface spec#971
kubestellar-hive[bot] wants to merge 2 commits into
mainfrom
arch/gpu-toolkit-interface-spec-963

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Architecture artifact

Defines the vendor-agnostic GPU toolkit interface that any GPU vendor integration must satisfy before merging into common. This directly addresses the fragmentation risk identified in #963.

Context

A feature request (common#277) asks for AMD Container Toolkit support. If AMD is added by copying the NVIDIA pattern ad-hoc, the result is two independent paths for kargs, CDI, runtime hooks, and Flatpak GL — one per vendor. Each future GPU vendor adds a third path.

What this adds

docs/skills/gpu-toolkit-interface.md — the vendor-agnostic interface that NVIDIA currently implements and AMD must implement before merging:

# Capability NVIDIA (reference) AMD (gap)
1 Kernel args kargs.d/00-nvidia.toml documented
2 CDI spec generation nvidia-cdi-refresh.{service,path} amd-cdi-refresh.* needed
3 Runtime toolkit nvidia-container-toolkit-base amdgpu-ctk base
4 Flatpak GL extension ublue-nvidia-flatpak-runtime-sync evaluate for AMD
5 First-boot hook preset-enabled service if needed
6 SELinux policy tracked (non-blocking) tracked

A PR checklist is included so AMD PR reviewers have a clear gate.

The document also specifies the directory layout convention (system_files/amd/) and the pattern for adding a third vendor (Intel Arc, etc.).

Addresses #963


Filed by architect agent (ACMM L5)

— hive: agent=architect backend=copilot model=claude-opus-5 copilot=1.0.59

@kubestellar-hive
kubestellar-hive Bot requested review from a team and repires as code owners August 8, 2026 22:51

@castrojo castrojo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — the six-capability interface and the AMD PR gate checklist directly implement the recommendation in #963, and the concept is right. Two blocking issues:

1. CI is red (pre-commit). validate / Run pre-commit fails: docs/skills/gpu-toolkit-interface.md description is 278 chars (max 256). Shorten the front-matter description: to ≤256 chars.

2. The "NVIDIA reference implementation" claims don't match this repo. The doc gates future AMD PRs against the NVIDIA layout, so it must be accurate:

  • kargs.d/00-nvidia.toml — does not exist anywhere in the projectbluefin org under that name.
  • nvidia-cdi-refresh.{service,path} and 80-nvidia-container-toolkit.presetnot in system_files/nvidia/ here. system_files/nvidia/ in common ships only ublue-nvidia-flatpak-runtime-sync and its .service (no system-preset/ dir at all). The cdi-refresh units and preset live in bluefin-lts (system_files_overrides/nvidia/usr/lib/systemd/system-preset/80-nvidia-container-toolkit.preset) and dakota (elements/bluefin-nvidia/nvidia-container-toolkit-preset.bst).
  • The directory-layout diagram showing "CDI refresh service + path" under system_files/nvidia/usr/lib/systemd/system/ is therefore wrong for common.
  • Link docs/skills/oem-hardware-hooks.md is a 404 — actual path is docs/skills/oem-hardware-hooks/SKILL.md.

Note docs/skills/nvidia/references/architecture.md makes some of the same claims, so this may have been inherited — but the new spec should describe where the reference implementation actually lives per repo (common vs bluefin build scripts vs bluefin-lts overrides vs dakota .bst elements), not assert files that aren't in the tree.

architect and others added 2 commits August 8, 2026 23:22
Defines the six-capability interface that any GPU vendor integration must
satisfy before merging into common. NVIDIA currently implements the
reference; AMD (common#277) must satisfy this interface first.

## The six capabilities

1. Kernel argument management (kargs.d/ declarative, no runtime mutation)
2. CDI spec generation (service + path unit + 80-series preset)
3. Container runtime toolkit (base package only, rootless config)
4. Flatpak GPU extension management (driver-version-matched, idempotent)
5. First-boot hook pair (check + sync, idempotent)
6. SELinux policy (tracked but non-blocking for initial merge)

## Why this matters

Without an interface definition, AMD support will duplicate the NVIDIA
path ad-hoc, creating two independently maintained parallel paths for
kargs, CDI, runtime hooks, and Flatpak GL. Every future GPU vendor adds
a third path. With this interface, vendor layers are specializations of
a shared contract — review, testing, and onboarding scale linearly.

## Gating

A PR checklist is included. AMD PR reviewers check six items; if any are
missing, the AMD PR is not ready. The directory layout convention
(system_files/amd/) is specified.

Addresses common#963

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Trim gpu-toolkit-interface front-matter description to <=256 chars
  (CI validate limit)
- Correct NVIDIA reference implementation pointers: kargs.d/00-nvidia.toml,
  nvidia-cdi-refresh units, and 80-nvidia-container-toolkit.preset live in
  the downstream NVIDIA layers of bluefin-lts and dakota, not in common.
  Common's system_files/nvidia/ carries only the Flatpak runtime sync.
- Use allowed front-matter category 'meta' (schema: ci-ops|test-authoring|meta)
- Add skill link to docs/SKILL.md and regenerate index.json/index.md

Assisted-by: Kimi K3 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@castrojo
castrojo force-pushed the arch/gpu-toolkit-interface-spec-963 branch from 6e22a4a to 0f84e7b Compare August 9, 2026 03:23
@castrojo

castrojo commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review findings addressed in 0f84e7b (rebased onto latest main, conflict in docs/SKILL.md resolved):

  1. Front-matter description trimmed to 240 chars (CI limit is 256) — validate now passes.
  2. NVIDIA reference paths corrected: kargs.d/00-nvidia.toml, nvidia-cdi-refresh.service/.path, and 80-nvidia-container-toolkit.preset are now explicitly attributed to the downstream NVIDIA layers of bluefin-lts and dakota — they do not exist in common. Common's system_files/nvidia/ (Flatpak runtime sync service + script only) is documented as-is in the directory layout section, with a note on the cross-repo split.

Also fixed during rebase: category changed to meta (schema only allows ci-ops/test-authoring/meta), skill linked from docs/SKILL.md, and index.json/index.md regenerated (41 skills). just check and pre-commit run --all-files are clean locally; Validate PR is green.

@castrojo
castrojo enabled auto-merge August 9, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant