Skip to content

About

Topology- and workload-aware GPU scheduling with Ray and NVIDIA Dynamo for distributed LLM inference across heterogeneous GPU clusters, evaluated using normalized Job Completion Time.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

Topology and Workload Aware GPU Scheduling

See current implementation, validation status, and versions for the shared support summary and evidence boundaries.

Research on GPU scheduling for distributed large language model (LLM) inference across heterogeneous GPU clusters using Ray, KAI Scheduler and NVIDIA Dynamo.

Overview

This research aims to develop topology- and workload-aware GPU scheduling strategies that improve cluster utilization and reduce job completion time. It evaluates distributed LLM inference scheduling across heterogeneous GPU clusters using normalized Job Completion Time (JCT).

Research Focus

  • Topology-aware scheduling: Account for cluster topology when making GPU placement and scheduling decisions.
  • Workload-aware scheduling: Incorporate inference workload characteristics into scheduling strategies.
  • Heterogeneous GPU clusters: Study scheduling across clusters containing GPUs with different capabilities.
  • Distributed LLM inference: Explore scheduling strategies using Ray and NVIDIA Dynamo.

Objectives

  1. Improve GPU cluster utilization.
  2. Reduce job completion time for distributed LLM inference workloads.
  3. Evaluate scheduling strategies using normalized JCT.

How This Approach Differs

The baseline requests only a GPU count. Our policy also considers discovered hardware, workload measurements, and communication cost before asking Ray to reserve the selected nodes.

flowchart LR
    W[Workload] --> B["Baseline<br/>request N GPUs"]
    W --> P["Current planner"]
    H["Discovered GPU<br/>model and memory"] --> P
    G["V1.2 intra-node<br/>GPU graph"] --> F["Next: enforceable<br/>device-aware placement"]
    T["Measured compute and<br/>network costs"] --> P
    B --> R[Ray scheduling]
    P --> C[Choose lowest-cost<br/>feasible nodes]
    C --> R
    R --> E[Compare normalized JCT<br/>on matched workloads]

    classDef baseline fill:#fff3e0,stroke:#c77800,color:#222
    classDef proposed fill:#e8f5e9,stroke:#28823b,color:#222
    classDef shared fill:#e8eefb,stroke:#4263a5,color:#222
    class B baseline
    class P,H,T,C,G,F proposed
    class W,R,E shared
Loading

Conceptual design, not measured results. V1.2 records intra-node GPU relationships, while the current policy still uses supplied workload and inter-node network measurements. It does not predict production JCT.

GPU-count baseline Current policy
Inputs Requested GPU count GPU inventory, workload profile, and link costs
Decision Ray selects a feasible placement Planner selects nodes; Ray reserves and executes
Objective Satisfy the resource request Minimize the planner's estimated compute + communication cost

Ray already supports accelerator constraints and custom resources. This research adds a workload-specific policy for choosing among feasible placements; Ray still performs resource accounting and task execution. See Ray accelerator support.

See V1.2 workflow for the full order from cluster startup and topology discovery through planning, reservation, execution, and cleanup. The V1.2 topology guide explains the new GPU relationship graph and its current enforcement boundary. The single-GPU validation report records the first physical-GPU inventory, Ray assignment, oversubscription rejection, and direct CUDA smoke test.

Evaluation

The matched trace runner normalizes each successful job's observed JCT by the same job's successful gpu_count run. The baseline guide defines the timing boundary and failure handling. Real experiments must also record aggregation, hardware, workload definitions, and matched conditions; the synthetic trace example is not performance evidence.

Measured link costs can be supplied to the trace runner with link_costs=resolution.costs. Every policy's success and failure records retain the same bandwidth snapshot and its measured, advertised, fallback, or supplied source; see the link measurement guide.

Repository Status

