Skip to content

blog/tutorials: Add KAI Scheduler + HAMi core blog and Lab 12 for KAI Scheduler and HAMi memory isolation on GKE - #768

Merged
hami-robot[bot] merged 7 commits into
Project-HAMi:masterfrom
rootsongjc:blog/kai-scheduler-hami
Aug 13, 2026
Merged

blog/tutorials: Add KAI Scheduler + HAMi core blog and Lab 12 for KAI Scheduler and HAMi memory isolation on GKE#768
hami-robot[bot] merged 7 commits into
Project-HAMi:masterfrom
rootsongjc:blog/kai-scheduler-hami

Conversation

@rootsongjc

@rootsongjc rootsongjc commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

/kind documentation

What this PR does / why we need it:

Add a bilingual blog post on KAI Scheduler and HAMi GPU memory hard isolation, along with a new lab tutorial for verifying these features on GKE. The changes include new YAML configurations, updated documentation, and example code to demonstrate GPU memory isolation. @archlitchi

Checklist:

  • npm run lint and npm run format:check pass
  • npm run build succeeds for both en and zh
  • Chinese translation updated if English docs changed (or noted why not)
  • Commits are signed off (git commit -s)

Summary by CodeRabbit

  • New Features
    • Added Lab 12, an advanced GKE tutorial for sharing NVIDIA GPUs with enforced per-workload memory limits.
    • Added runnable Kubernetes manifests and CUDA validation examples for scheduling, device setup, and memory-isolation testing.
    • Added English and Chinese articles documenting deployment, verification, monitoring, troubleshooting, and compatibility considerations.
    • Added tutorial navigation and tags for GKE, GPU sharing, HAMi-core, and KAI Scheduler.
    • Added the Jimmy Song author profile in English and Chinese documentation.

Bilingual (en/zh) post on KAI Scheduler v0.17.0 + kai-resource-isolator
CUDA-level memory isolation.

Signed-off-by: Jimmy Song <jimmy@dynamia.ai>
…on on GKE

- Introduced Lab 12: Verify KAI Scheduler and HAMi Memory Isolation on GKE, detailing deployment and memory quota validation.
- Updated overview.md to include Lab 12 in the tutorial summary.
- Added new YAML files for queue configuration, runtime class, and GKE policies to support the lab.
- Created shared Pods and memory limit CUDA example to demonstrate GPU memory isolation.
- Enhanced tags.yml with new tags for GKE and GPU sharing.
- Updated sidebars to include the new lab for navigation.

Signed-off-by: Jimmy Song <jimmy@dynamia.ai>
@hami-robot

hami-robot Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@rootsongjc: The label(s) kind/docs cannot be applied, because the repository doesn't have them.

Details

In response to this:

/kind docs

What this PR does / why we need it:

Add a bilingual blog post on KAI Scheduler and HAMi GPU memory hard isolation, along with a new lab tutorial for verifying these features on GKE. The changes include new YAML configurations, updated documentation, and example code to demonstrate GPU memory isolation. @archlitchi

Which issue(s) this PR fixes:

Fixes #

Checklist:

  • npm run lint and npm run format:check pass
  • npm run build succeeds for both en and zh
  • Chinese translation updated if English docs changed (or noted why not)
  • Commits are signed off (git commit -s)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploy Preview for project-hami ready!

Name Link
🔨 Latest commit 94a667f
🔍 Latest deploy log https://app.netlify.com/projects/project-hami/deploys/6a7d479f76a16f000891b403
😎 Deploy Preview https://deploy-preview-768--project-hami.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@hami-robot hami-robot Bot added the size/XXL label Aug 12, 2026
@rootsongjc rootsongjc added the kind/documentation Improvements or additions to documentation label Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@rootsongjc, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 76 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f8af131-de86-4c45-9099-722fc2a0b62b

📥 Commits

Reviewing files that changed from the base of the PR and between 58a719a and 94a667f.

📒 Files selected for processing (5)
  • blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md
  • i18n/zh/docusaurus-plugin-content-blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md
  • i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami-gke.md
  • tutorials/labs/examples/12-kai-scheduler-hami-gke/memory-limit.cu
  • tutorials/labs/kai-scheduler-hami-gke.md
📝 Walkthrough

Walkthrough

This PR adds English and Chinese documentation for KAI Scheduler and HAMi-core GPU memory isolation on GKE. It adds Lab 12, Kubernetes resources, Kyverno policies, a CUDA validation program, blog content, author records, tags, and navigation entries.

Changes

KAI Scheduler GKE GPU isolation

