Skip to content

[GREP] scheduler plugin - KAI scheduler#553

Open
daisy-ycguo wants to merge 1 commit into
ai-dynamo:mainfrom
daisy-ycguo:grep
Open

[GREP] scheduler plugin - KAI scheduler#553
daisy-ycguo wants to merge 1 commit into
ai-dynamo:mainfrom
daisy-ycguo:grep

Conversation

@daisy-ycguo
Copy link
Copy Markdown

@daisy-ycguo daisy-ycguo commented Apr 27, 2026

Adds GREP-525 proposal for KAI scheduler plugin.

Fixes #525

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 27, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@daisy-ycguo daisy-ycguo requested a review from danbar2 as a code owner May 6, 2026 03:10
@daisy-ycguo daisy-ycguo changed the title [WIP] [GREP] scheduler plugin - KAI scheduler [GREP] scheduler plugin - KAI scheduler May 6, 2026
Signed-off-by: Daisy <daiguo@nvidia.com>
@kangclzjc
Copy link
Copy Markdown
Contributor

@daisy-ycguo Could you please create an issue and link it in this PR


## Summary

This proposal adds a dedicated KAI scheduler backend to Grove's Scheduler Backend Framework so Grove can natively create, update, and delete KAI PodGroup resources for Grove PodGang workloads. This proposal is intentionally limited to PodGroup creation and management; it does not include topology-aware scheduling support or KAI Topology synchronization from Grove ClusterTopology. The change improves maintainability, clarifies ownership boundaries, and enables predictable KAI-specific lifecycle handling for PodGang workloads without relying on legacy external PodGroup management.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you please check whether now Grove already migrate topology scheduling support in the repo like this PR

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@enoodle could you please help check this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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


- Redesigning the Scheduler Backend Framework introduced by GREP-375.
- Introducing new user-facing scheduling APIs in PodCliqueSet or PodGang for this phase.
- Covering support for all third-party schedulers; this proposal only scopes KAI backend behavior.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, this is what this GREP do

- Introducing new user-facing scheduling APIs in PodCliqueSet or PodGang for this phase.
- Covering support for all third-party schedulers; this proposal only scopes KAI backend behavior.
- Defining advanced KAI-only scheduling semantics beyond existing PodGang intent.
- Replacing or deprecating non-KAI backends.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same, obviously this kai backend shouldn't affect other backends.

- Replacing or deprecating non-KAI backends.
- Requiring PodGang status-only updates to trigger backend reconciliation. The current backend controller reacts to create, delete, and generation-changing updates.
- Creating, updating, or deleting KAI Topology resources from Grove `ClusterTopology`.
- Defining topology-aware scheduling behavior for KAI. That functionality is out of scope for this proposal and should be covered separately.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we have kai backend, then we should still support all functionality of kai which means Grove still support topology-aware scheduling, correct ?

Copy link
Copy Markdown
Author

@daisy-ycguo daisy-ycguo May 11, 2026

Choose a reason for hiding this comment

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

Topology-ware scheduling is out of scope of this GREP, but in a separated backend file called operator/internal/scheduler/kai/topology.go. I think topology-aware scheduling should be supported but need to verify in tests.

- All PodClique templates in a PodCliqueSet must resolve to the same scheduler backend.
- PodGang resources created by Grove carry the resolved scheduler name in the `grove.io/scheduler-name` label.
- The PodGang backend controller resolves the backend from that label and falls back to the default backend only if the label is absent or invalid.
- A PodCliqueSet that references an enabled non-default scheduler is admitted; a PodCliqueSet that references a non-enabled scheduler is rejected.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The scheduler resolution seems already done in Grove now.


**Mitigation**:

- Mark backend-managed PodGang objects with an explicit ignore annotation consumed by legacy KAI paths.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thie means this backend also rely on kai-scheduler, could you please also track the PR status, maybe we should ping kai guys to merge this PR

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

this PR Allow Grove plugin to ignore PodGangs with specific annotation is still in draft status. @sanjaychatterjee please let us know if you have any plans to push that PR to be merged.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@daisy-ycguo We should use the interface from this PR : kai-scheduler/KAI-Scheduler#1552
Adding the annotation kai.scheduler/skip-podgrouper on the pod gang. This is needs the next version of KAI to be released soon.

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.

KAI scheduler backend: sync PodGang to KAI PodGroup

3 participants