Skip to content

Commit

Permalink
#8586: Add tg and tgg frequent, perf and demo pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
tapspatel committed May 17, 2024
1 parent d29f733 commit f77c86b
Show file tree
Hide file tree
Showing 19 changed files with 680 additions and 170 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/tg-demo-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "[TG] TG demo tests"

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

jobs:
build-artifact:
uses: ./.github/workflows/build-artifact.yaml
with:
arch: '["wormhole_b0"]'
secrets: inherit
tg-demo-tests:
needs: build-artifact
strategy:
fail-fast: false
matrix:
test-group: [
{
name: "TG demo tests",
arch: wormhole_b0,
runs-on: [arch-wormhole_b0, "config-tg", "in-service", "runner-test", "bare-metal", "pipeline-functional"],
cmd: './tests/scripts/run_tests.sh --tt-arch wormhole_b0 --pipeline-type demos_tg_device --dispatch-mode ""'
},
]
name: ${{ matrix.test-group.name }}
env:
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }}
ARCH_NAME: ${{ matrix.test-group.arch }}
LOGURU_LEVEL: INFO
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
environment: dev
runs-on: ${{ matrix.test-group.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.test-group.arch }}
- name: Extract files
run: tar -xvf ttm_${{ matrix.test-group.arch }}.tar
- uses: ./.github/actions/install-python-deps
- name: Run demo regression tests
timeout-minutes: 180
run: |
source ${{ github.workspace }}/python_env/bin/activate
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
${{ matrix.test-group.cmd }}
52 changes: 52 additions & 0 deletions .github/workflows/tg-frequent-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "[TG] TG frequent tests"

on:
workflow_dispatch:
schedule:
- cron: "0 */8 * * *" # This cron schedule runs the workflow every 8 hours

jobs:
build-artifact:
uses: ./.github/workflows/build-artifact.yaml
with:
arch: '["wormhole_b0"]'
secrets: inherit
tg-frequent-tests:
needs: build-artifact
strategy:
fail-fast: false
matrix:
test-group: [
{
name: "TG frequent tests",
arch: wormhole_b0,
runs-on: [arch-wormhole_b0, "config-tg", "in-service", "runner-test", "bare-metal", "pipeline-functional"],
cmd: './tests/scripts/run_tests.sh --tt-arch wormhole_b0 --pipeline-type frequent_tg_device --dispatch-mode ""'
},
]
name: ${{ matrix.test-group.name }}
env:
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }}
ARCH_NAME: ${{ matrix.test-group.arch }}
LOGURU_LEVEL: INFO
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
environment: dev
runs-on: ${{ matrix.test-group.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.test-group.arch }}
- name: Extract files
run: tar -xvf ttm_${{ matrix.test-group.arch }}.tar
- uses: ./.github/actions/install-python-deps
- name: Run frequent regression tests
timeout-minutes: 60
run: |
source ${{ github.workspace }}/python_env/bin/activate
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
${{ matrix.test-group.cmd }}
87 changes: 87 additions & 0 deletions .github/workflows/tg-model-perf-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: "[TG] TG model perf tests"

on:
workflow_dispatch:
schedule:
- cron: "0 */12 * * *" # This cron schedule runs the workflow every 12 hours

