Skip to content

feat(executorch): add generic CPU-first ExecuTorch backend #105

feat(executorch): add generic CPU-first ExecuTorch backend

feat(executorch): add generic CPU-first ExecuTorch backend #105

Workflow file for this run

name: libtorch
# Thin wrapper: derive version + release flag + matrix (engine-meta, from CMakePresets
# vendor.anira), then hand off to the shared _build-backend.yml pipeline. CPU SHARED only;
# per target we either repackage an upstream download.pytorch.org prebuilt or build from
# source where PyTorch ships none. Consumed via find_package(Torch), so archives preserve
# the full package tree (include/ lib/ share/ [bin/]).
#
# Triggers:
# - push/PR touching libtorch sources or shared CI -> validate only (no release)
# - tag v<anira-version> (e.g. v2.0.3) -> build at its VERSION, publish to that release
on:
push:
branches: [main]
paths:
- 'engines/libtorch/**'
- 'scripts/**'
- 'cmake/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
- '.github/actions/**'
- '.github/workflows/libtorch.yml'
- '.github/workflows/_build-backend.yml'
tags:
- 'v[0-9]*'
pull_request:
paths:
- 'engines/libtorch/**'
- 'scripts/**'
- 'cmake/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
- '.github/actions/**'
- '.github/workflows/libtorch.yml'
- '.github/workflows/_build-backend.yml'
concurrency:
group: libtorch-${{ github.ref }}
cancel-in-progress: true
jobs:
meta:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.m.outputs.version }}
release: ${{ steps.m.outputs.release }}
release_tag: ${{ steps.m.outputs.release_tag }}
matrix: ${{ steps.m.outputs.matrix }}
steps:
- uses: actions/checkout@v6
- id: m
uses: ./.github/actions/engine-meta
with:
preset_prefix: libtorch
version_file: engines/libtorch/VERSION
build:
needs: meta
uses: ./.github/workflows/_build-backend.yml
with:
engine: libtorch
libname: libtorch
version: ${{ needs.meta.outputs.version }}
release: ${{ needs.meta.outputs.release == 'true' }}
release_tag: ${{ needs.meta.outputs.release_tag }}
matrix: ${{ needs.meta.outputs.matrix }}
package_dirs: "include lib share bin"
macos_universal_kinds: '["shared"]'
secrets: inherit