Skip to content

docs(kueue): add how-to for managing Ascend NPU quota with Kueue - #233

Merged
luohua13 merged 4 commits into
masterfrom
kueue-npu
May 24, 2026
Merged

luohua13 merged 4 commits into
masterfrom
kueue-npu

Conversation

@luohua13

@luohua13 luohua13 commented May 24, 2026

Copy link
Copy Markdown
Contributor

Documents the end-to-end flow for governing huawei.com/Ascend910 (and similar) device-plugin resources with ClusterQueue / ResourceFlavor / LocalQueue, including the NPU-Operator node labels to select, a sample batch/Job manifest, the expected admission states, and the gotcha that nominalQuota must stay within node Allocatable.

Summary by CodeRabbit

Release Notes

  • Documentation
    • Added comprehensive guide for managing Ascend NPU quotas with Kueue. Documentation covers the complete configuration workflow for ResourceFlavor, ClusterQueue, and LocalQueue setup, includes sample commands and practical Job examples, and demonstrates quota admission behavior, quota reservation, and workload suspension handling.

Review Change Stack

Documents the end-to-end flow for governing huawei.com/Ascend910 (and
similar) device-plugin resources with ClusterQueue / ResourceFlavor /
LocalQueue, including the NPU-Operator node labels to select, a sample
batch/Job manifest, the expected admission states, and the gotcha that
nominalQuota must stay within node Allocatable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@luohua13, we couldn't start this review because you've used your available PR reviews for now.

Your plan currently allows 1 review/hour. Refill in 46 minutes and 45 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

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

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 13411248-c400-4930-af28-bdce714cf1ad

📥 Commits

Reviewing files that changed from the base of the PR and between 02e4d4c and b814bb2.

📒 Files selected for processing (1)
  • docs/en/kueue/how_to/npu_quota.mdx

Walkthrough

This PR adds documentation for managing Ascend NPU quotas with Kueue. It provides a complete workflow guide: identifying NPU node labels, creating ResourceFlavor and ClusterQueue manifests with quota settings, submitting jobs with queue labels, observing quota admission behavior through concrete kubectl output examples, and reference notes for production use.

Changes

NPU Quota Management Guide

Layer / File(s) Summary
Introduction and prerequisites
docs/en/kueue/how_to/npu_quota.mdx
Page introduction maps Ascend device-plugin resources to Kueue quota model; prerequisites list Kueue, NPU Operator, and cluster setup requirements.
NPU resource configuration workflow
docs/en/kueue/how_to/npu_quota.mdx
Step 1 identifies NPU node labels via a reference table; Step 2 provides YAML for ResourceFlavor, ClusterQueue (nominalQuota, coveredResources), and LocalQueue with inline field explanations; apply instruction completes setup.
Job submission and quota validation
docs/en/kueue/how_to/npu_quota.mdx
Step 3 submits NPU Jobs with queue routing and suspend flags; Step 4 shows kubectl/jq output examples of admitted workloads vs. suspended workloads with QuotaReserved condition, and automatic re-admission flow.
Configuration reference and guidance
docs/en/kueue/how_to/npu_quota.mdx
Notes explain nominalQuota enforcement semantics, guidance for other Ascend resource names, and that existing Kueue features work with NPU resources without modification.

🎯 1 (Trivial) | ⏱️ ~3 minutes

A guide hops through the quota maze, 🐰
ResourceFlavors, ClusterQueues ablaze,
Ascend NPUs now have their place,
In Kueue's fair quota grace!
With suspend and admit, the scheduler plays.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding documentation for managing Ascend NPU quota with Kueue, which matches the single file added and the PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kueue-npu

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 and usage tips.

@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: 1

🤖 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 `@docs/en/kueue/how_to/npu_quota.mdx`:
- Around line 160-163: The docs show a kubectl command that pipes output to jq
but don't mention jq as a prerequisite; update the section around the kubectl
command `kubectl -n team-ascend get workload job-ascend-train-2-yyyyy -o
jsonpath='{.status.conditions}' | jq` to either (a) add a short prerequisite
bullet stating that jq is required (include a one-line install hint), or (b)
provide a no-jq alternative using only kubectl jsonpath output (showing the
equivalent kubectl-only invocation and brief note about its different
formatting). Ensure the text references the `-o jsonpath='{.status.conditions}'`
usage so readers know which variant applies.
🪄 Autofix (Beta)

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 00b7935b-c36a-44cb-8e2d-218c4027a468

📥 Commits

Reviewing files that changed from the base of the PR and between 6a3d0a2 and 02e4d4c.

📒 Files selected for processing (1)
  • docs/en/kueue/how_to/npu_quota.mdx

Comment thread docs/en/kueue/how_to/npu_quota.mdx
luohua13 and others added 2 commits May 24, 2026 07:58
The NPU Operator is a cluster-level plugin, not something installed on
the Ascend nodes themselves. What surfaces huawei.com/Ascend910 on
those nodes are the Driver, Ascend Device Plugin and Ascend Docker
Runtime sub-components, which the operator's deployment form enables
by default.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Both prerequisite bullets reference cluster-plugin identifiers shown
in the Marketplace UI; matches the convention already used in
install.mdx and gang_scheduling.mdx.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 24, 2026

Copy link
Copy Markdown

Deploying alauda-ai with  Cloudflare Pages  Cloudflare Pages

Latest commit: b814bb2
Status: ✅  Deploy successful!
Preview URL: https://41ad2f68.alauda-ai.pages.dev
Branch Preview URL: https://kueue-npu.alauda-ai.pages.dev

View logs

Use kubectl -o yaml so the example works with a stock kubectl
installation. Addresses review feedback on #233.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@luohua13
luohua13 merged commit c766bc1 into master May 24, 2026
3 checks passed
@luohua13
luohua13 deleted the kueue-npu branch May 24, 2026 08:53
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