building

Compile ExecuTorch from source across Linux, macOS, and mobile targets.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/huahai2022/execu-xnnpack --skill building-huahai2022
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: building
Source: https://github.com/huahai2022/execu-xnnpack/tree/main/.claude/skills/building
Command: npx skills add https://github.com/huahai2022/execu-xnnpack --skill building-huahai2022

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Build ExecuTorch from source — Python package, C++ runtime, runners, cross-compilation, and backend-specific builds. Use when compiling anything in the ExecuTorch repo, diagnosing build failures, or setting up platform-specific builds.

Core Features & Use Cases

  • Cross-platform builds for Linux, macOS, and mobile targets.
  • Supports Python package installation, C++ runtime, and backend-specific runtimes.
  • Helps diagnose and fix build failures, customize backends, and reproduce CI builds.

Quick Start

Run the build script after preparing the Python environment to compile ExecuTorch from source.

Frequently Asked Questions about building

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build ExecuTorch from source for C++ runtime and Python packages?

Build ExecuTorch from source by setting up the Python environment and running the build script to compile the Python package, C++ runtime, runners, and backends for Linux, macOS, and mobile targets.

What's the best way to cross-compile ExecuTorch for mobile targets?

Cross-compile ExecuTorch for mobile targets by configuring the C++ toolchain and applying cross-compilation steps with specific backend flags to produce mobile-specific runtimes and runners.

Why does my ExecuTorch build fail during backend customization?

ExecuTorch build failures during backend customization often stem from incorrect backend flag configurations; diagnose build failures by verifying backend-specific runtime settings and validating C++ toolchain setup.

Does CMake support building ExecuTorch backends on Linux and macOS?

CMake supports building ExecuTorch backends on Linux and macOS by configuring the C++ toolchain to compile backend-specific runtimes and runners across cross-platform development targets.

How do I set up the Python environment for an ExecuTorch source build?

Set up the Python environment for an ExecuTorch source build by installing required dependencies, then execute the build script to compile the Python package and C++ runtime components.