Skip to content

Add OSS CI for the Native CPU engine - #23937

Open
JakeStevens wants to merge 6 commits into
pytorch:mainfrom
JakeStevens:export-D125722080
Open

JakeStevens wants to merge 6 commits into
pytorch:mainfrom
JakeStevens:export-D125722080

Conversation

@JakeStevens

Copy link
Copy Markdown
Contributor

Summary:
Add a CPU job to the Native Engines workflow that builds run_classification_cpu and runs native_cpu_engine_test with XNNPACK and optimized kernels enabled. Update dependency triggers, documentation, and xplat mirrors.

Authored with OpenAI Codex.

Differential Revision: D125722080

Summary:
Add `ggml-org/llama.cpp` under `backends/native/third-party`, pinned to `620d2225cc436ab0b001e3200e590e3b286ef9ab`, matching the internal dependency. The full submodule retains the upstream license and copyright notices.

Authored with AI assistance from Codex.

Differential Revision: D125694754
…n` runner (pytorch#23811)

Summary:
Pull Request resolved: pytorch#23811

Add engine-independent CMake libraries for the native graph, PTN package reader, program runtime, engine interface, and standalone API. `EXECUTORCH_BUILD_NATIVE` enables the common libraries; `EXECUTORCH_BUILD_NATIVE_VULKAN` also enables `native_vulkan_engine`.

`EXECUTORCH_BUILD_NATIVE_VISION_RUNNER` (requires `EXECUTORCH_BUILD_NATIVE_VULKAN`) additionally builds the `examples/vision` classification runner as `run_classification` plus its `native_runner_utils` library. The runner links `native_vulkan_engine` and gflags and installs to `bin/`. Its existing `test_runner_utils.cpp` coverage runs as `native_runner_utils_test` under `EXECUTORCH_BUILD_TESTS`.

Authored with Codex and Muse Code.

Differential Revision: D125084367
Summary:
Add separate Linux jobs for `runtime`, `ggml`, and `vulkan`, running each native test suite once and building `run_classification` in the Vulkan job. Scope PR triggers to relevant build inputs.

Authored with AI assistance from Codex.

Differential Revision: D125695225
Summary:
Add `CPUEngineHost` and `CPUEngineContext` using the existing CPU backend's provider selection, memory planning, and execution. Consume standard Native preprocessing output by materializing supported views and functionalizing supported in-place activations during engine compilation. The engine integrates with `Model`/`Session`, shares package constants across methods, preserves inputs across repeated execution, and converts host dtypes with checked integer narrowing. Support static, unquantized graphs with contiguous constants and public I/O; reject unsupported aliasing and mutation semantics.

Add CMake libraries and installed targets for the CPU runtime, providers, and engine. `EXECUTORCH_BUILD_NATIVE_CPU` requires XNNPACK and optimized kernels. Include the CPU engine integration suite in CTest.

Authored with OpenAI Codex.

Differential Revision: D125540986
Summary:
Move classification package loading, FP32 I/O, labels, and reference comparison into `ClassificationRunner`, following the HF LLM runner's engine factory pattern. Add `run_classification_cpu` and the explicit `run_classification_vulkan` target while retaining the existing Vulkan `run_classification` command.

Share the runner implementation in Buck and CMake, with engine-specific entry points. `EXECUTORCH_BUILD_NATIVE_VISION_RUNNER` accepts CPU, Vulkan, or both; the CPU engine and its CMake libraries come from the preceding commit.

Authored with OpenAI Codex.

Differential Revision: D125540991
Summary:
Add a CPU job to the Native Engines workflow that builds `run_classification_cpu` and runs `native_cpu_engine_test` with XNNPACK and optimized kernels enabled. Update dependency triggers, documentation, and xplat mirrors.

Authored with OpenAI Codex.

Differential Revision: D125722080
@pytorch-bot

pytorch-bot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 3 New Failures

As of commit b1cdc99 with merge base c45d76f (image):

NEW FAILURES - The following jobs have failed:

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

@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 Oct 16, 2026
@meta-codesync

meta-codesync Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

@JakeStevens has exported this pull request. If you are a Meta employee, you can view the originating Diff in D125722080.

@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

This branch has not been deployed

No deployments
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. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant