← Back
mlc-ai

mlc-ai/agentic-gpu-programming-for-mlsys

View on GitHub ↗http://mlc.ai/agentic-gpu-programming-for-mlsys/ ↗
Stars
40
Forks
6
Watchers
40
Open issues
0
Contributors
5
Language
HTML
License
—
Default branch
main
Created Sep 29, 2026Updated Sep 30, 2026

Star growth

Today—
This week—
This month—

Star history will appear here once this repo has been tracked for a couple of days.

README

Agentic GPU Programming for MLSys

A book on the components of agentic GPU programming, their implementation in TIRx Harness, and their use in a kernel optimization task. General concepts appear in Part I, the concrete system in Part II, and worked examples in Part III. Grouped GEMM supplies the workflow tutorial; recorded Kimi Delta Attention runs supply the diagnostic and review cases.

Build and preview

This is a static Sphinx / MyST book, using the same sphinx-book-theme as Modern GPU Programming for MLSys. Python 3.11+ is sufficient. Building the website does not require a GPU, TVM, Rust, Node.js, or either the agent or kernels checkout.

Clone this standalone book and run from its root:

git clone https://github.com/mlc-ai/agentic-gpu-programming-for-mlsys.git agentic-gpu-programming-for-mlsys
cd agentic-gpu-programming-for-mlsys
python -m venv .venv
.venv/bin/python -m pip install -r requirements-docs.txt
make serve

Open http://localhost:8080. make serve builds first and then serves on loopback; stop it with Ctrl+C. After editing Markdown, run make html in a second terminal and refresh the browser. Search, theme switching, navigation, fonts, equations, and code copying use bundled assets; no CDN is required for reading.

To change the port or listen on your LAN explicitly:

make serve PORT=8081
make serve BIND=0.0.0.0 PORT=8080

For a remote development machine, forward the port:

ssh -L 8080:127.0.0.1:8080 user@your-server

Without Make (including Windows), use your virtual environment's Python:

python -m sphinx -E -a -n -W --keep-going -b html -d _build/doctrees . _build/html
python -m http.server --bind 127.0.0.1 --directory _build/html 8080

The deployable output is _build/html/. Any static HTTP server can serve it, including under a URL subdirectory. No application backend is needed.

Editing

  • index.md owns chapter order through standard Sphinx toctrees.
  • Part I, Elements of Agentic GPU Programming, is chapters/overview.md, analysis.md, knowledge.md, benchmarking.md, and agent-workflows.md. These introduce the compiler harness components and the workflows that compose with them, motivated by kernel development problems and explained with local examples.
  • Part II introduces TIRx Harness, its compiler foundation, and KCoral. Part III retains the workflow, diagnostic, benchmark, review, and tips cases for continued editing.
  • _static/diagrams/ contains checked-in HTML figures. They share diagrams.css and diagrams.js, work as standalone pages, and are embedded with iframes. Embedded figures follow the book's theme and resize to their contents. Edit HTML directly; no generation step is required.
  • conf.py owns the theme settings and repository source-link templates.
  • chapters/launching-the-agent.md opens Part III with environment preparation, launcher tabs, and result inspection for M-grouped contiguous FP8 GEMM. The harness task setup and benchmark entry points prepare and evaluate the run. chapters/self-improvement.md covers review and harness improvement. chapters/advanced-tips.md closes the book with practices for a long search.
  • _static/book-tabs.js handles the launcher tabs using the book's normal Markdown, syntax highlighting, and code-copy controls.
  • _static/book.css contains the small visual adjustments to the book theme.
  • _static/mathjax/ bundles MathJax for inline $...$ and display $$...$$ equations; its README.txt records the version and upstream files.

Repository links follow each project's default branch. Upstream sources own the current interfaces and contracts; when refreshing an excerpt, check the surrounding explanation against those sources. The build reads only files in this book and never fetches upstream source.

make html treats warnings as errors. The website build does not execute the kernel examples or verify their performance.