Skip to content

Commit

Permalink
Merge branch 'main' into cglagovich/16667
Browse files Browse the repository at this point in the history
  • Loading branch information
cglagovichTT authored Jan 16, 2025
2 parents 9bdc605 + 0f3e4ed commit 1948df6
Show file tree
Hide file tree
Showing 1,419 changed files with 9,934 additions and 4,131 deletions.
1 change: 1 addition & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ tests/tt_metal/test_utils/env_vars.hpp
tests/tt_metal/tt_metal/api/allocator/test_free_list_opt_allocator.cpp
tests/tt_metal/tt_metal/api/test_global_semaphores.cpp
tests/tt_metal/tt_metal/dispatch/sub_device_test_utils.hpp
tests/tt_metal/tt_metal/perf_microbenchmark/dispatch/pgm_dispatch_golden.json
tests/tt_metal/tt_metal/perf_microbenchmark/10_dram_read_remote_cb_sync/test_dram_read_remote_cb.cpp
tests/tt_metal/tt_metal/perf_microbenchmark/11_remote_cb_sync_matmul_single_core/test_remote_cb_sync_matmul.cpp
tests/tt_metal/tt_metal/perf_microbenchmark/routing/kernels/traffic_gen_rx.cpp
Expand Down
9 changes: 3 additions & 6 deletions .github/actions/prepare-metal-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Prepare Metal Run
description: "Installs Python Dependencies from cache or from PyPI if cache is not available."

