Expand building Claude skill to cover general ET building from source#2
Draft
Expand building Claude skill to cover general ET building from source#2
Conversation
The existing building skill only covered runners (Makefile targets) and CMake workflow presets. This expands it to be a comprehensive guide for building ExecuTorch from source, including: - Prerequisites and toolchain requirements - Building the Python package (install_executorch.sh with all flags) - Building the C++ runtime standalone (presets, workflows, manual CMake) - Building model runners (Makefile) - Cross-compilation (Android, iOS, macOS, Windows) - Complete build options reference with dependency chains - Common build patterns (minimal, XNNPACK, profiling, tests, subdirectory) - Troubleshooting section covering 12 common build issues: - Submodule issues - Stale build artifacts - CMake version conflicts - Python version mismatch - Dependency version conflicts - Missing python-dev headers - Linking errors with --whole-archive - XNNPACK build failures - Windows symlink errors - MSVC kernel compilation failures - Intel macOS limitations - Duplicate kernel registration - Build output reference table - Tips for faster and more reliable builds
Reorganize the building skill to be concise and action-driven rather than encyclopedic. Key changes: - Add "do not ask questions" directive — detect and fix env issues automatically - Make conda the mandatory path (no venvs, no system Python) - Auto-fix for cmake >= 4.0 and PEP 668 errors - Default action is `./install_executorch.sh --editable` - Complete runner table from actual Makefile (adds voxtral, voxtral_realtime, sortformer, silero-vad, llava, debug variants) - Fix macOS commands: $(sysctl -n hw.ncpu) instead of $(nproc) - Note that --preset macos uses Xcode generator - Condense troubleshooting into scannable table - Trim cmake options to most-used flags (full list in CMakeLists.txt) Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Differential Revision: D95846702 Pull Request resolved: pytorch#18021
### Summary Don't run Samsung jobs which require secrets on forked PRs. They fail. It looks like they used to be disabled on forks, but this line ended up getting left commented out after the jobs were disabled and re-enabled. This PR restores it to the original state.
Summary: I've migrated the codebase to stop using these. Reviewed By: d16r Differential Revision: D95810888 Co-authored-by: Adam Ernst <adamjernst@meta.com>
- Add venv fallback when conda is not installed - Handle conda PermissionError by checking env directory on disk - Auto-fix cmake: missing or < 3.24 gets pip-installed, >= 4.0 works fine - Add troubleshooting entries for conda not found and PEP 668 errors - Remove heavy-handed directive banner; let skill structure guide behavior Co-authored-by: Claude <noreply@anthropic.com>
Explicit decision tree at the top of Step 2 so Claude routes to the right section based on keywords (Android, iOS, model names, cmake) instead of always defaulting to the Python package build. Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Add ANDROID_NDK requirement and verification to Android section - Fix CMAKE_BUILD_TYPE description: not all presets set it - Separate build output table by flow (pip vs cmake vs cross-compilation) Co-authored-by: Claude <noreply@anthropic.com>
Differential Revision: D95862010 Pull Request resolved: pytorch#18063
Three issues that would break a fresh Mac checkout: - Add Xcode Command Line Tools prerequisite check - Add conda shell.bash hook for non-interactive shells (Claude Code / CI) - Add brew install python@3.12 guidance for venv path when only 3.14+ exists Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Differential Revision: D95904580 Pull Request resolved: pytorch#18025
… builds Differential Revision: D95739935 Pull Request resolved: pytorch#18000
### Summary Remove lock on XNNPACK Disabled Workspace Mode. ### Test plan See test. cc @GregoryComer @digantdesai @cbilgin
Summary: Fix write-heap-buffer-overflow in set_all_to_value triggered via apply_padding_to_dim, reported by fuzzer (T258811544). Root causes: 1. Negative padding values silently cast to huge size_t, causing massive out-of-bounds writes. 2. When out_data advances past out_data_end, the remaining computation (out_data_end - out_data) wraps around to a huge size_t, causing bounds checks to incorrectly pass. 3. No error propagation after recursive apply_padding_to_dim calls, allowing the loop to continue writing after a child call has failed. Fixes: - Validate all padding values are non-negative in check_constant_pad_args. - Read padding as int64_t and explicitly check >= 0 before casting to size_t. - Guard remaining computation with out_data <= out_data_end check at all three bounds-check sites to prevent size_t wraparound. - Check ctx.failure_state() after recursive calls and bail out early. - Remove dead pad_i >= 0 check (always true for size_t). Differential Revision: D95762335
Updated documentation links for Ethos-U memory modes. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The existing
/buildingClaude skill only covered runners (Makefile targets likemake llama-cpu) and a couple of CMake workflow presets. This PR expands it into a comprehensive guide for building ExecuTorch from source.Changes
Expanded
.claude/skills/building/SKILL.mdfrom 23 lines to 353 lines, covering:New Sections
install_executorch.shwith all flags, backend enablement viaCMAKE_ARGS, verificationMotivation
The original skill was too narrow for Claude to help users build ExecuTorch from source. Users asking Claude to 'build ExecuTorch' would only get runner-specific instructions, missing the broader Python package install, standalone C++ runtime build, cross-compilation, and troubleshooting guidance.
Testing
This is a documentation-only change to a Claude skill file. No code changes.
Target: pytorch/executorch (to be submitted as upstream PR)
cc @Mengwei-Liu