Skip to content

Commit

Permalink
mini apc
Browse files Browse the repository at this point in the history
  • Loading branch information
williamlyTT committed Feb 24, 2025
1 parent 6b13720 commit 867bae5
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 75 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/cpp-post-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,23 @@ jobs:
fail-fast: false
matrix:
test-group: [
{name: All C++, cmd: ./tests/scripts/run_cpp_unit_tests.sh},
{name: tools, cmd: ./tests/scripts/run_tools_tests.sh},
# {name: All C++, cmd: ./tests/scripts/run_cpp_unit_tests.sh},
# {name: tools, cmd: ./tests/scripts/run_tools_tests.sh},

{name: user kernel path, cmd: "rm -rf /tmp/kernels && TT_METAL_KERNEL_PATH=/tmp/kernels ./build/test/tt_metal/unit_tests_api_${{ inputs.arch }} --gtest_filter=CompileProgramWithKernelPathEnvVarFixture.*"},
{name: api, cmd: "./build/test/tt_metal/unit_tests_api_${{ inputs.arch }}"},
# {name: user kernel path, cmd: "rm -rf /tmp/kernels && TT_METAL_KERNEL_PATH=/tmp/kernels ./build/test/tt_metal/unit_tests_api_${{ inputs.arch }} --gtest_filter=CompileProgramWithKernelPathEnvVarFixture.*"},
# {name: api, cmd: "./build/test/tt_metal/unit_tests_api_${{ inputs.arch }}"},
{name: debug_tools, cmd: "./build/test/tt_metal/unit_tests_debug_tools_${{ inputs.arch }}"},
{name: device, cmd: "./build/test/tt_metal/unit_tests_device"},
{name: dispatch, cmd: "./build/test/tt_metal/unit_tests_dispatch"},
# {name: device, cmd: "./build/test/tt_metal/unit_tests_device"},
# {name: dispatch, cmd: "./build/test/tt_metal/unit_tests_dispatch"},
{name: eth, cmd: "./build/test/tt_metal/unit_tests_eth_${{ inputs.arch }}"},
{name: llk, cmd: "./build/test/tt_metal/unit_tests_llk"},
{name: stl, cmd: "./build/test/tt_metal/unit_tests_stl"},
{name: distributed, cmd: "./build/test/tt_metal/distributed/distributed_unit_tests_${{ inputs.arch }}"},
{name: lightmetal, cmd: "./build/test/tt_metal/unit_tests_lightmetal"},
{name: dispatch multicmd queue, cmd: "TT_METAL_GTEST_NUM_HW_CQS=2 ./build/test/tt_metal/unit_tests_dispatch --gtest_filter=MultiCommandQueue*Fixture.*"},
{name: ttnn cpp unit tests, cmd: ./build/test/ttnn/unit_tests_ttnn},
# {name: llk, cmd: "./build/test/tt_metal/unit_tests_llk"},
# {name: stl, cmd: "./build/test/tt_metal/unit_tests_stl"},
# {name: distributed, cmd: "./build/test/tt_metal/distributed/distributed_unit_tests_${{ inputs.arch }}"},
# {name: lightmetal, cmd: "./build/test/tt_metal/unit_tests_lightmetal"},
# {name: dispatch multicmd queue, cmd: "TT_METAL_GTEST_NUM_HW_CQS=2 ./build/test/tt_metal/unit_tests_dispatch --gtest_filter=MultiCommandQueue*Fixture.*"},
# {name: ttnn cpp unit tests, cmd: ./build/test/ttnn/unit_tests_ttnn},
{name: ttnn ccl cpp unit tests, cmd: ./build/test/ttnn/unit_tests_ttnn_ccl},
{name: ttnn tensor cpp unit tests, cmd: ./build/test/ttnn/unit_tests_ttnn_tensor},
# {name: ttnn tensor cpp unit tests, cmd: ./build/test/ttnn/unit_tests_ttnn_tensor},
]
name: ${{ matrix.test-group.name }} ${{ inputs.arch }} ${{ inputs.runner-label }}
env:
Expand All @@ -76,7 +76,7 @@ jobs:
runs-on:
- ${{ inputs.runner-label }}
- cloud-virtual-machine
- in-service
# - in-service
steps:
- uses: tenstorrent/tt-metal/.github/actions/checkout-with-submodule-lfs@main
- uses: ./.github/actions/prepare-metal-run
Expand Down
99 changes: 63 additions & 36 deletions .github/workflows/test-dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,41 +53,68 @@ jobs:
with:
build-type: ${{ inputs.build-type }}
tracy: ${{ inputs.tracy }}
build-wheel: true
secrets: inherit
test-dispatch:
# needs: setup
cpp-unit-tests:
needs: build-artifact
timeout-minutes: 1440
env:
ARCH_NAME: ${{ inputs.arch }}
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
runs-on: ${{ fromJSON(inputs.runner-label) }}
steps:
- uses: tenstorrent/tt-metal/.github/actions/checkout-with-submodule-lfs@main
- uses: ./.github/actions/ensure-active-weka-mount
timeout-minutes: 3
if: ${{ inputs.arch != 'blackhole' }}
- name: Set up dyanmic env vars for build
run: |
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
name: TTMetal_build_any${{ (inputs.tracy && '_profiler') || '' }}
- name: Extract files
run: tar -xvf ttm_any.tar
- uses: ./.github/actions/install-python-deps
- name: Run pre/post regression tests in a loop
run: |
source ${{ github.workspace }}/python_env/bin/activate
pip install pytest-repeat
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
for i in {1..10}; do
echo "iteration: $i"
tt-smi-metal -r0
./build/test/ttnn/unit_tests_ttnn_ccl
tt-smi-metal -r0
pytest tests/ttnn/unit_tests -xv --exclude-warning-annotations -m requires_fast_runtime_mode_off
tt-smi-metal -r0
pytest tests/tt_eager/python_api_testing/unit_testing/ -xvvv --splits 7 --group 1 --exclude-warning-annotations
done
secrets: inherit
strategy:
fail-fast: false
matrix:
test-group: [
{ arch: wormhole_b0, runner-label: N150 },
]
uses: ./.github/workflows/cpp-post-commit.yaml
with:
arch: ${{ matrix.test-group.arch }}
runner-label: ${{ matrix.test-group.runner-label }}
ttnn-unit-tests:
needs: [build-artifact, cpp-unit-tests]
secrets: inherit
strategy:
fail-fast: false
matrix:
test-group: [
{ arch: wormhole_b0, runner-label: N150 },
]
uses: ./.github/workflows/ttnn-post-commit.yaml
with:
arch: ${{ matrix.test-group.arch }}
runner-label: ${{ matrix.test-group.runner-label }}
# test-dispatch:
# # needs: setup
# needs: build-artifact
# timeout-minutes: 1440
# env:
# ARCH_NAME: ${{ inputs.arch }}
# LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
# runs-on: ${{ fromJSON(inputs.runner-label) }}
# steps:
# - uses: tenstorrent/tt-metal/.github/actions/checkout-with-submodule-lfs@main
# - uses: ./.github/actions/ensure-active-weka-mount
# timeout-minutes: 3
# if: ${{ inputs.arch != 'blackhole' }}
# - name: Set up dyanmic env vars for build
# run: |
# echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
# - uses: actions/download-artifact@v4
# with:
# name: TTMetal_build_any${{ (inputs.tracy && '_profiler') || '' }}
# - name: Extract files
# run: tar -xvf ttm_any.tar
# - uses: ./.github/actions/install-python-deps
# - name: Run pre/post regression tests in a loop
# run: |
# source ${{ github.workspace }}/python_env/bin/activate
# pip install pytest-repeat
# cd $TT_METAL_HOME
# export PYTHONPATH=$TT_METAL_HOME
# for i in {1..10}; do
# echo "iteration: $i"
# tt-smi-metal -r0
# ./build/test/ttnn/unit_tests_ttnn_ccl
# tt-smi-metal -r0
# pytest tests/ttnn/unit_tests -xv --exclude-warning-annotations -m requires_fast_runtime_mode_off
# tt-smi-metal -r0
# pytest tests/tt_eager/python_api_testing/unit_testing/ -xvvv --splits 7 --group 1 --exclude-warning-annotations
# done
50 changes: 25 additions & 25 deletions .github/workflows/ttnn-post-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,41 +51,41 @@ jobs:
matrix:
os: ["ubuntu-20.04"]
test-group:
- name: ttnn group 1
cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 1 -m "not disable_fast_runtime_mode"
- name: ttnn group 2
cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 2 -m "not disable_fast_runtime_mode"
# - name: ttnn group 1
# cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 1 -m "not disable_fast_runtime_mode"
# - name: ttnn group 2
# cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 2 -m "not disable_fast_runtime_mode"
- name: ttnn group 3
cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 3 -m "not disable_fast_runtime_mode"
- name: ttnn group 4
cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 4 -m "not disable_fast_runtime_mode"
- name: ttnn group 5
cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 5 -m "not disable_fast_runtime_mode"
- name: ttnn group 6
cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 6 -m "not disable_fast_runtime_mode"
- name: ttnn group 7
cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 7 -m "not disable_fast_runtime_mode"
- name: ttnn group 8
cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 8 -m "not disable_fast_runtime_mode"
- name: ttnn group 9
cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 9 -m "not disable_fast_runtime_mode"
- name: ttnn group 10
cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 10 -m "not disable_fast_runtime_mode"
- name: ttnn group 11
cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 11 -m "not disable_fast_runtime_mode"
- name: ttnn group 12
cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 12 -m "not disable_fast_runtime_mode"
# - name: ttnn group 4
# cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 4 -m "not disable_fast_runtime_mode"
# - name: ttnn group 5
# cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 5 -m "not disable_fast_runtime_mode"
# - name: ttnn group 6
# cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 6 -m "not disable_fast_runtime_mode"
# - name: ttnn group 7
# cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 7 -m "not disable_fast_runtime_mode"
# - name: ttnn group 8
# cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 8 -m "not disable_fast_runtime_mode"
# - name: ttnn group 9
# cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 9 -m "not disable_fast_runtime_mode"
# - name: ttnn group 10
# cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 10 -m "not disable_fast_runtime_mode"
# - name: ttnn group 11
# cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 11 -m "not disable_fast_runtime_mode"
# - name: ttnn group 12
# cmd: pytest tests/ttnn/unit_tests -xv --splits ${{ inputs.num-groups }} --exclude-warning-annotations --group 12 -m "not disable_fast_runtime_mode"
- name: ttnn fast runtime off
cmd: pytest tests/ttnn/unit_tests -xv --exclude-warning-annotations -m requires_fast_runtime_mode_off
fast_runtime_mode_off: true
- name: ttnn example tests
cmd: ./tests/scripts/run_ttnn_examples.sh
# - name: ttnn example tests
# cmd: ./tests/scripts/run_ttnn_examples.sh
name: ${{ matrix.test-group.name }} ${{ inputs.arch }} ${{ inputs.runner-label }}
env:
LOGURU_LEVEL: INFO
runs-on:
- ${{ inputs.runner-label }}
- "in-service"
# - "in-service"
steps:
- uses: tenstorrent/tt-metal/.github/actions/checkout-with-submodule-lfs@main
- uses: actions/download-artifact@v4
Expand Down

0 comments on commit 867bae5

Please sign in to comment.