Skip to content

Commit 84a621c

Browse files
author
Zonglin Peng
committed
add cpu build to pull
1 parent 9ffcb16 commit 84a621c

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

.github/workflows/cadence-build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ on:
77
- release/*
88
pull_request:
99
paths:
10-
# - .ci/scripts/setup-cadence.sh
11-
- .github/workflows/apple.yml
10+
- .ci/scripts/setup-cadence.sh
11+
- .github/workflows/cadence-build.yml
1212
- install_executorch.sh
1313
- backends/cadence/**
1414
- examples/cadence/**
1515
workflow_dispatch:
16-
schedule:
17-
- cron: '0 10 * * *' # Runs daily at 2 AM PST
16+
# schedule:
17+
# - cron: '0 10 * * *' # Runs daily at 2 AM PST
1818

1919
concurrency:
2020
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}
@@ -59,6 +59,9 @@ jobs:
5959
- name: run cadence cpu build script
6060
shell: bash
6161
run: |
62+
# install cadence requirements
63+
bash backends/cadence/install_requirements.sh
64+
6265
.ci/scripts/build_cadence_runner.sh
6366
6467
# g3-build:

.github/workflows/pull.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,30 @@ jobs:
361361
contents: read
362362
needs: test-llama-runner-linux
363363

364+
cadence-cpu:
365+
name: cadence-cpu
366+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
367+
permissions:
368+
id-token: write
369+
contents: read
370+
strategy:
371+
fail-fast: false
372+
with:
373+
runner: linux.2xlarge
374+
docker-image: executorch-ubuntu-22.04-cadence-sdk
375+
submodules: 'true'
376+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
377+
timeout: 90
378+
script: |
379+
# The generic Linux job chooses to use base env, not the one setup by the image
380+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
381+
conda activate "${CONDA_ENV}"
382+
383+
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "cmake"
384+
385+
# run python unittest
386+
python -m examples.cadence.operators.test_g3_ops
387+
364388
unittest:
365389
uses: ./.github/workflows/_unittest.yml
366390
permissions:
@@ -480,7 +504,7 @@ jobs:
480504
481505
# Setup install_requirements for llama
482506
PYTHON_EXECUTABLE=python bash examples/models/llama/install_requirements.sh
483-
507+
484508
# Test static llama weight sharing and accuracy
485509
PYTHON_EXECUTABLE=python bash .ci/scripts/test_qnn_static_llama.sh
486510

0 commit comments

Comments
 (0)