This repository includes an initial Python placement policy, automatic intra-node GPU topology discovery, a network interface inventory, opt-in inter-node TCP link measurement, a Ray execution adapter, and a KAI Scheduler lifecycle adapter. It is an experimental foundation: real GPU benchmarks, real-workload traces, GPU-to-NIC affinity, and physical multi-node link validation are not yet included. The Dynamo lifecycle adapter has CPU/fake-engine coverage; real Dynamo/CUDA inference remains unverified.

See the changelog for version differences, improvements, and known limitations. See Contributing to report issues, propose scheduler changes, run validation, and prepare a pull request. See the release process for how a version number, changelog section, annotated tag, and GitHub Release are produced.

The project roadmap defines Topology Discovery, Dynamo Integration, Evaluation, and Next Release milestones, their dependencies, and evidence required for completion. Track live assignments and progress in GitHub milestones.

Ray Source and Runnable Integration

  • Complete Ray source code and the pinned Ray 2.55.0 source tree.
  • Ray integration and source guide: explains the relevant Python and C++ components, our cost model, setup, and limitations.
  • Placement policy: selects nodes using per-workload compute estimates, GPU memory/capacity and inter-node communication costs.
  • Ray adapter: atomically reserves bundles on those nodes, launches one task per GPU and releases resources on completion or failure.
  • V1.2 GPU inventory: probes every live GPU node and reads GPU identity plus pairwise PCI/NUMA ancestry and direct NVLink counts through Ray's bundled NVIDIA NVML support.
  • NIC inventory: reads each node's interfaces, their PCI function, NUMA node, driver, state, advertised speed, and RDMA devices, with per-field confidence; see the guide and run python -m examples.nic_inventory.
  • V1 Dynamo contract: pins the Ray, Dynamo, vLLM, Python, CUDA, driver, Linux, model, ownership, readiness, and shutdown contract for independent single-GPU replicas.
  • Inter-node link measurement: opt-in TCP throughput and latency probes between Ray nodes, with NIC collector evidence on each endpoint and planner bandwidth provenance; missing identity stays explicit.
python -m pip install -e '.[ray]'
python -m examples.plan
python -m unittest discover -s tests -v
python -m examples.ray_smoke

The smoke example runs real Ray with simulated logical GPUs; it performs no CUDA work. The planner example uses synthetic inputs, not experimental results. See the guide for real-cluster setup and the distinction between node placement and physical GPU topology.

Five deterministic reference baseline policies now support controlled comparisons through one planner interface and the same Ray execution path. Run python -m examples.compare_policies to inspect their machine-readable decisions on synthetic inputs. Run python -m examples.compare_policy_traces to replay a shared serial job trace across all five policies on two local Ray nodes with simulated GPUs. It records terminal failures and matched GPU-count JCT ratios; these are integration checks, not benchmark results.

The KAI Scheduler integration maps the same backend-neutral plan to an external KAI PodGroup and node-pinned GPU Pods. It reads Nodes, Queues, GPU capacity, and RBAC from Kubernetes; then submits, watches, cancels, and cleans up the workload. Run python -m examples.kai_manifest to inspect objects without a cluster or python -m examples.kai_submit --help for the live-cluster path.

On a running NVIDIA GPU cluster, V1.2 constructs planner node inputs without manually entering GPU models, counts or memory:

import ray
from topology_scheduler import Workload, choose_placement, discover_planner_nodes

ray.init(address="auto")
nodes = discover_planner_nodes()
plan = choose_placement(nodes, Workload(2, 40, {"H100": 10}), {})

The workload profile remains an explicit experimental input, not a GPU hardware fact. Inter-node bandwidth is supplied as well, unless a controlled link measurement run produces it. Run python -m examples.ray_inventory to print the detected hardware and intra-node graph. Each GPU node must advertise exactly one topology_node:<name> custom resource. The current Ray adapter reserves a node but cannot select a particular physical GPU pair from this graph.

About

Topology- and workload-aware GPU scheduling with Ray and NVIDIA Dynamo for distributed LLM inference across heterogeneous GPU clusters, evaluated using normalized Job Completion Time.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages