Skip to content

Introduce CMake workflow - #15804

Merged
larryliu0820 merged 3 commits into
gh/larryliu0820/81/basefrom
gh/larryliu0820/81/head
Nov 13, 2025
Merged

larryliu0820 merged 3 commits into
gh/larryliu0820/81/basefrom
gh/larryliu0820/81/head

Conversation

@larryliu0820

@larryliu0820 larryliu0820 commented Nov 13, 2025 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

CMake workflow combines configure and build into 1 command. Instead of
doing:

cmake --preset llm \
      -DEXECUTORCH_BUILD_CUDA=ON \
      -DCMAKE_INSTALL_PREFIX=cmake-out \
      -DCMAKE_BUILD_TYPE=Release \
      -Bcmake-out -S.
cmake --build cmake-out -j$(nproc) --target install --config Release

We can simply do cmake --workflow llm-release-cuda. This largely
reduces the burden of running these cmake commands.

Next step I'm going to create workflow for the popular runners (llama,
whisper, voxtral etc) and further simplify the build command

CMake workflow combines configure and build into 1 command. Instead of
doing:

```
cmake --preset llm \
      -DEXECUTORCH_BUILD_CUDA=ON \
      -DCMAKE_INSTALL_PREFIX=cmake-out \
      -DCMAKE_BUILD_TYPE=Release \
      -Bcmake-out -S.
cmake --build cmake-out -j$(nproc) --target install --config Release
```

We can simply do `cmake --workflow llm-release-cuda`. This largely
reduces the burden of running these cmake commands.

Next step I'm going to create workflow for the popular runners (llama,
whisper, voxtral etc) and further simplify the build command

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Nov 13, 2025 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15804

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 8 Pending, 6 Unrelated Failures

As of commit 8dd6a3c with merge base 6de1f4e (image):

NEW FAILURE - The following job has failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

larryliu0820 added a commit that referenced this pull request Nov 13, 2025
CMake workflow combines configure and build into 1 command. Instead of
doing:

```
cmake --preset llm \
      -DEXECUTORCH_BUILD_CUDA=ON \
      -DCMAKE_INSTALL_PREFIX=cmake-out \
      -DCMAKE_BUILD_TYPE=Release \
      -Bcmake-out -S.
cmake --build cmake-out -j$(nproc) --target install --config Release
```

We can simply do `cmake --workflow llm-release-cuda`. This largely
reduces the burden of running these cmake commands.

Next step I'm going to create workflow for the popular runners (llama,
whisper, voxtral etc) and further simplify the build command

ghstack-source-id: d86adc5
Pull Request resolved: #15804
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 13, 2025
@larryliu0820 larryliu0820 added the release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. label Nov 13, 2025
CMake workflow combines configure and build into 1 command. Instead of
doing:

```
cmake --preset llm \
      -DEXECUTORCH_BUILD_CUDA=ON \
      -DCMAKE_INSTALL_PREFIX=cmake-out \
      -DCMAKE_BUILD_TYPE=Release \
      -Bcmake-out -S.
cmake --build cmake-out -j$(nproc) --target install --config Release
```

We can simply do `cmake --workflow llm-release-cuda`. This largely
reduces the burden of running these cmake commands.

Next step I'm going to create workflow for the popular runners (llama,
whisper, voxtral etc) and further simplify the build command

[ghstack-poisoned]
larryliu0820 added a commit that referenced this pull request Nov 13, 2025
CMake workflow combines configure and build into 1 command. Instead of
doing:

```
cmake --preset llm \
      -DEXECUTORCH_BUILD_CUDA=ON \
      -DCMAKE_INSTALL_PREFIX=cmake-out \
      -DCMAKE_BUILD_TYPE=Release \
      -Bcmake-out -S.
cmake --build cmake-out -j$(nproc) --target install --config Release
```

We can simply do `cmake --workflow llm-release-cuda`. This largely
reduces the burden of running these cmake commands.

Next step I'm going to create workflow for the popular runners (llama,
whisper, voxtral etc) and further simplify the build command

ghstack-source-id: fec7b9f
Pull Request resolved: #15804
- Uses `llm-release` configure preset (sets `CMAKE_BUILD_TYPE=Release`)
- Uses `llm-release-install` build preset (builds the `install` target with parallel jobs)
- Installs artifacts to `cmake-out/` directory

@lucylq lucylq Nov 13, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add some instruction on how to add a new worfklow. Is this correct?

To add a new workflow:
1. Add a configure preset, e.g. new-workflow
2. Add a build preset that depends on (1), e.g. new-workflow-install
3. You should be able to run cmake --workflow new-workflow-install

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Let me add your words into README.md

@lucylq lucylq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great change, thank you!

CMake workflow combines configure and build into 1 command. Instead of
doing:

```
cmake --preset llm \
      -DEXECUTORCH_BUILD_CUDA=ON \
      -DCMAKE_INSTALL_PREFIX=cmake-out \
      -DCMAKE_BUILD_TYPE=Release \
      -Bcmake-out -S.
cmake --build cmake-out -j$(nproc) --target install --config Release
```

We can simply do `cmake --workflow llm-release-cuda`. This largely
reduces the burden of running these cmake commands.

Next step I'm going to create workflow for the popular runners (llama,
whisper, voxtral etc) and further simplify the build command

[ghstack-poisoned]
larryliu0820 added a commit that referenced this pull request Nov 13, 2025
CMake workflow combines configure and build into 1 command. Instead of
doing:

```
cmake --preset llm \
      -DEXECUTORCH_BUILD_CUDA=ON \
      -DCMAKE_INSTALL_PREFIX=cmake-out \
      -DCMAKE_BUILD_TYPE=Release \
      -Bcmake-out -S.
cmake --build cmake-out -j$(nproc) --target install --config Release
```

We can simply do `cmake --workflow llm-release-cuda`. This largely
reduces the burden of running these cmake commands.

Next step I'm going to create workflow for the popular runners (llama,
whisper, voxtral etc) and further simplify the build command

ghstack-source-id: 21411ca
Pull Request resolved: #15804
@larryliu0820
larryliu0820 merged commit 59a72cd into gh/larryliu0820/81/base Nov 13, 2025
@larryliu0820
larryliu0820 deleted the gh/larryliu0820/81/head branch November 13, 2025 23:36

This branch was previously deployed

1 inactive deployment
cherry-pick-bot — 8dd6a3cc Deployed Nov 13, 2025 by larryliu0820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants