Architecture#
AIM Engine is a Kubernetes operator that orchestrates the full lifecycle of AI inference workloads on AMD GPUs. It bridges the gap between model artifacts and production-ready inference endpoints by coordinating several Kubernetes-native components.
High-level architecture#
AIM Engine has two cooperating flows that meet at the AIMProfile: onboarding turns models into deployable profiles, and serving turns a profile into a running endpoint. Throughout these diagrams, colour denotes the kind of resource — blue for user-applied, red for operator controllers, green for operator-managed, grey for infrastructure.
Onboarding: from models to profiles#
Official models (via discovery), profile sets (via derivation), and hand-authored profiles all converge on a deployable AIMProfile.
Serving: from profile to endpoint#
An AIMService resolves one of those profiles, and the Service controller creates the cache, InferenceService, and route that back a running endpoint.
CRDs and their roles#
v1alpha2 is the current API. v1alpha1 resources remain supported during the deprecation window — see Legacy v1alpha1.
CRD |
Scope |
Role |
|---|---|---|
|
Namespace |
Deploys an inference endpoint by resolving a profile and creating a KServe InferenceService. |
|
Namespace / Cluster |
Onboards a model — three flows (official, fine-tuned, custom). Produces profiles. |
|
Namespace / Cluster |
Self-contained runtime configuration (image, accelerator, engine args, model sources). The unit a service resolves to. |
|
Namespace / Cluster |
Derives profiles by selector + overrides. Usually synthesised by |
|
Namespace |
Pre-warms a profile’s |
|
Namespace |
Manages a single model artifact download to a PVC. |
|
Cluster |
Auto-discovers AIM models from a container registry. |
|
Namespace / Cluster |
Storage defaults, routing defaults, environment defaults. |
Three model flows#
Every AIMModel resolves to one of three flows, selected by which spec field is set. The full mechanics live in AIM Models:
Flow |
Spec |
Source of profiles |
|---|---|---|
Official |
|
Image discovery — profile YAMLs inside the container |
Fine-tuned |
|
A previously-applied official AIMModel |
Custom |
|
A previously-applied base-image AIMModel |
CRD validation enforces “exactly one of spec.image or spec.profiles” — neither can be set, both cannot be set.
Service resolution#
When you apply an AIMService, the controller reaches a single AIMProfile through one of five resolution shapes:
The image shape requires the aim.eai.amd.com/reconciler-pipeline: profile annotation during the migration window — see Migration window. See Services for the canonical resolution table and mechanics.
Cluster vs namespace scope#
Several CRDs have both a namespace-scoped and a cluster-scoped variant.
Namespace |
Cluster |
Purpose |
|---|---|---|
|
|
Model definitions |
|
|
Runtime configurations |
|
|
Profile derivation |
|
|
Storage, routing, environment defaults |
Cluster-scoped resources are shared across all namespaces. Platform admins create them to provide a model catalog and validated runtime profiles.
Namespace-scoped resources are visible only within their namespace. Teams create them for custom models or per-project overrides.
Resolution order#
When an AIMService needs a model or profile, AIM Engine resolves it in this order:
Namespace — look for the resource in the service’s namespace.
Cluster — fall back to the cluster-scoped variant.
Namespace wins. The resolved scope is recorded in status.resolvedModel.scope and status.resolvedProfile.scope.
RuntimeConfig is special: if both namespace and cluster configs exist, they’re merged rather than one replacing the other. Namespace values override cluster values for any fields set in both.
Reconciliation pipeline#
Every AIM controller follows the same pipeline:
Each step is idempotent: the operator converges toward the desired state on every reconciliation, handling partial failures and eventual consistency gracefully.
Integration points#
Component |
Role |
|---|---|
KServe |
Underlying model serving runtime. AIM Engine creates and manages |
Gateway API |
HTTP routing. When routing is enabled, AIM Engine creates |
Persistent Volumes |
Back the caching system. |
AMD GPUs + NFD |
Detected via node labels ( |
Where to read next#
Quickstart — Deploy a service in minutes
AIM Models — Three model flows in detail
Services — Resolution shapes, overlays, caching
Profiles — Self-contained runtime configurations
AIM Profile Sets — Derivation engine