jobs:
build-artifact:
uses: ./.github/workflows/build-artifact.yaml
with:
arch: '["wormhole_b0"]'
secrets: inherit
tg-model-perf-tests:
needs: build-artifact
strategy:
fail-fast: false
matrix:
test-group: [
{
name: "TG LLM model perf tests",
model-type: "LLM",
arch: wormhole_b0,
runs-on: [arch-wormhole_b0, "config-tg", "in-service", "runner-test", "bare-metal", "pipeline-perf"],
cmd: './tests/scripts/run_tests.sh --tt-arch wormhole_b0 --pipeline-type llm_model_perf_tg_device --dispatch-mode ""'
},
{
name: "TG CNN model perf tests",
model-type: "CNN",
arch: wormhole_b0,
runs-on: [arch-wormhole_b0, "config-tg", "in-service", "runner-test", "bare-metal", "pipeline-perf"],
cmd: './tests/scripts/run_tests.sh --tt-arch wormhole_b0 --pipeline-type cnn_model_perf_tg_device --dispatch-mode ""'
},
]
name: ${{ matrix.test-group.name }}
env:
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }}
ARCH_NAME: ${{ matrix.test-group.arch }}
LOGURU_LEVEL: INFO
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
environment: dev
runs-on: ${{ matrix.test-group.runs-on }}
steps:
- uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected]
- name: Enable performance mode
run: |
sudo cpupower frequency-set -g performance
- name: Ensure weka mount is active
run: |
sudo systemctl restart mnt-MLPerf.mount
sudo /etc/rc.local
ls -al /mnt/MLPerf/bit_error_tests
- name: Set up dynamic env vars for build
run: |
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
name: TTMetal_build_${{ matrix.test-group.arch }}
- name: Extract files
run: tar -xvf ttm_${{ matrix.test-group.arch }}.tar
- uses: ./.github/actions/install-python-deps
- name: Run model perf regression tests
timeout-minutes: 60
run: |
source ${{ github.workspace }}/python_env/bin/activate
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
${{ matrix.test-group.cmd }}
- name: Check perf report exists
id: check-perf-report
if: ${{ !cancelled() }}
run: |
ls -hal
export PERF_REPORT_FILENAME=Models_Perf_$(date +%Y_%m_%d).csv
ls -hal $PERF_REPORT_FILENAME
echo "perf_report_filename=$PERF_REPORT_FILENAME" >> "$GITHUB_OUTPUT"
- name: Upload perf report
if: ${{ !cancelled() && steps.check-perf-report.conclusion == 'success' }}
uses: actions/upload-artifact@v4
with:
name: perf-report-csv-${{ matrix.test-group.model-type }}-${{ matrix.test-group.arch }}-${{ matrix.test-group.machine-type }}
path: "${{ steps.check-perf-report.outputs.perf_report_filename }}"
- name: Disable performance mode
if: always()
run: |
sudo cpupower frequency-set -g ondemand
4 changes: 2 additions & 2 deletions .github/workflows/tg-unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: "[TG] TG unit tests"

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

jobs:
build-artifact:
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/tgg-demo-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "[TGG] TGG demo tests"

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

jobs:
build-artifact:
uses: ./.github/workflows/build-artifact.yaml
with:
arch: '["wormhole_b0"]'
secrets: inherit
tgg-demo-tests:
needs: build-artifact
strategy:
fail-fast: false
matrix:
test-group: [
{
name: "TGG demo tests",
arch: wormhole_b0,
runs-on: [arch-wormhole_b0, "config-tgg", "in-service", "runner-test", "bare-metal", "pipeline-functional"],
cmd: './tests/scripts/run_tests.sh --tt-arch wormhole_b0 --pipeline-type demos_tgg_device --dispatch-mode ""'
},
]
name: ${{ matrix.test-group.name }}
env:
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }}
ARCH_NAME: ${{ matrix.test-group.arch }}
LOGURU_LEVEL: INFO
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
environment: dev
runs-on: ${{ matrix.test-group.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.test-group.arch }}
- name: Extract files
run: tar -xvf ttm_${{ matrix.test-group.arch }}.tar
- uses: ./.github/actions/install-python-deps
- name: Run demo regression tests
timeout-minutes: 180
run: |
source ${{ github.workspace }}/python_env/bin/activate
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
${{ matrix.test-group.cmd }}
52 changes: 52 additions & 0 deletions .github/workflows/tgg-frequent-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "[TGG] TGG frequent tests"

on:
workflow_dispatch:
schedule:
- cron: "0 */8 * * *" # This cron schedule runs the workflow every 8 hours

