Skip to content

Commit

Permalink
#8321: Add TGG workflow and pipeline tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tapspatel committed May 9, 2024
1 parent 54abc54 commit f500ef2
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/tgg-unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "[TGG] TGG unit tests"

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # This cron schedule runs the workflow every day at 12am UTC

jobs:
build-artifact:
uses: ./.github/workflows/build-artifact.yaml
secrets: inherit
TGG-tests:
strategy:
# Do not fail-fast because we need to ensure all tests go to completion
# so we try not to get hanging machines
fail-fast: false
matrix:
runner-info: [
# TGG
{arch: wormhole_b0, runs-on: ["config-tgg", "in-service"]},
]
test-group: [
{name: "TGG Unit Tests", cmd: './tests/scripts/run_tests.sh --tt-arch wormhole_b0 --pipeline-type post_commit_tgg --dispatch-mode ""'},
]
name: ${{ matrix.test-group.name }} ${{ matrix.runner-info.arch }} ${{ matrix.runner-info.name }}
env:
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }}
ARCH_NAME: ${{ matrix.runner-info.arch }}
CONFIG: ci
LOGURU_LEVEL: INFO
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
runs-on: ${{ matrix.runner-info.runs-on }}
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
- uses: actions/download-artifact@v4
with:
name: TTMetal_build_${{ matrix.runner-info.arch }}
- name: Extract files
run: tar -xvf ttm_${{ matrix.runner-info.arch }}.tar
- uses: ./.github/actions/install-python-deps
- name: ${{ matrix.test-group.name }} tests
timeout-minutes: 45
run: |
source ${{ github.workspace }}/python_env/bin/activate
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
${{ matrix.test-group.cmd }}
11 changes: 11 additions & 0 deletions tests/scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ run_post_commit_tg_pipeline_tests() {
./tests/scripts/tg/run_pre_post_commit_regressions_tg.sh
}

# Run post commit TGG tests - these are 8xn150 + 2xgalaxy tests
run_post_commit_tgg_pipeline_tests() {
local tt_arch=$1
local pipeline_type=$2
local dispatch_mode=$3

./tests/scripts/tgg/run_pre_post_commit_regressions_tgg.sh
}

run_models_performance() {
local tt_arch=$1
local pipeline_type=$2
Expand Down Expand Up @@ -264,6 +273,8 @@ run_pipeline_tests() {
run_end_to_end_demos_multi_device "$tt_arch" "$pipeline_type" "$dispatch_mode"
elif [[ $pipeline_type == "post_commit_tg" ]]; then
run_post_commit_tg_pipeline_tests "$tt_arch" "$pipeline_type" "$dispatch_mode"
elif [[ $pipeline_type == "post_commit_tgg" ]]; then
run_post_commit_tgg_pipeline_tests "$tt_arch" "$pipeline_type" "$dispatch_mode"
elif [[ $pipeline_type == "microbenchmarks" ]]; then
run_microbenchmarks_pipeline_tests "$tt_arch" "$pipeline_type" "$dispatch_mode"
elif [[ $pipeline_type == "ttnn_sweeps" ]]; then
Expand Down
17 changes: 17 additions & 0 deletions tests/scripts/tgg/run_pre_post_commit_regressions_tgg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

#/bin/bash

set -eo pipefail

if [[ -z "$TT_METAL_HOME" ]]; then
echo "Must provide TT_METAL_HOME in environment" 1>&2
exit 1
fi

if [[ -z "$ARCH_NAME" ]]; then
echo "Must provide ARCH_NAME in environment" 1>&2
exit 1
fi

# Write tests here!
echo "Fill me!"

0 comments on commit f500ef2

Please sign in to comment.