Repository navigation
Install: stop pulling every submodule when a required one is missing - #24523
JakeStevens wants to merge 1 commit into
Conversation
This PR needs a
|
1ab1f55 to
dc18dcc
Compare
|
@claude review effort:max |
|
Claude finished @JakeStevens's task in 3m 12s —— View job Only fetching the required submodules breaks the default Detailed reviewPR Review: #24523SummaryThe PR limits Code Quality
RecommendationRequest Changes Add |
check_and_update_submodules() ran a bare `git submodule update --init --recursive` whenever a required submodule was absent, which fetched all ~24 submodules including llama.cpp, Vulkan, and googletest, even though the default build uses none of them. Update only the missing required paths instead. flatcc, json, and pocketfft are needed by the default build but were only ever fetched as a side effect of the bulk update, so add them to REQUIRED_SUBMODULES. The pybind preset enables MLX on Apple Silicon, so its submodule is required there too. Mark llama.cpp shallow like mlx to trim its clone. This PR was authored with the assistance of Claude Code.
dc18dcc to
cc9789d
Compare
|
@claude review effort:max |
|
Claude finished @JakeStevens's task in 4m 28s —— View job The updated Detailed reviewPR Review: #24523SummaryWhen a required submodule is missing, The default build looks covered on Linux and macOS arm64. The problem is everything outside the default: the flows that turn on Vulkan, VGF or tests were working only because the bulk fetch pulled their submodules in. Three independent reviewers flagged this regression, and I checked each finding below against the code. Backward Compatibility
Testing
Code Quality
RecommendationRequest Changes Before merging, keep Vulkan from dropping out with no warning, and fix the documented |
install_executorch.pyruns a baregit submodule update --init --recursivewhenever a required submodule is missing, which fetches all ~24 submodules, including llama.cpp, Vulkan, googletest and FACTO, none of which the default build uses. This PR updates only the missing required submodule paths instead.The bulk update was hiding gaps in
REQUIRED_SUBMODULES: several submodules the default build needs were only ever fetched as a side effect.flatccandjsonare built unconditionally bythird-party/CMakeLists.txt.pocketfftis included by the optimized kernels' FFT ops, which the pybind preset enables on every platform. All three are now required.tools/cmake/preset/pybind.cmakealso enables MLX on Apple Silicon when Xcode's Metal compiler is present, sobackends/mlx/third-party/mlxis required on macOS arm64. llama.cpp is markedshallow = true, as mlx already is.Testing
On a fresh clone of this branch with no submodules initialized, in a new Python 3.12 conda env on an M-series Mac, I ran
./install_executorch.sh:fft_r2c, and with CoreML and XNNPACK registered.Two local caveats, neither caused by this PR. First, the pinned
TORCHAO_NIGHTLY_VERSION(0.19.0.dev20260907) has been pruned from the nightly index, so I bumped it to0.19.0.dev20260913in the scratch clone. Second, this Mac's Xcode 26 reports ametalcompiler but doesn't have the Metal Toolchain component downloaded, so the MLX build fails. It failed the same way before this PR, which also fetched mlx. The successful run usedCMAKE_ARGS=-DEXECUTORCH_BUILD_MLX=OFF. Before that, a configure of thepybindpreset with MLX on succeeded once mlx was fetched. Linux was not tested.Authored with Claude Code.