HAMi
CLAUDE.md5k starsChanged 24 days agoApache-2.0View on GitHub
AGENTS.md links to this file. HAMi (Heterogeneous AI Computing Virtualization Middleware) is a CNCF incubating project that provides device virtualization for heterogeneous AI accelerators (GPU, NPU, HCU, etc.) in Kubernetes. It enables device sharing, memory/core isolation, and topology-aware scheduling across multiple hardware vendors. Pod submission → MutatingWebhook (injects scheduler name + annotations) → Scheduler extender filter/score (calls Devices.Fit() and Devices.ScoreNode()) → Bind (writes device allocation to pod annotations) → Device plugin Allocate() (reads annotations, sets container env vars) → vGPUmonitor…
Trending
More talk lately.about the whole repository
Who's talking about Project-HAMi/HAMi
- cncf/toc“[Incubation] HAMi Incubation Application”GitHub · Jul 15, 2025 · 13 reactions
- @qdrddr.bsky.social“#GPU #virtualization middleware with #sharing, #isolation and scheduling of heterogeneous accelerators for …”Bluesky · Nov 8, 2026 · 5 likes
- Project-HAMi/HAMi-core“Fix v2.6.0”GitHub · Jul 24, 2025 · 3 reactions
- Project-HAMi/HAMi-core“[Performance] vLLM TP=8 startup remains 3.2x slower with HAMi control after disabling expandable_segments”GitHub · Oct 26, 2026 · 2 reactions
- Project-HAMi/ascend-device-plugin“Discussion: vNPU cleanup policy”GitHub · Jun 3, 2026 · 2 reactions
The biggest 5 of 32 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 32
Talked about on GitHub and Bluesky (32 times).
On GitHub · 31
- Jul 15, 2025[Incubation] HAMi Incubation Application — cncf/toc13 reactions · 14 comments
- Jul 24, 2025Fix v2.6.0 — Project-HAMi/HAMi-core3 reactions · 1 comment
- Oct 26, 2026[Performance] vLLM TP=8 startup remains 3.2x slower with HAMi control after disabling expandable_segments — Project-HAMi/HAMi-core2 reactions · 18 comments
- Jun 3, 2026Discussion: vNPU cleanup policy — Project-HAMi/ascend-device-plugin2 reactions · 7 comments
- Apr 29, 2026Add GPU memory field to sandbox spec for HAMi vGPU sharing — NVIDIA/OpenShell2 reactions · 10 comments
26 more on GitHub
- Jan 26, 2026[Membership] Nominating Shouren for the role of HAMi maintainer — Project-HAMi/community2 reactions · 5 comments
- Jan 8, 2026REQUEST: New Approver for FouoF — Project-HAMi/community2 reactions · 5 comments
- Jul 18, 2025Add nvidia gpu `topology-aware` introduction — Project-HAMi/website2 reactions · 1 comment
- May 23, 2025Fix metrics can't found on v2.5.1 — Project-HAMi/HAMi-core2 reactions
- Feb 17, 2025REQUEST: New membership for shijinye — Project-HAMi/community2 reactions · 3 comments
- Apr 15, 2024[Sandbox] HAMi — cncf/sandbox2 reactions · 27 comments
- Nov 5, 2026CUDA graph capture fails with cuMemPoolGetAttribute error 900 in HAMi v2.10.0 — minimal Warp reproducer — Project-HAMi/HAMi-core1 reaction · 2 comments
- Sep 30, 2026feat(gpu): support HAMi virtual GPUs and clarify allocation vs live usage — srelens/srelens1 reaction · 2 comments
- Sep 21, 2026[Membership] HAMi Membership Request for im-Toqeer-506 — Project-HAMi/community1 reaction · 4 comments
- Sep 18, 2026[Membership] HAMi Membership Request for adity1raut — Project-HAMi/community1 reaction · 2 comments
- Aug 11, 2026docs: document per-Pod device scoring weights — Project-HAMi/website1 reaction · 2 comments
- Jul 13, 2026fix: update hami commit — Project-HAMi/ascend-device-plugin1 reaction · 4 comments
- Jun 2, 2026Support HAMi GPU core and memory allocation in cost calculations — opencost/opencost1 reaction · 2 comments
- May 25, 2026kube-scheduler: RunFilterPluginsWithNominatedPods bypasses Scheduler Extenders during preemption. — kubernetes/kubernetes1 reaction · 5 comments
- Mar 2, 2026Broken links in k8s_universal_addons.json — Qbandev/kaddons1 reaction
- Oct 22, 2025## Code Review — MunyayLLC/https-github.com-joe10832-onchaintestkit1 reaction
- Oct 14, 2025REQUEST: New Approver for Shouren — Project-HAMi/community1 reaction · 7 comments
- Sep 9, 2025position info missing when use plain `[url]` syntax — remarkjs/remark-gfm1 reaction · 10 comments
- Dec 2, 2024docs: Add Chinese README and improve documentation — Project-HAMi/HAMi-core1 reaction · 1 comment
- Aug 21, 2024fix use multi gpu device, sm metric is 0 — Project-HAMi/HAMi-core1 reaction · 1 comment
- Nov 5, 2026docs: add Ascend950DT SKU reference — Project-HAMi/website0 reactions · 8 comments
- Nov 2, 2026docs(labs): add Lab 22 draft for monitoring HAMi with Last9 — Project-HAMi/website0 reactions · 7 comments
- Oct 23, 2026[BUG] HAMi 容器主机 SSH 登录丢失配额,取消 LD_PRELOAD 后可实际超额分配 GPU 显存 — yunionio/cloudpods0 reactions · 1 comment
- Jul 27, 2026[CNCF LFX Proposal] HAMi: Fix GPU Memory Isolation for Child and SSH Processes — cncf/mentoring0 reactions · 13 comments
- Mar 25, 2026feat(adopters): add BoardWare entry and logo asset — Project-HAMi/website0 reactions · 3 comments
- Sep 25, 2025New GPU virtualization sharing solution HAMi — KrutavShah/GPU_Virtualization-Wiki0 reactions
On Bluesky · 1
- Nov 8, 2026#GPU #virtualization middleware with #sharing, #isolation and scheduling of heterogeneous accelerators for #AI workloads on #Kubernetes… — @qdrddr.bsky.social5 likes and reposts
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 71
Import aliases must match hack/.import-aliases (e.g., corev1 for k8s.io/api/core/v1)
- Very specific: line 83
Import grouping: stdlib, then external, then github.com/Project-HAMi/HAMi/...
- Distinctive: line 85
All Go files require Apache 2.0 license header
- Very specific: line 104
Do not hand-edit the block between <!-- BEGIN GENERATED VALUES --> and <!-- END GENERATED VALUES -->.
- Distinctive: line 106
Keep scenario guidance and configuration examples on the website.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to AI coding agents when working with code in this repository. AGENTS.md links to this file.
Project Overview
HAMi (Heterogeneous AI Computing Virtualization Middleware) is a CNCF incubating project that provides device virtualization for heterogeneous AI accelerators (GPU, NPU, HCU, etc.) in Kubernetes. It enables device sharing, memory/core isolation, and topology-aware scheduling across multiple hardware vendors.
Build Commands
make build # Build all binaries (scheduler, vGPUmonitor, nvidia-device-plugin) to bin/
make docker # Build Docker image
make tidy # Run go mod tidy
make test # Run unit tests with coverage (output in _output/coverage/)
make lint # Run golangci-lint (version pinned in hack/verify-staticcheck.sh)
make verify # Run all verification checks (lint, license, import aliases, RBAC permissions)
make bench # Run the benchmarks (CI only checks that they still execute)
make verify_chart # Lint and render the chart, run Trivy, check chart and app versions
make update-helm-chart-docs # Regenerate the values table in charts/hami/README.md (needs helm-docs)
make verify-helm-chart-docs # Check that generated table is current
make local-deploy # Build the image and deploy it to a local minikube/kind clusterRunning a single test
go test ./pkg/scheduler/... -run TestSpecificFunc -short --race -count=1
go test ./pkg/device/nvidia/... -run TestName -short --race -count=1Binary targets (from version.mk)
scheduler— the scheduler extendervGPUmonitor— in-container GPU monitoring daemonnvidia— builds asnvidia-device-plugin(device plugin for NVIDIA GPUs)
Architecture
Three Main Components
- Scheduler Extender (
cmd/scheduler/) — HTTP server that extends kube-scheduler with device-aware filter/score/bind logic. Entry point callsconfig.InitDevices()to register all device backends. - Device Plugin (
cmd/device-plugin/nvidia/) — Implements the Kubernetes device plugin API for NVIDIA GPUs. Registers vGPU resources with the kubelet. - vGPU Monitor (
cmd/vGPUmonitor/) — Runs as a DaemonSet, monitors GPU usage per container, exposes Prometheus metrics, and enforces resource limits.
Core Package Layout
pkg/device/— The device abstraction layer.devices.godefines theDevicesinterface that all hardware backends must implement. Each subdirectory (nvidia/,cambricon/,hygon/,iluvatar/,metax/,mthreads/,ascend/,amd/,enflame/,kunlun/,awsneuron/,vastai/,biren/,remotegpu/) is a concrete implementation.pkg/scheduler/— Scheduler extender logic: node filtering, scoring, webhook handling.config/config.gocontainsInitDevicesWithConfig()which registers all device backends intodevice.DevicesMap.pkg/scheduler/policy/— GPU scheduling policies (binpack,spread,topology-aware,mutex, andnumaas a chained sort key; comma-separated combinations are accepted) and node-level scoring.pkg/util/— Shared utilities including K8s client setup, node locking (annotation-based distributed lock), and leader election.pkg/device-plugin/— NVIDIA device plugin internals (forked/adapted from NVIDIA's k8s-device-plugin).
Key Data Flow
Pod submission → MutatingWebhook (injects scheduler name + annotations) → Scheduler extender filter/score (calls Devices.Fit() and Devices.ScoreNode()) → Bind (writes device allocation to pod annotations) → Device plugin Allocate() (reads annotations, sets container env vars) → vGPUmonitor enforces limits inside container.
Device Registration Pattern
Each device backend provides an Init*Device(config) function returning a device.Devices implementation. All backends are registered in pkg/scheduler/config/config.go:InitDevicesWithConfig() which populates the global device.DevicesMap.
CI Checks (must pass before merge)
- License headers on all
.gofiles (hack/verify-license.sh, usesaddlicense) - Import aliases must match
hack/.import-aliases(e.g.,corev1fork8s.io/api/core/v1) - RBAC permissions: the ClusterRole in the chart must cover the API calls in
pkg/andcmd/(hack/verify-rbac.sh) - golangci-lint with config in
.golangci.yaml(version pinned inhack/verify-staticcheck.sh) goimportswith local prefixgithub.com/Project-HAMi/HAMi- Unit tests with race detector
- DCO: every commit needs a
Signed-off-bytrailer (git commit -s) - Chart docs: the generated values table in
charts/hami/README.mdmust matchcharts/hami/values.yaml(make verify-helm-chart-docs) - Nightly Trivy scan of the built images, plus CodeQL and OpenSSF Scorecard
Conventions
- Go module:
github.com/Project-HAMi/HAMi - Import grouping: stdlib, then external, then
github.com/Project-HAMi/HAMi/...(enforced by goimports local-prefixes) - K8s API import aliases are enforced (see
hack/.import-aliases):corev1,metav1,apierrors, etc. - All Go files require Apache 2.0 license header
- Helm chart lives in
charts/hami/; vendor settings live underdevices.<vendor>invalues.yaml, and values are documented with# -- Descriptioncomments for helm-docs - Image and tool versions are pinned in
version.mk,hack/verify-staticcheck.shand the workflows; HAMi-core is thelibvgpusubmodule - E2E tests use Ginkgo/Gomega (
test/e2e/) - Annotations use the
hami.io/prefix
Documentation changes
Detailed user documentation belongs in the HAMi website repository. For installation, upgrades, configuration, device behavior, operational procedures, troubleshooting, and examples that explain these topics, update the relevant website guide and submit a PR there. Link the website PR from the related HAMi PR when applicable, subject to the user's authorization to publish.
Development and design documents intended for the wider community must be submitted to docs/developers/ in the website repository, not committed to this repository. English-only documentation is acceptable.
Keep README.md, README_cn.md, and README_ja.md focused on the project overview and navigation. Keep the hand-written portion of charts/hami/README.md focused on Chart documentation links. Do not add detailed guides or duplicate website content in these files as part of a feature or bug fix. README edits should be limited to necessary overview corrections, link maintenance, or an explicitly requested README change.
Chart values reference
The complete, generated values table stays in charts/hami/README.md. Keep it up to date when changing Chart values; the documentation guidance above does not prohibit generated updates.
- Edit defaults and parameter descriptions in
charts/hami/values.yaml. - Do not hand-edit the block between
<!-- BEGIN GENERATED VALUES -->and<!-- END GENERATED VALUES -->. - From the repository root, run
make update-helm-chart-docs, thenmake verify-helm-chart-docs. Use these targets rather than invokinghelm-docsdirectly, because the template reads the existing README to preserve its hand-written content. - Keep scenario guidance and configuration examples on the website. Do not copy the full generated values table into the website or maintain translated copies of it.
AI Assistance Disclosure
Per CONTRIBUTING.md, all PRs using AI assistance must disclose it in the PR description.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

