Taming a Beast: Using ONNX Runtime in AAA Games
summary
Ubisoft integrates ONNX Runtime into Snowdrop and Anvil engines, first as a Windows-only internal build (non-shippable) and then shipping a feature in Rainbow Six Siege for drone navigation; legal checks cover 13 dependency licenses; conversion from CMake to Sharpmake and support for blob builds and consoles requires many platform stubs and ifdefs. The in-house runtime supports ~40 of ONNX’s ~180 operators and adding one operator takes ~30 days plus ~10 days per-platform for optimization. Large models run ~2–3x faster on ONNX Runtime, small models favor the in-house engine by ~10–20%, and concurrent mixed-model inferences perform worse than sequential. Exceptions and thread creation are disabled and replaced with checks to avoid crashes.
AI-written summary · about
chapters (31)
- 0:00Introduction and background
- 2:01Why use machine learning in games
- 5:38ONNX and ONNX Runtime overview
- 7:06Early challenges with custom runtime
- 11:02Considering ONNX Runtime for games
- 13:10Legal checks for non-shipped use
- 14:41Need for ONNX Runtime in shipped games
- 15:22Legal checks for shipped use
- 15:43Memory management concerns
- 17:31Architecture and code integration
- 19:23Build system conversion challenges
- 20:49Blob build compatibility issues
- 23:15Handling exceptions in games
- 24:41Thread management and GPU features
- 27:30Platform-specific adaptations
- 31:47Debugging and performance trade-offs
- 33:30Performance evaluation results
- 36:45Shipping Rainbow Six Siege feature
- 37:29Updating and upstreaming changes
- 40:39Legal risks in upstream contributions
- 42:07Merging changes into upstream
- 43:53Taming the beast summary
- 44:56Lesson learned and costs involved
- 46:08Q&A: Concurrent model performance
- 47:15Q&A: Platform differences and debugging
- 49:21Q&A: Online vs local inference
- 51:10Q&A: Console and mobile support
- 52:39Q&A: Starting fresh with ONNX Runtime
- 53:21Q&A: Drone navigation improvements
- 55:09Q&A: Dependency management challenges
- 56:33Q&A: Collaborative inference runtime
