After Reflection: The Runtime Story
summary
Builds a runtime numerical DSL that accepts C++ or Python frontends, captures computation with tracer-based graph capture, lowers the graph to either C++-strings or LLVM IR and JITs it in-process with LLVM ORC, and also targets an Apple GPU via Objective-C++ MPS backend. Shows profiling injection (flip one boolean) and a simple CSE pass that drops nodes from 148 to 105, loads code in memory, and runs — GPU reaches ~60% utilization in the toy benchmarks, so the prototype works end-to-end.
AI-written summary · about
chapters (20)
- 0:00Runtime DSLs in C++
- 3:11DSLs as programming languages
- 7:03Runtime problem in high-performance
- 10:41DSLs IRs and JIT compilation
- 16:19Use cases for runtime DSLs
- 24:48Runtime DSLs as full languages
- 27:14Graph DSL for user intent
- 30:28Parsing DSLs with tracer objects
- 36:31Keep graph in C++ and language agnosticism
- 38:20Choosing IR for compilation
- 40:35DSL to machine code
- 46:34LLVM ORC for JIT compilation
- 51:11Generating LLVM IR from graph
- 53:58Emitting loops and conditionals
- 57:49Profiling jitted code dynamically
- 59:11Targeting Apple GPU with MPF
- 1:02:39Optimizing graphs with deduplication
- 1:06:54Limitations and future for DSL
- 1:08:39Type safety in API boundaries
- 1:15:21Conclusion and standardizing DSL
related talks
29mReal Programming
01h 01mFaster Compile Times and Better Performance: Bringing Just-in-Time Compilation to C++
25m[Keynote] “Codename: Tunahead” aka Software Engineering Economics for Runtimes
56mWrite Fast Code Like a Native
01h 03mApplied Best Practices
51mTutorial: Performance Tools
57mInvited Talk: Bridging Safety and Performance
48mCross-Domain Compilation: Exploiting Synergies Across the CS Community
