-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into atulk/13593-PCC-PR
- Loading branch information
Showing
1,058 changed files
with
35,878 additions
and
9,306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
Checks: > | ||
bugprone-*, | ||
performance-*, | ||
modernize-*, | ||
readability-*, | ||
cppcoreguidelines-* | ||
-modernize-use-trailing-return-type | ||
CheckOptions: | ||
- key: readability-identifier-length.IgnoredVariableNames | ||
value: 'x|y|z|i|j|k|t|it|ix|itr|a|b' | ||
-*, | ||
google-build-using-namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,38 @@ on: | |
- "main" | ||
|
||
jobs: | ||
pre-commit: | ||
name: Run Pre-commit Hooks | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch all history so 'origin/main' is available | ||
fetch-refs: true # Ensure all refs are fetched | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Run Pre-commit | ||
uses: pre-commit/[email protected] | ||
with: | ||
extra_args: | | ||
--from-ref ${{ github.event_name == 'pull_request' && format('refs/remotes/origin/{0}', github.event.pull_request.base.ref) || 'HEAD^' }} \ | ||
--to-ref HEAD | ||
continue-on-error: false | ||
check-black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Do Nothing | ||
run: echo "Black is covered by pre-commit. This is a placeholder to be removed after updating branch restrictions." | ||
|
||
|
||
check-spdx-licenses: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -27,11 +59,6 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- name: Check kernel count in base metal is less than maximum | ||
run: if (( $(find tt_metal/kernels/ -type f | wc -l) > 7 )); then exit 1; fi | ||
check-black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: psf/[email protected] | ||
check-doc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -61,15 +88,56 @@ jobs: | |
run: | | ||
pip install pyyaml | ||
python tests/sweep_framework/framework/sweeps_workflow_verification.py | ||
cmake-version: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Check for changed CMake files | ||
id: changed-cmake-files | ||
uses: tj-actions/changed-files@c3a1bb2c992d77180ae65be6ae6c166cf40f857c | ||
with: | ||
files: | | ||
**/*.cmake | ||
**/CMakeLists.txt | ||
- uses: lukka/get-cmake@b516803a3c5fac40e2e922349d15cdebdba01e60 | ||
if: steps.changed-cmake-files.outputs.any_changed == 'true' | ||
with: | ||
cmakeVersion: "~3.16.0" | ||
- name: Check CMake version | ||
if: steps.changed-cmake-files.outputs.any_changed == 'true' | ||
run: cmake --version | ||
- name: Install LLVM and Clang | ||
if: steps.changed-cmake-files.outputs.any_changed == 'true' | ||
run: | | ||
wget https://apt.llvm.org/llvm.sh | ||
chmod u+x llvm.sh | ||
sudo ./llvm.sh 17 | ||
- name: Install deps | ||
if: steps.changed-cmake-files.outputs.any_changed == 'true' | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
run: | | ||
sudo apt update | ||
sudo xargs -a scripts/docker/requirements-22.04.txt apt install -y --no-install-recommends | ||
- name: Check CMake compatibility | ||
if: steps.changed-cmake-files.outputs.any_changed == 'true' | ||
env: | ||
ARCH_NAME: wormhole_b0 | ||
CMAKE_GENERATOR: Ninja | ||
# TODO: Use a lukka/run-cmake with a preset after upgrading to a more modern CMake | ||
run: | | ||
echo "Checking compatibility with $(cmake --version)" | ||
cmake -B build . | ||
clang-tidy: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/tenstorrent/tt-metal/tt-metalium/ubuntu-22.04-amd64:latest | ||
permissions: | ||
pull-requests: write | ||
# OPTIONAL: auto-closing conversations requires the `contents` permission | ||
contents: write | ||
# if: github.event_name == 'pull_request' # Only run this job on pull request events | ||
if : false | ||
if: github.event_name == 'pull_request' # Only run this job on pull request events | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -89,17 +157,17 @@ jobs: | |
sudo ln -s $(which clang-tidy-17) /usr/local/bin/clang-tidy | ||
- name: Prepare compile_commands.json | ||
run: | | ||
ARCH_NAME=grayskull cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON | ||
ARCH_NAME=grayskull cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON -DTT_METAL_BUILD_TESTS=ON -DTTNN_BUILD_TESTS=ON -DTT_UMD_BUILD_TESTS=ON -DTT_UNITY_BUILDS=OFF | ||
- name: Create results directory | ||
run: | | ||
mkdir clang-tidy-result | ||
- name: Analyze | ||
run: | | ||
git diff -U0 "$(git merge-base HEAD "upstream/${{ github.event.pull_request.base.ref }}")" | clang-tidy-diff-17.py -p1 -path build -export-fixes clang-tidy-result/fixes.yml -j4 | ||
timeout-minutes: 10 | ||
timeout-minutes: 5 | ||
continue-on-error: true | ||
- name: Run clang-tidy-pr-comments action | ||
uses: platisd/clang-tidy-pr-comments@837ad8077b1f554dab31a8a43e8bb12c89d2f144 | ||
uses: platisd/clang-tidy-pr-comments@1b7395ce6f5a4186acabbba24cdd1e846f001aa8 | ||
with: | ||
# The GitHub token (or a personal access token) | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Build TTNN C++ project | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
build-docker-image: | ||
uses: ./.github/workflows/build-docker-artifact.yaml | ||
secrets: inherit | ||
with: | ||
os: ubuntu-22.04-amd64 | ||
|
||
ttnn-project: | ||
needs: build-docker-image | ||
runs-on: | ||
- ubuntu-22.04 | ||
env: | ||
ARCH_NAME: wormhole_b0 | ||
|
||
steps: | ||
# Metalium | ||
- name: Clone Metalium | ||
uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected] | ||
- name: Generate docker tag | ||
id: generate-docker-tag | ||
uses: ./.github/actions/generate-docker-tag | ||
with: | ||
image: ubuntu-22.04-amd64 | ||
- name: Docker login | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: https://ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Pull docker image | ||
run: docker pull ${{ env.TT_METAL_DOCKER_IMAGE_TAG }} | ||
- name: Move Repo A to Subdirectory | ||
run: | | ||
mkdir metalium | ||
mv * metalium || true | ||
mv .git metalium/.git | ||
- name: Build Metalium | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: ${{ env.TT_METAL_DOCKER_IMAGE_TAG }} | ||
options: | | ||
--rm | ||
--tmpfs /tmp | ||
-u ${{ env.RUNNER_UID }}:${{ env.RUNNER_GID }} | ||
-v ${{ github.workspace }}/metalium:${{ github.workspace }} | ||
-v /etc/passwd:/etc/passwd:ro | ||
-v /etc/shadow:/etc/shadow:ro | ||
-v /etc/bashrc:/etc/bashrc:ro | ||
-e ARCH_NAME=${{ env.ARCH_NAME }} | ||
-w ${{ github.workspace }} | ||
run: | | ||
set -eu # basic shell hygiene | ||
./build_metal.sh --build-type Release | ||
# TTNN project | ||
- name: Checkout cpp-ttnn-project-template | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: tenstorrent/cpp-ttnn-project-template | ||
path: project | ||
- name: Build TTNN Project | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: ${{ env.TT_METAL_DOCKER_IMAGE_TAG }} | ||
options: | | ||
--rm | ||
--tmpfs /tmp | ||
-u ${{ env.RUNNER_UID }}:${{ env.RUNNER_GID }} | ||
-v ${{ github.workspace }}/metalium:${{ github.workspace }}/metalium | ||
-v ${{ github.workspace }}/project:${{ github.workspace }}/project | ||
-v /etc/passwd:/etc/passwd:ro | ||
-v /etc/shadow:/etc/shadow:ro | ||
-v /etc/bashrc:/etc/bashrc:ro | ||
-e ARCH_NAME=${{ env.ARCH_NAME }} | ||
-e TT_METAL_HOME=${{ github.workspace }}/metalium | ||
-w ${{ github.workspace }}/project | ||
run: | | ||
set -eu # basic shell hygiene | ||
mkdir -p build && cd build | ||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release .. | ||
ninja |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,6 @@ jobs: | |
# Use BM for microbenchmarks | ||
ARCH_NAME: ${{ matrix.runner-info.arch }} | ||
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib | ||
environment: dev | ||
runs-on: ${{ matrix.runner-info.runs-on }} | ||
steps: | ||
- uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,12 @@ jobs: | |
- cloud-virtual-machine | ||
steps: | ||
- uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected] | ||
- uses: ./.github/actions/retry-command | ||
with: | ||
timeout-seconds: 100 | ||
max-retries: 10 | ||
backoff-seconds: 60 | ||
command: ./.github/scripts/cloud_utils/mount_weka.sh | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: eager-dist-${{ matrix.os }}-${{ inputs.arch }} | ||
|
Oops, something went wrong.