name: updating-onnxruntime
description: Updates ONNX Runtime submodule to latest stable version, initializes nested submodules, bumps onnxruntime and models caches. Use for new ML operators, inference performance, or security patches.
user-invocable: true
allowed-tools: Bash(pnpm:), Bash(npm:), Bash(git:), Bash(node:), Bash(rg:), Bash(grep:), Bash(find:), Bash(ls:), Bash(cat:), Bash(head:), Bash(tail:), Bash(wc:), Bash(diff:*), Read, Edit, Glob, Grep---
updating-onnxruntime
Update the ONNX Runtime submodule to latest stable release.
- Submodule:
packages/onnxruntime-builder/upstream/onnxruntime (microsoft/onnxruntime)
- Tag format:
vX.Y.Z (exclude dev/rc/preview)
- Cache bumps:
onnxruntime, models
- Note: Has nested submodules (cmake/external/onnx, emsdk) that need recursive init
Process
- Validate: Clean working directory, detect CI mode
- Fetch latest:
git fetch origin --tags in submodule, find latest stable vX.Y.Z tag
- Check: If already at latest, report and exit
- Update submodule:
git checkout $TAG, then git submodule update --init --recursive to initialize nested submodules
- Verify clean:
git status should show only submodule pointer change (capital M), not modified/untracked content
- Update .gitmodules: Edit version comment to
# onnxruntime-X.Y.Z (strip v prefix)
- Build/test (skip in CI):
pnpm run clean && pnpm run build && pnpm test in packages/onnxruntime-builder. Builds can take 30+ minutes (WASM compilation).
- Bump caches: Increment
onnxruntime and models in .github/cache-versions.json
- Commit and report