jobs:
build-artifact:
uses: ./.github/workflows/build-artifact.yaml
with:
arch: '["wormhole_b0"]'
secrets: inherit
tgg-frequent-tests:
needs: build-artifact
strategy:
fail-fast: false
matrix:
test-group: [
{
name: "TGG frequent tests",
arch: wormhole_b0,
runs-on: [arch-wormhole_b0, "config-tgg", "in-service", "runner-test", "bare-metal", "pipeline-functional"],
cmd: './tests/scripts/run_tests.sh --tt-arch wormhole_b0 --pipeline-type frequent_tgg_device --dispatch-mode ""'
},
]
name: ${{ matrix.test-group.name }}
env:
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }}
ARCH_NAME: ${{ matrix.test-group.arch }}
LOGURU_LEVEL: INFO
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
environment: dev
runs-on: ${{ matrix.test-group.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.test-group.arch }}
- name: Extract files
run: tar -xvf ttm_${{ matrix.test-group.arch }}.tar
- uses: ./.github/actions/install-python-deps
- name: Run frequent regression tests
timeout-minutes: 60
run: |
source ${{ github.workspace }}/python_env/bin/activate
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
${{ matrix.test-group.cmd }}
87 changes: 87 additions & 0 deletions .github/workflows/tgg-model-perf-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: "[TGG] TGG model perf tests"

on:
workflow_dispatch:
schedule:
- cron: "0 */12 * * *" # This cron schedule runs the workflow every 12 hours

jobs:
build-artifact:
uses: ./.github/workflows/build-artifact.yaml
with:
arch: '["wormhole_b0"]'
secrets: inherit
tgg-model-perf-tests:
needs: build-artifact
strategy:
fail-fast: false
matrix:
test-group: [
{
name: "TGG LLM model perf tests",
model-type: "LLM",
arch: wormhole_b0,
runs-on: [arch-wormhole_b0, "config-tgg", "in-service", "runner-test", "bare-metal", "pipeline-perf"],
cmd: './tests/scripts/run_tests.sh --tt-arch wormhole_b0 --pipeline-type llm_model_perf_tgg_device --dispatch-mode ""'
},
{
name: "TGG CNN model perf tests",
model-type: "CNN",
arch: wormhole_b0,
runs-on: [arch-wormhole_b0, "config-tgg", "in-service", "runner-test", "bare-metal", "pipeline-perf"],
cmd: './tests/scripts/run_tests.sh --tt-arch wormhole_b0 --pipeline-type cnn_model_perf_tgg_device --dispatch-mode ""'
},
]
name: ${{ matrix.test-group.name }}
env:
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }}
ARCH_NAME: ${{ matrix.test-group.arch }}
LOGURU_LEVEL: INFO
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
environment: dev
runs-on: ${{ matrix.test-group.runs-on }}
steps:
- uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected]
- name: Enable performance mode
run: |
sudo cpupower frequency-set -g performance
- name: Ensure weka mount is active
run: |
sudo systemctl restart mnt-MLPerf.mount
sudo /etc/rc.local
ls -al /mnt/MLPerf/bit_error_tests
- name: Set up dynamic env vars for build
run: |
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
name: TTMetal_build_${{ matrix.test-group.arch }}
- name: Extract files
run: tar -xvf ttm_${{ matrix.test-group.arch }}.tar
- uses: ./.github/actions/install-python-deps
- name: Run model perf regression tests
timeout-minutes: 60
run: |
source ${{ github.workspace }}/python_env/bin/activate
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
${{ matrix.test-group.cmd }}
- name: Check perf report exists
id: check-perf-report
if: ${{ !cancelled() }}
run: |
ls -hal
export PERF_REPORT_FILENAME=Models_Perf_$(date +%Y_%m_%d).csv
ls -hal $PERF_REPORT_FILENAME
echo "perf_report_filename=$PERF_REPORT_FILENAME" >> "$GITHUB_OUTPUT"
- name: Upload perf report
if: ${{ !cancelled() && steps.check-perf-report.conclusion == 'success' }}
uses: actions/upload-artifact@v4
with:
name: perf-report-csv-${{ matrix.test-group.model-type }}-${{ matrix.test-group.arch }}-${{ matrix.test-group.machine-type }}
path: "${{ steps.check-perf-report.outputs.perf_report_filename }}"
- name: Disable performance mode
if: always()
run: |
sudo cpupower frequency-set -g ondemand
Loading

0 comments on commit f77c86b

Please sign in to comment.