Skip to content

Ship only the TensorRT delegate in the ExecuTorch runtime wheel #13672

Ship only the TensorRT delegate in the ExecuTorch runtime wheel

Ship only the TensorRT delegate in the ExecuTorch runtime wheel #13672

Workflow file for this run

name: Lint Code
on:
pull_request:
types: [opened, synchronize, ready_for_review, review_requested, reopened]
jobs:
cpp-linting:
name: C++ Linting
runs-on: ubuntu-latest
permissions:
actions: write
checks: write
contents: write
deployments: none
id-token: write
issues: write
discussions: write
packages: write
pull-requests: write
repository-projects: none
security-events: none
statuses: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Setup env
run: |
sudo ln -s $GITHUB_EVENT_PATH /GITHUB_EVENT.json
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
run: |
uv pip install --system -r $GITHUB_WORKSPACE/.github/scripts/requirements.txt
python3 -c "import tomllib, subprocess; deps = tomllib.load(open('pyproject.toml', 'rb'))['dependency-groups']['lint']; subprocess.run(['uv', 'pip', 'install', '--system'] + deps, check=True)"
- name: Lint C++
run: |
cd $GITHUB_WORKSPACE
python3 $GITHUB_WORKSPACE/.github/scripts/run_cpp_linter.py
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
py-linting:
name: Python Linting
runs-on: ubuntu-latest
permissions:
actions: write
checks: write
contents: write
deployments: none
id-token: write
issues: write
discussions: write
packages: write
pull-requests: write
repository-projects: none
security-events: none
statuses: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Setup env
run: |
sudo ln -s $GITHUB_EVENT_PATH /GITHUB_EVENT.json
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
run: |
uv pip install --system -r $GITHUB_WORKSPACE/.github/scripts/requirements.txt
python3 -c "import tomllib, subprocess; deps = tomllib.load(open('pyproject.toml', 'rb'))['dependency-groups']['lint']; subprocess.run(['uv', 'pip', 'install', '--system'] + deps, check=True)"
# The pin check below runs under pytest and imports yaml to parse the workflows it
# asserts about. Neither pytest nor pyyaml is in requirements.txt or
# dependency-groups.lint, so the step exited 1 without running.
# test_update_executorch_pin imports packaging to order versions the way pip does.
uv pip install --system pytest pyyaml packaging
- name: Lint Python
run: |
cd $GITHUB_WORKSPACE
python3 $GITHUB_WORKSPACE/.github/scripts/run_py_linter.py
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# Text and metadata only: no GPU, no ExecuTorch, no built wheel. It belongs on this runner
# rather than in the tests/ci manifest, where every suite becomes a CUDA-container job
# after `needs: build` -- one GPU row per python/CUDA combination for a check that takes
# seconds. --noconftest keeps it clear of tests/py/dynamo/conftest.py, which imports torch.
- name: Check the ExecuTorch pin is consistent
if: always()
run: |
cd $GITHUB_WORKSPACE
python3 -m pytest tests/py/dynamo/executorch/test_executorch_pin.py \
-q --no-header -p no:cacheprovider --noconftest -o addopts=""
# The pin updater is pure repository tooling: it reads an index, rewrites the pin sites,
# and its tests clone the tree and shell out to pytest. No GPU or ExecuTorch, so it runs
# here beside the pin check rather than on a CUDA runner, and is excluded from the
# executorch e2e suite so it does not run there too.
- name: Test the ExecuTorch pin updater
if: always()
run: |
cd $GITHUB_WORKSPACE
python3 -m pytest tests/py/dynamo/executorch/test_update_executorch_pin.py \
-q --no-header -p no:cacheprovider --noconftest -o addopts=""