Layer / File(s) Summary
GKE and runtime installation
tutorials/labs/kai-scheduler-hami-gke.md, i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/...
Documents GKE setup, GPU labels, KAI Scheduler installation, isolator configuration, COS paths, CDI, RuntimeClass, and Kyverno integration.
Runtime resources and CUDA test
tutorials/labs/examples/12-kai-scheduler-hami-gke/*
Adds the nvidia RuntimeClass, Kyverno policies, two shared GPU Pods, and a CUDA program that validates quota-bound allocations.
Isolation validation and cleanup
tutorials/labs/kai-scheduler-hami-gke.md, i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/..., blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md, i18n/zh/docusaurus-plugin-content-blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md
Adds shared-GPU checks, CUDA OOM validation, concurrent isolation checks, monitor queries, troubleshooting, cleanup, evidence tables, and architecture documentation.
Tutorial and site integration
blog/authors.yml, i18n/zh/docusaurus-plugin-content-blog/authors.yml, sidebars-tutorials.js, tutorials/overview.md, i18n/zh/docusaurus-plugin-content-docs-tutorials/current/{overview.md,tags.yml}
Registers the author, Lab 12 overview entries, tutorial tags, and sidebar navigation.

Estimated code review effort: 4 (Complex) | ~45 minutes

Mergeability Score: 🟡 Moderate · up to 58a71

The PR adds a GKE tutorial and examples for verifying scheduler and GPU memory-isolation behavior, but the documented procedure can run before required admission components are ready and may report success without confirming injection or the expected CUDA out-of-memory result. Merge should wait for these validation safeguards to be added or explicitly accepted by the owner.

Sequence Diagram(s)

sequenceDiagram
  participant KAI Scheduler
  participant kai-resource-isolator
  participant CUDA Pod
  participant HAMi-core
  participant Monitor
  KAI Scheduler->>kai-resource-isolator: Set GPU memory quota
  kai-resource-isolator->>CUDA Pod: Inject preload library and device paths
  CUDA Pod->>HAMi-core: Submit CUDA allocation
  HAMi-core->>CUDA Pod: Allow or reject allocation
  CUDA Pod->>Monitor: Expose memory limit and usage
Loading

Possibly related issues

Possibly related PRs

Suggested reviewers: mesutoezdil, wawa0210

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: bilingual KAI Scheduler and HAMi documentation, a blog, and Lab 12 for GKE GPU memory isolation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md`:
- Line 17: Correct English hyphenation throughout the article, including the
referenced locations: use “so-called,” “open-source,” “GPU-related,”
“NUMA-aware,” “HAMi-compatible,” and “self-built” wherever applicable.
- Around line 105-118: The diagrams in
blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md:105-118 and
i18n/zh/docusaurus-plugin-content-blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md:97-110
incorrectly assign responsibilities: update both diagrams so libsync
provides/distributes libvgpu.so, while the kai-resource-isolator mutating
webhook injects the hostPath and ld.so.preload into the Pod; keep the rest of
the flow unchanged.
- Around line 1-4: Rename the source directory
blog/kai-scheduler-hami-gpu-memory-hard-isolation to
blog/2026-08-11-kai-scheduler-hami-gpu-memory-hard-isolation, and rename the
Chinese mirror directory
i18n/zh/docusaurus-plugin-content-blog/kai-scheduler-hami-gpu-memory-hard-isolation
to the same dated directory name so both posts share one dated path.

In
`@i18n/zh/docusaurus-plugin-content-blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md`:
- Line 49: 在文档中更新对应表述:将 KAI Scheduler
段落中的“算好的显存配额”替换为“计算出的显存配额”,并将共享库段落中的“被列在里面的共享库”替换为“列在其中的共享库”。

In `@tutorials/labs/kai-scheduler-hami-gke.md`:
- Around line 147-174: Use KAI v0.17.0’s default queue hierarchy: in
tutorials/labs/kai-scheduler-hami-gke.md (147-174) and
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami-gke.md
(147-174), remove the 01-queues.yaml application and update the documented queue
output to include default-parent-queue and default-queue; remove or otherwise
retire the custom hierarchy in
tutorials/labs/examples/12-kai-scheduler-hami-gke/01-queues.yaml (1-20).
Preserve --set-string for binder.plugins.gpusharing.arguments.cdiEnabled, while
keeping the separate top-level binder.cdiEnabled field boolean.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 478351b6-9146-4e9c-9b25-eb0a3290403d

📥 Commits

Reviewing files that changed from the base of the PR and between cc9cf48 and b39e760.

📒 Files selected for processing (15)
  • blog/authors.yml
  • blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md
  • i18n/zh/docusaurus-plugin-content-blog/authors.yml
  • i18n/zh/docusaurus-plugin-content-blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md
  • i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami-gke.md
  • i18n/zh/docusaurus-plugin-content-docs-tutorials/current/overview.md
  • i18n/zh/docusaurus-plugin-content-docs-tutorials/current/tags.yml
  • sidebars-tutorials.js
  • tutorials/labs/examples/12-kai-scheduler-hami-gke/01-queues.yaml
  • tutorials/labs/examples/12-kai-scheduler-hami-gke/02-runtimeclass.yaml
  • tutorials/labs/examples/12-kai-scheduler-hami-gke/03-gke-policies.yaml
  • tutorials/labs/examples/12-kai-scheduler-hami-gke/04-shared-pods.yaml
  • tutorials/labs/examples/12-kai-scheduler-hami-gke/memory-limit.cu
  • tutorials/labs/kai-scheduler-hami-gke.md
  • tutorials/overview.md

Comment on lines +1 to +4
---
title: "GPU Memory Hard Isolation with KAI Scheduler and HAMi: How It Works and How to Verify It"
date: "2026-08-11"
description: "From the CUDA interception principle to a reproducible verification on GKE: use KAI Scheduler v0.17.0 for shared GPU scheduling and kai-resource-isolator 1.1.0-chart (built on HAMi-core) for CUDA level memory isolation, so two pods on a single NVIDIA T4 each see only their own memory quota. Explains the CUDA_DEVICE_MEMORY_LIMIT contract between the scheduling layer and the isolation layer, plus the node label, queue, and RuntimeClass pitfalls."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use one dated directory for the source post and its Chinese mirror.

  • blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md#L1-L4: rename the source directory to 2026-08-11-kai-scheduler-hami-gpu-memory-hard-isolation.
  • i18n/zh/docusaurus-plugin-content-blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md#L1-L4: mirror the same dated directory name in the Chinese translation.
📍 Affects 2 files
  • blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md#L1-L4 (this comment)
  • i18n/zh/docusaurus-plugin-content-blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md#L1-L4
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md` around lines 1 -
4, Rename the source directory blog/kai-scheduler-hami-gpu-memory-hard-isolation
to blog/2026-08-11-kai-scheduler-hami-gpu-memory-hard-isolation, and rename the
Chinese mirror directory
i18n/zh/docusaurus-plugin-content-blog/kai-scheduler-hami-gpu-memory-hard-isolation
to the same dated directory name so both posts share one dated path.

Source: Coding guidelines

Comment thread blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md Outdated
Comment thread blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md Outdated
Comment thread tutorials/labs/kai-scheduler-hami-gke.md
…ation

Signed-off-by: Jimmy Song <jimmy@dynamia.ai>
…ocumentation

Signed-off-by: Jimmy Song <jimmy@dynamia.ai>
…ified outputs and notes

- Added a note about the output blocks indicating the verification date and environment-specific details.
- Updated GPU node reporting examples with actual node names from the verified run.
- Included relevant `nvidia-smi` output for clarity on GPU memory reporting.
- Enhanced steps with actual command outputs and statuses from the verified installation.
- Clarified the requirements for KAI labels and the expected outputs for various components.
- Documented the successful verification of Pods and their resource allocation results.

Signed-off-by: Jimmy Song <jimmy@dynamia.ai>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md`:
- Around line 161-166: Update both handoff-check commands in
blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md (lines 161-166) and
i18n/zh/docusaurus-plugin-content-blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md
(lines 161-166) to assert that CUDA_DEVICE_MEMORY_LIMIT is set and
/usr/local/vgpu/libvgpu.so exists before invoking nvidia-smi; keep the existing
output checks intact.
- Line 227: Update
tutorials/labs/examples/12-kai-scheduler-hami-gke/memory-limit.cu so the second
cudaMalloc succeeds only when it returns cudaErrorMemoryAllocation, rejecting
all other errors. Keep the English result claim in
blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md:227 and the
corresponding Chinese claim in
i18n/zh/docusaurus-plugin-content-blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md:227
aligned with this validation outcome; no direct documentation change is needed
unless the claims no longer match.

In
`@i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami-gke.md`:
- Around line 245-258: Update the commands in
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami-gke.md
at lines 245-258 to wait for the kai-resource-isolator webhook Deployment to
become ready before creating validation Pods; after applying the Kyverno
policies, add readiness checks for both ClusterPolicy resources to reach
READY=true at lines 282-285.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b6f9b3a6-ea90-4917-93a4-c9f3c0a1fda3

📥 Commits

Reviewing files that changed from the base of the PR and between 7a5e983 and 58a719a.

📒 Files selected for processing (4)
  • blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md
  • i18n/zh/docusaurus-plugin-content-blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md
  • i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kai-scheduler-hami-gke.md
  • tutorials/labs/kai-scheduler-hami-gke.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • tutorials/labs/kai-scheduler-hami-gke.md

Comment thread blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md
Comment thread blog/kai-scheduler-hami-gpu-memory-hard-isolation/index.md
…deployment status commands

Signed-off-by: Jimmy Song <jimmy@dynamia.ai>

@archlitchi archlitchi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@hami-robot

hami-robot Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: archlitchi, rootsongjc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hami-robot hami-robot Bot added the approved label Aug 13, 2026
@hami-robot
hami-robot Bot merged commit a8cde95 into Project-HAMi:master Aug 13, 2026
13 checks passed
@rootsongjc
rootsongjc deleted the blog/kai-scheduler-hami branch August 13, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants