|
| 1 | +# Grove Integration with KAI Scheduler |
| 2 | + |
| 3 | +## What is Grove? |
| 4 | + |
| 5 | +[Grove](https://github.com/ai-dynamo/grove) is a Kubernetes-native workload orchestrator designed for AI/ML inference workloads. It introduces the concept of **PodCliqueSets** - a higher-level abstraction for managing groups of related pods with topology-aware scheduling capabilities. |
| 6 | + |
| 7 | +Key concepts: |
| 8 | +- **PodCliqueSet (PCS)**: A collection of pod groups (cliques) that are deployed and scaled together |
| 9 | +- **PodCliqueScalingGroup (PCSG)**: Logical groupings within a PCS that share scaling behavior |
| 10 | +- **Clique**: A group of pods with a specific role (e.g., worker, leader, router) |
| 11 | +- **Topology Constraints**: Pack pods within specific topology domains (block, rack) for optimal network locality |
| 12 | + |
| 13 | +Grove is particularly useful for disaggregated inference workloads where different components (prefill workers, decode workers, routers) need to be co-located for performance. |
| 14 | + |
| 15 | +## Installation |
| 16 | + |
| 17 | +Install Grove using Helm with topology-aware scheduling enabled: |
| 18 | + |
| 19 | +```sh |
| 20 | +helm upgrade -i grove oci://ghcr.io/ai-dynamo/grove/grove-charts:v0.1.0-alpha.5 \ |
| 21 | + --set topologyAwareScheduling.enabled=true |
| 22 | +``` |
| 23 | + |
| 24 | +For more installation options and configuration details, see the [Grove Installation Guide](https://github.com/ai-dynamo/grove/blob/main/docs/installation.md#installation). |
| 25 | + |
| 26 | +## Integrating Grove with KAI Scheduler |
| 27 | + |
| 28 | +To use Grove workloads with KAI Scheduler, you need to configure each clique in your PodCliqueSet with two key settings: |
| 29 | + |
| 30 | +### 1. Set the Scheduler Name |
| 31 | + |
| 32 | +In each clique's `podSpec`, set the `schedulerName` to `kai-scheduler`: |
| 33 | + |
| 34 | +```yaml |
| 35 | +cliques: |
| 36 | + - name: my-clique |
| 37 | + spec: |
| 38 | + podSpec: |
| 39 | + schedulerName: kai-scheduler # Use KAI Scheduler |
| 40 | + containers: |
| 41 | + - name: worker |
| 42 | + # ... |
| 43 | +``` |
| 44 | + |
| 45 | +### 2. Add the Queue Label |
| 46 | + |
| 47 | +Add the `kai.scheduler/queue` label to each clique to specify which KAI queue the pods should be scheduled to: |
| 48 | + |
| 49 | +```yaml |
| 50 | +cliques: |
| 51 | + - name: my-clique |
| 52 | + labels: |
| 53 | + kai.scheduler/queue: default-queue # Assign to KAI queue |
| 54 | + spec: |
| 55 | + # ... |
| 56 | +``` |
| 57 | + |
| 58 | +### Complete Example |
| 59 | + |
| 60 | +The [podcliqueset.yaml](./podcliqueset.yaml) file in this directory demonstrates a complete disaggregated inference setup with: |
| 61 | +- A PodCliqueSet with topology constraint at the `block` level |
| 62 | +- Two PodCliqueScalingGroups (`decoder` and `prefill`) constrained at the `rack` level |
| 63 | +- Multiple cliques (workers, leaders, router) all configured for KAI Scheduler |
| 64 | + |
| 65 | +Each clique follows the integration pattern: |
| 66 | + |
| 67 | +```yaml |
| 68 | +cliques: |
| 69 | + - name: dworker |
| 70 | + labels: |
| 71 | + kai.scheduler/queue: default-queue # KAI queue assignment |
| 72 | + spec: |
| 73 | + roleName: dworker |
| 74 | + replicas: 1 |
| 75 | + minAvailable: 1 |
| 76 | + podSpec: |
| 77 | + schedulerName: kai-scheduler # KAI scheduler |
| 78 | + containers: |
| 79 | + - name: worker |
| 80 | + image: nginx:alpine-slim |
| 81 | + resources: |
| 82 | + requests: |
| 83 | + memory: 30Mi |
| 84 | +``` |
| 85 | +
|
| 86 | +## Summary of Required Changes |
| 87 | +
|
| 88 | +| Setting | Location | Value | Purpose | |
| 89 | +|---------|----------|-------|---------| |
| 90 | +| `schedulerName` | `cliques[*].spec.podSpec` | `kai-scheduler` | Route pods to KAI Scheduler | |
| 91 | +| `kai.scheduler/queue` | `cliques[*].labels` | Queue name (e.g., `default-queue`) | Assign workload to a KAI queue for resource management and fair-sharing | |
0 commit comments