Architecture decision records

ADRs record the significant architectural decisions behind GPUlayer: what was decided, why, which alternatives were rejected, and what the decision costs us.

Status values:

  • Accepted (milestone 1): implemented in the current code and covered by tests.
  • Proposed: a direction under evaluation. It is not policy and must not be described as available.
  • Superseded by ADR-XXXX: replaced; kept for history.

Several ADRs are split: the implemented part is accepted and named follow-ups stay proposed. Each ADR says which part is which.

Index

#TitleStatusSummary
0001Control plane and deployment modelAccepted (milestone 1); hosted mode ProposedOne modular-monolith ControlPlane, used embedded (SQLite file) or served over authenticated HTTP.
0002Job contracts and packagingAccepted (milestone 1); container images ProposedVersioned pydantic contracts; code ships as content-addressed source bundles; functions take JSON args, never pickle.
0003Worker protocol and authenticationAccepted (milestone 1); mTLS/OIDC ProposedHTTP+JSON polling; separate client, join, per-worker session and single-use instance tokens; TLS required off loopback.
0004Scheduling and placement policyAccepted (milestone 1)A pure, deterministic, explainable scheduler with gang scheduling, explicit fallback and reservations.
0005GPU capabilities and runtime profilesAccepted (milestone 1); runtime profiles ProposedCapability model, isolated torch probe, explicit support matrix.
0006Apple Metal / MPS boundariesAccepted (milestone 1)MPS supports independent jobs only; unified memory is explicit; distributed MPS is unsupported.
0007Distributed launch and rendezvousAccepted (milestone 1, single host); multi-machine Proposedtorchrun with static rendezvous published by the rank-0 worker; fail-fast; no distributed retry.
0008Storage and artifact managementAccepted (milestone 1); shared DB/object store ProposedSQLite (WAL) metadata plus a local content-addressed artifact store behind interfaces.
0009Security and workload isolationAccepted (milestone 1) for trusted single-team useProcess groups, an env allowlist and secret references with log redaction. This is not a sandbox.
0010Provider adapters and provisioningAccepted (interface + FakeProvider); first real provider ProposedOffers are expressed as capability templates; provisioning flow is tested only against a simulated provider.
0011Cost accounting and retry semanticsAccepted (milestone 1)Estimates and charges are distinct record kinds; delivery is at-least-once; retries are opt-in.
0012Licensing and project governanceProposedCompares Apache-2.0, MIT, MPL-2.0 and AGPL-3.0. Undecided.
0013Website and documentation stackProposedCompares MkDocs-Material, Docusaurus and Astro Starlight. Undecided.
0014PyTorch integration and a training APIAccepted (milestone 2, first slice)The first framework integration: launcher, runtime helpers for devices/DDP/precision, and a small Module + Trainer API; code ships as source.
0015A workload-agnostic GPU layer, with framework integrations on topAccepted (milestone 2)Any command or Python library is a workload; GPUs are usable when their driver is; frameworks are reported and required explicitly.
0017Distribution: install script, Docker images, then packagesAccepted (milestone 2)`curl ... install.sh
0016Speed, parallelism and job distribution as primary goalsAccepted (milestone 2)No fixed sleeps on hot paths (long-poll dispatch and job waits), no per-step device syncs, measured changes, and a roadmap for concurrent tasks per worker and topology-aware placement.

Template

markdown
# ADR-NNNN: Title
- **Status:** Proposed | Accepted (milestone N) | Superseded by ADR-XXXX
- **Date:** YYYY-MM-DD
## Context
The problem, the constraints and the forces involved.
## Decision
What we do. Name the modules that implement it.
## Alternatives considered
Each option and why it was not chosen.
## Consequences and trade-offs
What gets easier, what gets harder, and known gaps.
## Security and operational implications
## Follow-up
Concrete next steps, each with the condition that would change this decision.