inputs:
arch:
description: "The architecture to use"
required: true
is_profiler:
description: "Whether to load with profiler"
required: false
Expand All @@ -24,14 +21,14 @@ runs:
- uses: actions/download-artifact@v4
if: ${{ inputs.is_profiler == 'false' }}
with:
name: TTMetal_build_${{ inputs.arch }}
name: TTMetal_build_any
- uses: actions/download-artifact@v4
if: ${{ inputs.is_profiler == 'true' }}
with:
name: TTMetal_build_${{ inputs.arch }}_profiler
name: TTMetal_build_any_profiler
- name: Extract files
shell: bash
run: tar -xvf ttm_${{ inputs.arch }}.tar
run: tar -xvf ttm_any.tar
- uses: ./.github/actions/install-python-deps
with:
python-version: ${{ inputs.python-version }}
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/_build-wheels-impl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
os:
required: True
type: string
arch:
required: True
type: string
from-precompiled:
required: True
default: True
Expand All @@ -17,8 +14,6 @@ on:
jobs:
build-wheel:
runs-on: ${{ inputs.os }}
env:
ARCH_NAME: ${{ inputs.arch }}
steps:
- uses: tenstorrent/tt-metal/.github/actions/checkout-with-submodule-lfs@main
with:
Expand Down Expand Up @@ -57,7 +52,6 @@ jobs:
- uses: ./.github/actions/prepare-metal-run
if: ${{ inputs.from-precompiled }}
with:
arch: ${{ inputs.arch }}
python-version: ${{ env.python-version }}
- name: Set precompiled dir for precompile builds
if: ${{ inputs.from-precompiled }}
Expand All @@ -69,5 +63,5 @@ jobs:
- name: Upload distribution as artifact
uses: actions/upload-artifact@v4
with:
name: eager-dist-${{ inputs.os }}-${{ inputs.arch }}
name: eager-dist-${{ inputs.os }}-any
path: dist/
4 changes: 2 additions & 2 deletions .github/workflows/_test-wheels-impl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
os: ${{ matrix.os }}
- uses: actions/download-artifact@v4
with:
name: eager-dist-${{ matrix.os }}-${{ matrix.runner-hw-info.arch }}
name: eager-dist-${{ matrix.os }}-any
- name: Set up end-to-end tests environment
run: ./tests/scripts/set_up_end_to_end_tests_env.sh
- name: Activate env and run release tests - host
Expand All @@ -61,7 +61,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: eager-dist-${{ matrix.os }}-${{ matrix.runner-hw-info.arch }}
name: eager-dist-${{ matrix.os }}-any
- name: Set up end-to-end tests environment
run: ./tests/scripts/set_up_end_to_end_tests_env.sh
- name: Activate env and run release tests - silicon
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/all-post-commit-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ jobs:
# Since pre-compiled builds only run on 20.04, we can only test on 20.04 for now
# The full 22.04 flow can be tested without precompiled
os: [ubuntu-20.04]
arch: [grayskull, wormhole_b0]
uses: ./.github/workflows/_build-wheels-impl.yaml
with:
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
from-precompiled: true
secrets: inherit
test-wheels:
Expand Down Expand Up @@ -74,9 +72,9 @@ jobs:
needs: build-docker-image-2004
uses: ./.github/workflows/build-artifact.yaml
with:
tracy: true
build-docker: false
build-type: ${{ inputs.build-type || 'Release' }}
tracy: true
secrets: inherit
# Slow Dispatch Unit Tests
sd-unit-tests:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/bisect-dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ run-name: ${{ inputs.description }}
jobs:
build-artifact:
uses: ./.github/workflows/build-artifact.yaml
with:
arch: '[ "${{ inputs.arch }}" ]'
secrets: inherit
test-dispatch:
needs: build-artifact
Expand All @@ -50,9 +48,9 @@ jobs:
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
name: TTMetal_build_${{ inputs.arch }}
name: TTMetal_build_any
- name: Extract files
run: tar -xvf ttm_${{ inputs.arch }}.tar
run: tar -xvf ttm_any.tar
- uses: ./.github/actions/install-python-deps
- name: Run pre/post regression tests in a loop
run: |
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/blackhole-post-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,13 @@ jobs:
secrets: inherit
with:
os: "ubuntu-22.04-amd64"
arch: '["blackhole"]'
build-docker: false
build-wheels:
needs: build-artifact
uses: ./.github/workflows/_build-wheels-impl.yaml
with:
os: "ubuntu-22.04"
arch: "blackhole"
from-precompiled: true
# build-artifact-profiler:
# uses: ./.github/workflows/build-artifact.yaml
# with:
# profiler-build: true
# secrets: inherit
umd-unit-tests:
secrets: inherit
uses: ./.github/workflows/umd-unit-tests.yaml
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build-and-test-wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ jobs:
# Since pre-compiled builds only run on 20.04, we can only test on 20.04 for now
# The full 22.04 flow can be tested without precompiled
os: ${{ fromJson((github.event_name == 'schedule' || inputs.from-precompiled) && '["ubuntu-20.04"]' || '["ubuntu-20.04", "ubuntu-22.04"]') }}
arch: [grayskull, wormhole_b0]
uses: ./.github/workflows/_build-wheels-impl.yaml
with:
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
from-precompiled: ${{ inputs.from-precompiled }}
test-wheels:
needs: build-wheels
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build-and-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ jobs:
steps:
- uses: tenstorrent/tt-metal/.github/actions/checkout-with-submodule-lfs@main
- uses: ./.github/actions/prepare-metal-run
with:
arch: ${{ inputs.arch }}
- name: ${{ matrix.test-group.name }} tests
timeout-minutes: ${{ inputs.timeout }}
uses: ./.github/actions/docker-run
Expand Down
20 changes: 3 additions & 17 deletions .github/workflows/build-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: "Build tt-metal artifacts"
on:
workflow_call:
inputs:
arch:
required: false
type: string
default: '["grayskull", "wormhole_b0"]'
build-type:
required: false
type: string
Expand All @@ -32,10 +28,6 @@ on:
type: boolean
default: true
description: "Build docker image"
arch:
required: false
type: string
default: '["grayskull", "wormhole_b0"]'
build-type:
required: false
type: string
Expand Down Expand Up @@ -63,12 +55,7 @@ jobs:
needs: build-docker-image
if: always()
timeout-minutes: 30
strategy:
matrix:
arch: ${{ fromJson(inputs.arch || '["grayskull", "wormhole_b0", "blackhole"]') }}
env:
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }}
ARCH_NAME: ${{ matrix.arch }}
SILENT: 0
VERBOSE: 1
runs-on:
Expand Down Expand Up @@ -123,7 +110,6 @@ jobs:
-v /etc/bashrc:/etc/bashrc:ro
-v /home/ubuntu/.ccache-ci:/home/ubuntu/.ccache
-v /mnt/MLPerf/ccache:/mnt/MLPerf/ccache
-e ARCH_NAME=${{ matrix.arch }}
-e CARGO_HOME=${{ github.workspace }}/.cargo
-w ${{ github.workspace }}
run: |
Expand Down Expand Up @@ -151,9 +137,9 @@ jobs:
cat build/ccache.stats >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- name: 'Tar files'
run: tar -cvhf ttm_${{ matrix.arch }}.tar ttnn/ttnn/*.so build/lib ttnn/ttnn/*.so build/programming_examples build/test build/tools build/tt-train data runtime
run: tar -cvhf ttm_any.tar ttnn/ttnn/*.so build/lib ttnn/ttnn/*.so build/programming_examples build/test build/tools build/tt-train data runtime
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: TTMetal_build_${{ matrix.arch }}${{ (inputs.tracy && '_profiler') || '' }}
path: ttm_${{ matrix.arch }}.tar
name: TTMetal_build_any${{ (inputs.tracy && '_profiler') || '' }}
path: ttm_any.tar
5 changes: 1 addition & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ jobs:
#{type: RelWithDebInfo, cxx_compiler: g++-12, c_compiler: gcc-12, runs-on: ["build", "in-service"], os: ubuntu-22.04},
{type: Release, cxx_compiler: g++-12, c_compiler: gcc-12, runs-on: ["build", "in-service"], os: ubuntu-22.04},
]
arch: [grayskull, wormhole_b0, blackhole]
env:
ARCH_NAME: ${{ matrix.arch }}
# So we can get all the makefile output we want
VERBOSE: 1
runs-on: ${{ matrix.build.runs-on }}
name: ${{ matrix.build.type }} ${{ matrix.build.cxx_compiler }} ${{ matrix.arch }} ${{ matrix.build.os }}
name: ${{ matrix.build.type }} ${{ matrix.build.cxx_compiler }} any ${{ matrix.build.os }}
steps:
- name: Verify ccache availability
shell: bash
Expand All @@ -51,7 +49,6 @@ jobs:
docker_username: ${{ github.actor }}
docker_password: ${{ secrets.GITHUB_TOKEN }}
docker_opts: |
-e ARCH_NAME=${{ matrix.arch }}
--group-add 1457
-v /home/ubuntu/.ccache-ci:/home/ubuntu/.ccache
-e CCACHE_DIR=/home/ubuntu/.ccache
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/cpp-post-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ jobs:
steps:
- uses: tenstorrent/tt-metal/.github/actions/checkout-with-submodule-lfs@main
- uses: ./.github/actions/prepare-metal-run
with:
arch: ${{ inputs.arch }}
- name: ${{ matrix.test-group.name }} tests
#GH Issue 16167
if: ${{ !(inputs.runner-label == 'BH' && matrix.test-group.name == 'tools') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-latest-public.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
os: ubuntu-20.04
- uses: actions/download-artifact@v4
with:
name: TTMetal_build_${{ matrix.arch }}
name: TTMetal_build_any
- name: Extract files
run: tar -xvf ttm_${{ matrix.arch }}.tar
run: tar -xvf ttm_any.tar
- uses: ./.github/actions/install-python-deps
- name: Build Docs
timeout-minutes: 15
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ jobs:
os: ubuntu-20.04
- uses: actions/download-artifact@v4
with:
name: TTMetal_build_${{ matrix.arch }}
name: TTMetal_build_any
- name: Extract files
run: tar -xvf ttm_${{ matrix.arch }}.tar
run: tar -xvf ttm_any.tar
- uses: ./.github/actions/install-python-deps
- name: Build Doxygen Docs
timeout-minutes: 15
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/fast-dispatch-build-and-unit-tests-wrapper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ jobs:
needs: build-docker-artifact
uses: ./.github/workflows/build-artifact.yaml
secrets: inherit
build-wheels:
needs: build-artifact
strategy:
matrix:
# Since pre-compiled builds only run on 20.04, we can only test on 20.04 for now
# The full 22.04 flow can be tested without precompiled
os: [ubuntu-20.04]
uses: ./.github/workflows/_build-wheels-impl.yaml
with:
os: ${{ matrix.os }}
from-precompiled: true
secrets: inherit
# FD Unit Tests
fast-dispatch-unit-tests:
needs: build-artifact
needs: build-wheels
secrets: inherit
strategy:
fail-fast: false
Expand All @@ -29,7 +41,7 @@ jobs:
runner-label: ${{ matrix.test-group.runner-label}}
# TTNN FD Unit tests
ttnn-unit-tests:
needs: build-artifact
needs: build-wheels
secrets: inherit
strategy:
fail-fast: false
Expand All @@ -46,7 +58,7 @@ jobs:

# FD Model Tests
models-unit-tests:
needs: build-artifact
needs: build-wheels
secrets: inherit
strategy:
fail-fast: false
Expand All @@ -63,7 +75,7 @@ jobs:

# FD C++ Unit Tests
cpp-unit-tests:
needs: build-artifact
needs: build-wheels
secrets: inherit
strategy:
fail-fast: false
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/fast-dispatch-build-and-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,16 @@ jobs:
- uses: tenstorrent/tt-metal/.github/actions/checkout-with-submodule-lfs@main
- uses: actions/download-artifact@v4
with:
name: eager-dist-${{ matrix.os }}-${{ inputs.arch }}
name: eager-dist-${{ matrix.os }}-any
- name: ${{ matrix.test-group.name }} tests
timeout-minutes: ${{ inputs.timeout }}
uses: ./.github/actions/docker-run
with:
docker_os_arch: tt-metalium/${{ inputs.os }}-amd64
install_wheel: true
docker_password: ${{ secrets.GITHUB_TOKEN }}
docker_opts: |
-e ARCH_NAME=${{ inputs.arch }}
run_args: |
${{ matrix.test-group.cmd }}
- uses: ./.github/actions/slack-report
Expand Down
Loading

0 comments on commit 1948df6

Please sign in to comment.