Skip to content

Commit

Permalink
#9082: t3k demo with slack notifications for owners. split jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
ttmchiou committed Jun 25, 2024
1 parent ae7c15b commit 78cb691
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 59 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/t3000-demo-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,19 @@ jobs:
fail-fast: false
matrix:
test-group: [
{
name: "T3000 demo tests",
arch: wormhole_b0,
runs-on: [arch-wormhole_b0, "config-t3000", "in-service", "runner-test", "bare-metal", "pipeline-functional"],
cmd: './tests/scripts/run_tests.sh --tt-arch wormhole_b0 --pipeline-type demos_t3000_device --dispatch-mode ""'
},
{ name: "t3k falcon40b tests", arch: wormhole_b0, cmd: run_t3000_falcon40b_tests, timeout: 120, owner_id: U044T8U8DEF}, #Johanna Rock
{ name: "t3k falcon7b tests", arch: wormhole_b0, cmd: run_t3000_falcon7b_tests, timeout: 120, owner_id: U05RWH3QUPM}, #Salar Hosseini
{ name: "t3k mixtral tests", arch: wormhole_b0, cmd: run_t3000_mixtral_tests, timeout: 120, owner_id: U03PUAKE719}, # Miguel Tairum
]

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 }}
runs-on: [arch-wormhole_b0, "config-t3000", "in-service", "runner-test", "bare-metal", "pipeline-functional"]
steps:
- uses: tenstorrent-metal/metal-workflows/.github/actions/checkout-with-submodule-lfs@v2.0.0
- name: Enable performance mode
Expand All @@ -52,7 +50,13 @@ jobs:
source ${{ github.workspace }}/python_env/bin/activate
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
source ${{ github.workspace }}/tests/scripts/t3000/t3000_demo_tests_func.sh
${{ matrix.test-group.cmd }}
- uses: ./.github/actions/slack-report
if: ${{ failure() }}
with:
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
owner: ${{ matrix.test-group.owner_id }}
- name: Disable performance mode
if: always()
run: |
Expand Down
53 changes: 1 addition & 52 deletions tests/scripts/t3000/run_t3000_demo_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,7 @@
#/bin/bash
set -eo pipefail

run_t3000_falcon40b_tests() {
# Record the start time
start_time=$(date +%s)

echo "LOG_METAL: Running run_t3000_falcon40b_tests"

# Falcon40B prefill 60 layer end to end with 10 loops; we need 8x8 grid size
WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest models/demos/t3000/falcon40b/tests/ci/test_falcon_end_to_end_60_layer_t3000_prefill_10_loops.py

# Falcon40B end to end demo (prefill + decode)
WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest models/demos/t3000/falcon40b/tests/ci/test_falcon_end_to_end_t3000_demo_loops.py

# Record the end time
end_time=$(date +%s)
duration=$((end_time - start_time))
echo "LOG_METAL: run_t3000_falcon40b_tests $duration seconds to complete"
}

run_t3000_falcon7b_tests(){
# Record the start time
start_time=$(date +%s)

echo "LOG_METAL: Running run_t3000_falcon7b_tests"

# Falcon7B demo (perf verification and output verification)
WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest --disable-warnings -q -s --input-method=json --input-path='models/demos/t3000/falcon7b/input_data_t3000.json' models/demos/t3000/falcon7b/demo_t3000.py::test_demo_multichip[user_input0-8-True-perf_mode_stochastic_verify]
WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest --disable-warnings -q -s --input-method=json --input-path='models/demos/t3000/falcon7b/input_data_t3000.json' models/demos/t3000/falcon7b/demo_t3000.py::test_demo_multichip[user_input0-8-True-default_mode_greedy_verify]

# Falcon7B perplexity test (prefill and decode)
WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest models/demos/falcon7b/tests/test_perplexity_falcon.py::test_perplexity[True-prefill_seq1024_dram]
WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest models/demos/falcon7b/tests/test_perplexity_falcon.py::test_perplexity[True-decode_1024_l1_sharded]

# Record the end time
end_time=$(date +%s)
duration=$((end_time - start_time))
echo "LOG_METAL: run_t3000_falcon7b_tests $duration seconds to complete"
}

run_t3000_mixtral_tests() {
# Record the start time
start_time=$(date +%s)

echo "LOG_METAL: Running run_t3000_mixtral8x7b_tests"

# mixtral8x7b 8 chip demo test - 100 token generation with general weights (env flags set inside the test)
pytest models/demos/t3000/mixtral8x7b/demo/demo.py::test_mixtral8x7b_demo[wormhole_b0-True-general_weights]

# Record the end time
end_time=$(date +%s)
duration=$((end_time - start_time))
echo "LOG_METAL: run_t3000_mixtral_tests $duration seconds to complete"
}
source ./t3000_demo_tests_func.sh

run_t3000_tests() {
# Run falcon40b tests
Expand Down
54 changes: 54 additions & 0 deletions tests/scripts/t3000/t3000_demo_tests_func.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash

run_t3000_falcon40b_tests() {
# Record the start time
start_time=$(date +%s)

echo "LOG_METAL: Running run_t3000_falcon40b_tests"

# Falcon40B prefill 60 layer end to end with 10 loops; we need 8x8 grid size
WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest models/demos/t3000/falcon40b/tests/ci/test_falcon_end_to_end_60_layer_t3000_prefill_10_loops.py

# Falcon40B end to end demo (prefill + decode)
WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest models/demos/t3000/falcon40b/tests/ci/test_falcon_end_to_end_t3000_demo_loops.py

# Record the end time
end_time=$(date +%s)
duration=$((end_time - start_time))
echo "LOG_METAL: run_t3000_falcon40b_tests $duration seconds to complete"
}

run_t3000_falcon7b_tests(){
# Record the start time
start_time=$(date +%s)

echo "LOG_METAL: Running run_t3000_falcon7b_tests"

# Falcon7B demo (perf verification and output verification)
WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest --disable-warnings -q -s --input-method=json --input-path='models/demos/t3000/falcon7b/input_data_t3000.json' models/demos/t3000/falcon7b/demo_t3000.py::test_demo_multichip[user_input0-8-True-perf_mode_stochastic_verify]
WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest --disable-warnings -q -s --input-method=json --input-path='models/demos/t3000/falcon7b/input_data_t3000.json' models/demos/t3000/falcon7b/demo_t3000.py::test_demo_multichip[user_input0-8-True-default_mode_greedy_verify]

# Falcon7B perplexity test (prefill and decode)
WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest models/demos/falcon7b/tests/test_perplexity_falcon.py::test_perplexity[True-prefill_seq1024_dram]
WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest models/demos/falcon7b/tests/test_perplexity_falcon.py::test_perplexity[True-decode_1024_l1_sharded]

# Record the end time
end_time=$(date +%s)
duration=$((end_time - start_time))
echo "LOG_METAL: run_t3000_falcon7b_tests $duration seconds to complete"
}

run_t3000_mixtral_tests() {
# Record the start time
start_time=$(date +%s)

echo "LOG_METAL: Running run_t3000_mixtral8x7b_tests"

# mixtral8x7b 8 chip demo test - 100 token generation with general weights (env flags set inside the test)
pytest models/demos/t3000/mixtral8x7b/demo/demo.py::test_mixtral8x7b_demo[wormhole_b0-True-general_weights]

# Record the end time
end_time=$(date +%s)
duration=$((end_time - start_time))
echo "LOG_METAL: run_t3000_mixtral_tests $duration seconds to complete"
}

0 comments on commit 78cb691

Please sign in to comment.