-
Notifications
You must be signed in to change notification settings - Fork 97
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 llama3/sharded-residual
- Loading branch information
Showing
497 changed files
with
27,712 additions
and
4,140 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
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 |
---|---|---|
|
@@ -27,6 +27,17 @@ jobs: | |
runs-on: ${{ matrix.build.runs-on }} | ||
name: ${{ matrix.build.type }} ${{ matrix.build.cxx_compiler }} ${{ matrix.arch }} ${{ matrix.build.os }} | ||
steps: | ||
- name: Verify ccache availability | ||
shell: bash | ||
run: | | ||
if [ ! -d "/mnt/MLPerf/ccache" ]; then | ||
echo "::error title=ccache-mlperf-not-mounted::NFS drive is not mounted; build machine not properly provisioned." | ||
exit 1 | ||
fi | ||
if [ ! -d "$HOME/.ccache-ci" ]; then | ||
echo "::error title=ccache-not-provisioned::Ccache is not properly provisioned." | ||
exit 1 | ||
fi | ||
- uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected] | ||
- name: Set up dynamic env vars for build | ||
run: | | ||
|
@@ -41,11 +52,41 @@ jobs: | |
docker_image_arch: ${{ inputs.arch }} | ||
docker_opts: | | ||
-e ARCH_NAME=${{ matrix.arch }} | ||
--group-add 1457 | ||
-v /home/ubuntu/.ccache-ci:/home/ubuntu/.ccache | ||
-e CCACHE_DIR=/home/ubuntu/.ccache | ||
-v /mnt/MLPerf/ccache:/mnt/MLPerf/ccache | ||
docker_os_arch: ${{ matrix.build.os }}-amd64 | ||
run_args: | | ||
nice -n 19 cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build.type }} -DCMAKE_CXX_COMPILER=${{ matrix.build.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.build.c_compiler }} -G Ninja -DTT_METAL_BUILD_TESTS=ON -DTTNN_BUILD_TESTS=ON -DTT_UMD_BUILD_TESTS=ON | ||
nice -n 19 cmake --build build | ||
set -eu # basic shell hygiene | ||
set -x | ||
# /tmp is a tmpfs; more efficient than persisted storage | ||
mkdir -p /tmp/ccache | ||
export CCACHE_TEMPDIR=/tmp/ccache | ||
ccache --version | ||
ccache --show-config | ||
ccache --show-stats | ||
# Zero out the stats so we can see how we did this build | ||
# NOTE: may be inaccurate if we have >1 build runner on the same machine, using the same local cache | ||
ccache -z | ||
build_command="./build_metal.sh --build-type ${{ matrix.build.type }} --cxx-compiler-path ${{ matrix.build.cxx_compiler }} --c-compiler-path ${{ matrix.build.c_compiler }} --build-tests --build-programming-examples --disable-unity-builds --enable-ccache" | ||
nice -n 19 $build_command | ||
ccache --show-stats | ||
mkdir out | ||
ccache -s > out/ccache.stats | ||
cat out/ccache.stats | ||
- name: Publish Ccache summary | ||
run: | | ||
cat out/ccache.stats | ||
echo '## CCache Summary' >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
cat out/ccache.stats >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
- name: Check disk space | ||
run: | | ||
df -h | ||
|
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,105 @@ | ||
name: "Code analysis" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: false | ||
type: string | ||
default: "ubuntu-22.04-amd64" | ||
workflow_dispatch: | ||
inputs: | ||
os: | ||
required: false | ||
type: string | ||
default: "ubuntu-22.04-amd64" | ||
|
||
jobs: | ||
build-docker-image: | ||
uses: ./.github/workflows/build-docker-artifact.yaml | ||
secrets: inherit | ||
with: | ||
os: ${{ inputs.os }} | ||
|
||
|
||
clang-tidy: | ||
needs: build-docker-image | ||
env: | ||
ARCH_NAME: wormhole_b0 | ||
runs-on: | ||
- build | ||
- in-service | ||
steps: | ||
- name: Verify ccache availability | ||
shell: bash | ||
run: | | ||
if [ ! -d "/mnt/MLPerf/ccache" ]; then | ||
echo "::error title=ccache-mlperf-not-mounted::NFS drive is not mounted; build machine not properly provisioned." | ||
exit 1 | ||
fi | ||
if [ ! -d "$HOME/.ccache-ci" ]; then | ||
echo "::error title=ccache-not-provisioned::Ccache is not properly provisioned." | ||
exit 1 | ||
fi | ||
- 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 | ||
echo "RUNNER_UID=$(id -u)" >> $GITHUB_ENV | ||
echo "RUNNER_GID=$(id -g)" >> $GITHUB_ENV | ||
- name: Update submodules | ||
run: | | ||
git submodule update --init --recursive | ||
- name: Generate docker tag | ||
id: generate-docker-tag | ||
uses: ./.github/actions/generate-docker-tag | ||
with: | ||
image: ${{ inputs.os }} | ||
- 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: Analyze code with clang-tidy | ||
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 }} | ||
--group-add 1457 | ||
-v ${{ github.workspace }}:${{ github.workspace }} | ||
-v /etc/passwd:/etc/passwd:ro | ||
-v /etc/shadow:/etc/shadow:ro | ||
-v /etc/bashrc:/etc/bashrc:ro | ||
-v /home/ubuntu/.ccache-ci:/home/ubuntu/.ccache | ||
-v /mnt/MLPerf/ccache:/mnt/MLPerf/ccache | ||
-e ARCH_NAME=${{ env.ARCH_NAME }} | ||
-e CARGO_HOME=${{ github.workspace }}/.cargo | ||
-w ${{ github.workspace }} | ||
run: | | ||
set -eu # basic shell hygiene | ||
# /tmp is a tmpfs; more efficient than persisted storage | ||
mkdir -p /tmp/ccache | ||
export CCACHE_TEMPDIR=/tmp/ccache | ||
# Zero out the stats so we can see how we did this build | ||
# NOTE: may be inaccurate if we have >1 build runner on the same machine, using the same local cache | ||
ccache -z | ||
cmake --preset clang-tidy | ||
# cmake -B .build/clang-tidy -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_CLANG_TIDY=clang-tidy-17 -DTT_UNITY_BUILDS=FALSE -DCMAKE_DISABLE_PRECOMPILE_HEADERS=TRUE -DENABLE_CCACHE=TRUE -DTT_METAL_BUILD_TESTS=TRUE -DTTNN_BUILD_TESTS=TRUE -DBUILD_PROGRAMMING_EXAMPLES=TRUE -DBUILD_TT_TRAIN=TRUE | ||
nice -n 19 cmake --build --preset clang-tidy | ||
mkdir out | ||
ccache -s > out/ccache.stats | ||
- name: Publish Ccache summary | ||
run: | | ||
echo '## CCache Summary' >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
cat out/ccache.stats >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY |
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,27 @@ | ||
name: "[post-commit] tt-train C++ tests" | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
static-checks: | ||
uses: ./.github/workflows/all-static-checks.yaml | ||
secrets: inherit | ||
build-artifact: | ||
uses: ./.github/workflows/build-artifact.yaml | ||
secrets: inherit | ||
tt-train-cpp-unit-tests: | ||
needs: build-artifact | ||
secrets: inherit | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test-group: [ | ||
{ arch: wormhole_b0, runner-label: N150 }, | ||
{ arch: wormhole_b0, runner-label: N300 }, | ||
] | ||
uses: ./.github/workflows/tt-train-post-commit.yaml | ||
with: | ||
arch: ${{ matrix.test-group.arch}} | ||
runner-label: ${{ matrix.test-group.runner-label}} |
Oops, something went wrong.