Skip to content

Commit

Permalink
#8535: update ttnn sweep workflow to use build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
ttmchiou committed May 15, 2024
1 parent c0b2608 commit 1ce74bb
Showing 1 changed file with 45 additions and 4 deletions.
49 changes: 45 additions & 4 deletions .github/workflows/ttnn-run-sweeps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,41 @@ on:
workflow_call:

jobs:
build-artifact:
strategy:
matrix:
arch: ["grayskull"]
env:
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }}
ARCH_NAME: ${{ matrix.arch }}
SILENT: 0
VERBOSE: 1
environment: dev
runs-on: build
steps:
- uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected]
- name: Set up dynamic env vars for build
run: |
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
- name: Update submodules
run: |
git submodule update --init --recursive
- uses: ./.github/actions/install-python-deps
- name: Build tt-metal and libs
run: |
cmake -B build -G Ninja
cmake --build build --target tests -- -j`nproc`
cmake --build build --target install -- -j`nproc`
- name: 'Tar files'
run: tar -cvf ttm_${{ matrix.arch }}.tar build/hw build/lib tt_eager/tt_lib/*.so ttnn/ttnn/*.so build/programming_examples build/test build/tools
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: TTMetal_build_${{ matrix.arch }}
path: ttm_${{ matrix.arch }}.tar

ttnn-sweeps:
needs: build-artifact
strategy:
# Do not fail-fast because we need to ensure all tests go to completion
# so we try not to get hanging machines
Expand All @@ -24,12 +58,19 @@ jobs:
- name: Set up dynamic env vars for build
run: |
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
- name: Build tt-metal and libs
run: |
PYTHON_ENV_DIR=$(pwd)/build/python_env ./build_metal.sh
- uses: actions/download-artifact@v4
with:
name: TTMetal_build_${{ matrix.arch }}
- name: Extract files
run: tar -xvf ttm_${{ matrix.arch }}.tar
- uses: ./.github/actions/install-python-deps
- name: Run ttnn sweeps
timeout-minutes: 30
run: ./tests/scripts/run_tests.sh --tt-arch $ARCH_NAME --pipeline-type ttnn_sweeps
run: |
source ${{ github.workspace }}/python_env/bin/activate
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
./tests/scripts/run_tests.sh --tt-arch $ARCH_NAME --pipeline-type ttnn_sweeps
- name: Assert that csvs exist in expected ttnn results folder
run: ls -hal tests/ttnn/sweep_tests/results/*.csv
- name: Upload ttnn sweep reports csvs
Expand Down

0 comments on commit 1ce74bb

Please sign in to comment.