Browse by type

XSched eliminates video stuttering in AI video conference applications on AI PCs
For more details, please see the 2nd case study in our paper.
https://github.com/user-attachments/assets/3eb256c3-9107-4d8b-ae8d-0e3ada54aec1
XSched is a preemptive scheduling framework for diverse XPUs (referring to various accelerators, such as GPUs, NPUs, ASICs, and FPGAs) across different brands, generations, and software platforms. XSched provides unified interfaces for scheduling XPU tasks through a preemptible command queue abstraction (XQueue), enabling hardware-agnostic, flexible scheduling policies for various objectives. XSched introduces a multi-level hardware model that helps advanced XPUs achieve optimal scheduling performance while maintaining compatibility with emerging XPUs. The framework is designed to efficiently schedule XPU tasks while remaining transparent to existing XPU-based applications.
✅ supported and implemented
❌ not supported
🔘 not yet implemented
🚧 implementation within progress
| Platform | XPU | Shim | Level-1 | Level-2 | Level-3 |
|---|---|---|---|---|---|
| CUDA | NVIDIA Ampere GPUs (sm86) | ✅ | ✅ | 🚧 | 🚧 |
| NVIDIA Volta GPUs (sm70) | ✅ | ✅ | |||
| NVIDIA Kepler GPUs (sm35) | ✅ | ❌ | |||
| Other NVIDIA GPUs | 🔘 | 🔘 | |||
| CoreX | CoreX GPUs | ✅ | ✅ | 🔘 | ❌ |
| HIP | AMD GPUs | ✅ | ✅ | 🔘 | 🔘 |
| LevelZero | Intel GPUs | ✅ | ✅ | 🔘 | 🔘 |
| Intel Integrated NPUs | ✅ | ❌ | |||
| OpenCL | NVIDIA GPUs | ✅ | ✅ | 🔘 | 🔘 |
| AMD GPUs | 🔘 | 🔘 | |||
| Intel GPUs | 🔘 | 🔘 | |||
| Xilinx FPGAs | 🔘 | ❌ | |||
| AscendCL | Ascend NPUs | ✅ | ✅ | 🔘 | ❌ |
| cuDLA | NVIDIA DLA | ✅ | ✅ | ❌ | ❌ |
| VPI | NVIDIA OFA | ✅ | ✅ | ❌ | ❌ |
| NVIDIA PVA | ❌ | ❌ |
git clone https://github.com/XpuOS/xsched.git
cd xsched
git submodule update --init --recursive
# build XSched only
# XSched will be installed to xsched/output by default
make
# install XSched to a custom path
make INSTALL_PATH=/path/to/install
# build XSched along with platform-specific components (HAL, Shim, etc.)
make cuda # or corex, hip, levelzero, opencl, ascend, cudla, vpi
# or specify PLATFORM
make PLATFORM=cuda
make PLATFORM="cuda levelzero opencl" # build multiple platforms at once
XSched is designed to be transparent to applications. By setting a few environment variables, you can schedule your application with XSched. See our example (Linux, Windows) for transparent scheduling.
You can also explicitly link with XSched and use XQueue APIs & Hint APIs in your application for more flexibility. See our examples for more details:
Check out our example list for more advanced use cases.

XSched consists of four key components: XPU shim (XShim), XPU task preemption module (XPreempt), XPU hardware adapter layer (XAL), and an XScheduler. XShim, XPreempt, and XAL are dynamically linked libraries preloaded into each XPU application process, while XScheduler runs as a central scheduling service.
shim in the code, intercepts XPU driver API calls and redirects commands to the XQueue ①, allowing applications to run on XSched without modifications (transparency).preempt in the code, implements XQueue interfaces based on the multi-level hardware model ②. Contains an agent that watches the state of XQueue (e.g., ready or idle) and generates scheduling events to notify the XScheduler via IPC ③. Also responsible for applying the scheduling operations (e.g., suspend or resume an XQueue) received from the XScheduler ⑤.hal in the code, implements the multi-level hardware model interfaces by calling XPU driver APIs.xserver in the code, coordinates all XQueues from different processes, monitors global XQueue status through agent-reported events ③, and invokes the scheduling policy to make decisions when status changes. Decisions are enforced by sending scheduling operations to agents ④. The policy is modular and customizable to suit various workloads.We will continue to support XSched on more OSes and platforms, and improve the performance of XSched. Please stay tuned!
XSched is designed to be extensible and flexible.
We welcome contributions:
If you use XSched for your research, please cite our paper:
@inproceedings{Shen2025xsched,
title = {{XSched}: Preemptive Scheduling for Diverse {XPU}s},
author = {Weihang Shen and Mingcong Han and Jialong Liu and Rong Chen and Haibo Chen},
booktitle = {19th USENIX Symposium on Operating Systems Design and Implementation (OSDI 25)},
year = {2025},
isbn = {978-1-939133-47-2},
address = {Boston, MA},
pages = {671--692},
url = {https://www.usenix.org/conference/osdi25/presentation/shen-weihang},
publisher = {USENIX Association},
month = jul
}
The artifacts of XSched are published on Github and Zenodo.
$ claude mcp add xsched \
-- python -m otcore.mcp_server <graph>