Skip to content

Commit

Permalink
Merge branch 'main' into abhullar/diff-aligns
Browse files Browse the repository at this point in the history
  • Loading branch information
llongTT authored Jan 6, 2025
2 parents 6cca1b9 + 515d342 commit 9964d75
Show file tree
Hide file tree
Showing 367 changed files with 12,305 additions and 7,967 deletions.
12 changes: 0 additions & 12 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,6 @@ ttnn/cpp/ttnn/operations/ccl/reduce_scatter/host/reduce_scatter_worker_builder.c
ttnn/cpp/ttnn/operations/ccl/reduce_scatter/host/reduce_scatter_worker_builder.hpp
ttnn/cpp/ttnn/operations/ccl/shared_with_host/hetergeneous_data_structs.hpp
ttnn/cpp/ttnn/operations/ccl/shared_with_host/sharded_tensor_addr_gen.hpp
ttnn/cpp/ttnn/operations/conv/conv2d/conv2d.cpp
ttnn/cpp/ttnn/operations/conv/conv2d/conv2d.hpp
ttnn/cpp/ttnn/operations/conv/conv2d/conv2d_pybind.cpp
ttnn/cpp/ttnn/operations/conv/conv2d/conv2d_utils.cpp
ttnn/cpp/ttnn/operations/conv/conv2d/conv2d_utils.hpp
ttnn/cpp/ttnn/operations/conv/conv2d/device/conv2d_op.cpp
ttnn/cpp/ttnn/operations/conv/conv2d/device/conv2d_op.hpp
ttnn/cpp/ttnn/operations/conv/conv2d/prepare_conv2d_weights.cpp
ttnn/cpp/ttnn/operations/conv/conv2d/prepare_conv2d_weights.hpp
ttnn/cpp/ttnn/operations/conv/conv_transpose2d/conv_transpose2d.cpp
ttnn/cpp/ttnn/operations/conv/conv_transpose2d/conv_transpose2d.hpp
ttnn/cpp/ttnn/operations/conv/conv_transpose2d/conv_transpose2d_pybind.cpp
ttnn/cpp/ttnn/operations/data_movement/sharded/device/kernels/dataflow/reader_unary_stick_layout_sharded_blocks_interleaved_start_id.cpp
ttnn/cpp/ttnn/operations/data_movement/sharded/interleaved_to_sharded/device/interleaved_to_sharded_op.cpp
ttnn/cpp/ttnn/operations/data_movement/sharded/interleaved_to_sharded/device/interleaved_to_sharded_program_factory.cpp
Expand Down
4 changes: 1 addition & 3 deletions .github/actions/ensure-active-weka-mount/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ runs:
- name: Ensure active weka mount
shell: bash
run: |
sudo systemctl restart mnt-MLPerf.mount
sudo /etc/rc.local
ls -al /mnt/MLPerf/bit_error_tests
timeout --preserve-status 300 ./.github/scripts/cloud_utils/mount_weka.sh
22 changes: 21 additions & 1 deletion .github/scripts/cloud_utils/mount_weka.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,25 @@
set -eo pipefail

sudo systemctl restart mnt-MLPerf.mount
sudo /etc/rc.local
ls -al /mnt/MLPerf/bit_error_tests

check_hugepages_service_status=0 && ( sudo systemctl status tenstorrent-hugepages.service ) || check_hugepages_service_status=$?
# Exit code 4 for systemctl means not found
if [ $check_hugepages_service_status -eq 4 ]; then
echo "::warning title=weka-mount-hugepages-service-not-found::Hugepages service not found. Using old rc.local method"
sudo /etc/rc.local
else
echo "::notice title=weka-mount-hugepages-service-found::Hugepages service found. Command returned with exit code $check_hugepages_service_status. Restarting it so we can ensure hugepages are available"
sudo systemctl restart tenstorrent-hugepages.service
fi

# Wait until the hugepages are written as the above are not blocking
hugepages_check_start=$(date +%s)
hugepages_check_timeout=60
while [[ "$(cat "/sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages")" -eq 0 ]]; do
sleep 1
if (( $(date +%s) - hugepages_check_start > hugepages_check_timeout )); then
echo "::error title=weka-mount-hugepages-not-set::nr_hugepages is still 0 after $hugepages_check_timeout seconds. Please let infra team know via issue."
exit 1
fi
done
6 changes: 1 addition & 5 deletions .github/workflows/full-regressions-and-models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ jobs:
runs-on: ["model-runner-${{ matrix.arch }}", "in-service"]
steps:
- uses: tenstorrent/tt-metal/.github/actions/checkout-with-submodule-lfs@main
- name: Ensure weka mount is active
run: |
sudo systemctl restart mnt-MLPerf.mount
sudo /etc/rc.local
ls -al /mnt/MLPerf/bit_error_tests
- uses: ./.github/actions/ensure-active-weka-mount
- name: Set up dyanmic env vars for build
run: |
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/package-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ jobs:
CHANGELOG.txt
README.md
INSTALLING.md
infra/machine_setup/scripts/setup_hugepages.py
ttnn-*+*.whl
fail_on_unmatched_files: true
create-docker-release-image:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/perf-device-models-impl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ jobs:
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
runs-on: ${{ matrix.test-info.runs-on }}
steps:
- name: Ensure weka mount is active
run: |
sudo systemctl restart mnt-MLPerf.mount
sudo /etc/rc.local
ls -al /mnt/MLPerf/bit_error_tests
- uses: tenstorrent/tt-metal/.github/actions/checkout-with-submodule-lfs@main
- uses: ./.github/actions/ensure-active-weka-mount
- name: Set up dynamic env vars for build
run: |
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/single-card-demo-tests-impl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ jobs:
if: ${{ matrix.test-group.name == 'N300_performance' }}
run: |
sudo cpupower frequency-set -g performance
- name: Ensure weka mount is active
run: |
sudo systemctl restart mnt-MLPerf.mount
sudo /etc/rc.local
ls -al /mnt/MLPerf/bit_error_tests
- uses: ./.github/actions/ensure-active-weka-mount
- name: Set up dynamic env vars for build
run: |
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/test-dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,9 @@ jobs:
runs-on: ${{ fromJSON(inputs.runner-label) }}
steps:
- uses: tenstorrent/tt-metal/.github/actions/checkout-with-submodule-lfs@main
- name: Ensure weka mount is active
- uses: ./.github/actions/ensure-active-weka-mount
timeout-minutes: 3
if: ${{ inputs.arch != 'blackhole' }}
run: |
sudo systemctl restart mnt-MLPerf.mount
sudo /etc/rc.local
ls -al /mnt/MLPerf/bit_error_tests
- name: Set up dyanmic env vars for build
run: |
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/ttnn-post-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,25 @@ jobs:
os: ["ubuntu-20.04"]
test-group:
- name: ttnn group 1
cmd: pytest tests/ttnn/unit_tests -xv --splits 6 --group 1 -m "not disable_fast_runtime_mode"
cmd: pytest tests/ttnn/unit_tests -xv --splits 10 --group 1 -m "not disable_fast_runtime_mode"
- name: ttnn group 2
cmd: pytest tests/ttnn/unit_tests -xv --splits 6 --group 2 -m "not disable_fast_runtime_mode"
cmd: pytest tests/ttnn/unit_tests -xv --splits 10 --group 2 -m "not disable_fast_runtime_mode"
- name: ttnn group 3
cmd: pytest tests/ttnn/unit_tests -xv --splits 6 --group 3 -m "not disable_fast_runtime_mode"
cmd: pytest tests/ttnn/unit_tests -xv --splits 10 --group 3 -m "not disable_fast_runtime_mode"
- name: ttnn group 4
cmd: pytest tests/ttnn/unit_tests -xv --splits 6 --group 4 -m "not disable_fast_runtime_mode"
cmd: pytest tests/ttnn/unit_tests -xv --splits 10 --group 4 -m "not disable_fast_runtime_mode"
- name: ttnn group 5
cmd: pytest tests/ttnn/unit_tests -xv --splits 6 --group 5 -m "not disable_fast_runtime_mode"
cmd: pytest tests/ttnn/unit_tests -xv --splits 10 --group 5 -m "not disable_fast_runtime_mode"
- name: ttnn group 6
cmd: pytest tests/ttnn/unit_tests -xv --splits 6 --group 6 -m "not disable_fast_runtime_mode"
cmd: pytest tests/ttnn/unit_tests -xv --splits 10 --group 6 -m "not disable_fast_runtime_mode"
- name: ttnn group 7
cmd: pytest tests/ttnn/unit_tests -xv --splits 10 --group 7 -m "not disable_fast_runtime_mode"
- name: ttnn group 8
cmd: pytest tests/ttnn/unit_tests -xv --splits 10 --group 8 -m "not disable_fast_runtime_mode"
- name: ttnn group 9
cmd: pytest tests/ttnn/unit_tests -xv --splits 10 --group 9 -m "not disable_fast_runtime_mode"
- name: ttnn group 10
cmd: pytest tests/ttnn/unit_tests -xv --splits 10 --group 10 -m "not disable_fast_runtime_mode"
- name: ttnn fast runtime off
cmd: pytest tests/ttnn/unit_tests -xv -m requires_fast_runtime_mode_off
fast_runtime_mode_off: true
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ message(STATUS "Build Programming Examples: ${BUILD_PROGRAMMING_EXAMPLES}")
message(STATUS "Build TT METAL Tests: ${TT_METAL_BUILD_TESTS}")
message(STATUS "Build TTNN Tests: ${TTNN_BUILD_TESTS}")
message(STATUS "Build with Unity builds: ${TT_UNITY_BUILDS}")
message(STATUS "Build with Shared TTNN Sublibraries: ${ENABLE_TTNN_SHARED_SUBLIBS}")

############################################################################################################################

if(ENABLE_BUILD_TIME_TRACE)
Expand Down
7 changes: 3 additions & 4 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ MANIFEST.in @tenstorrent/metalium-developers-infra
setup.py @tenstorrent/metalium-developers-infra
pyproject.toml @tenstorrent/metalium-developers-infra
requirements*.txt @tenstorrent/metalium-developers-infra
setup_hugepages.py @tenstorrent/metalium-developers-infra

scripts/build_scripts/ @tenstorrent/metalium-developers-infra
cmake/ @tenstorrent/metalium-developers-infra
Expand Down Expand Up @@ -98,15 +97,15 @@ ttnn/cpp/ttnn/deprecated/tt_dnn/op_library/moreh*/ @razorback3 @dongjin-na @cfjc
ttnn/cpp/ttnn/deprecated/tt_lib/csrc/ @ayerofieiev-tt @razorback3 @dongjin-na

ttnn/cpp/ttnn/operations/moreh*/ @razorback3 @dongjin-na @cfjchu @ayerofieiev-tt @dmakoviichuk-tt
ttnn/cpp/ttnn/operations/ccl/ @SeanNijjar @cfjchu
ttnn/cpp/ttnn/operations/ccl/ @SeanNijjar @cfjchu @jvegaTT
ttnn/cpp/ttnn/operations/pool/ @mywoodstock @shwetankTT @sankarmanoj-tt @pavlejosipovic
ttnn/cpp/ttnn/operations/conv/ @mywoodstock @shwetankTT @sankarmanoj-tt @pavlejosipovic
ttnn/cpp/ttnn/operations/sliding_window/ @mywoodstock @sankarmanoj-tt @pavlejosipovic
ttnn/cpp/ttnn/operations/data_movement/ @ntarafdar @sjameelTT @jaykru-tt @yugi957 @jvegaTT @llongTT @nardoTT
ttnn/cpp/ttnn/operations/data_movement/fold/ @mywoodstock @shwetankTT @sankarmanoj-tt @pavlejosipovic
ttnn/cpp/ttnn/operations/data_movement/untilize_with_halo_v2/ @mywoodstock @shwetankTT @sankarmanoj-tt @pavlejosipovic
ttnn/cpp/ttnn/operations/matmul/ @TT-BrianLiu @bbradelTT @yugaoTT @asandhupatlaTT
ttnn/cpp/ttnn/operations/experimental/ccl/ @SeanNijjar @jvegaTT
ttnn/cpp/ttnn/operations/experimental/ccl/ @SeanNijjar @jvegaTT @tt-aho
ttnn/cpp/ttnn/operations/experimental/matmul/ @TT-BrianLiu @bbradelTT @yugaoTT @asandhupatlaTT
ttnn/cpp/ttnn/operations/eltwise/ @patrickroberts @yan-zaretskiy @eyonland
ttnn/cpp/ttnn/operations/reduction/ @bbradelTT @asandhupatlaTT @sjameelTT
Expand All @@ -116,7 +115,7 @@ ttnn/cpp/ttnn/operations/embedding_backward/ @TT-BrianLiu @yan-zaretskiy
ttnn/ttnn/operations/eltwise @patrickroberts @yan-zaretskiy @eyonland
tests/ttnn/ @ayerofieiev-tt @dmakoviichuk-tt @rfurko-tt @cfjchu @TT-BrianLiu @razorback3 @dongjin-na @bbradelTT
tests/ttnn/unit_tests/gtests/ccl/ @SeanNijjar @jvegaTT @cfjchu
tests/ttnn/unit_tests/operations/ccl/ @SeanNijjar @jvegaTT
tests/ttnn/unit_tests/operations/ccl/ @SeanNijjar @jvegaTT @tt-aho
tests/ttnn/unit_tests/operations/eltwise/ @patrickroberts @yan-zaretskiy @eyonland
tests/sweep_framework/ @xanderchin @jdesousa-TT @sjameelTT
tests/sweep_framework/sweeps
Expand Down
17 changes: 0 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,6 @@ standards](#contribution-standards).

## Machine setup

### Hugepages setup

Hugepages is required to both run and develop on the Metalium project.

If you ever need to re-enable Hugepages, you can try the script we homemade
for this:

```
sudo python3 infra/machine_setup/scripts/setup_hugepages.py enable
```

Then to check if Hugepages is enabled:

```
python3 infra/machine_setup/scripts/setup_hugepages.py check
```

## Developing tt-metal

Currently, the most convenient way to develop is to do so on our cloud
Expand Down
29 changes: 1 addition & 28 deletions INSTALLING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,7 @@ sudo ./install_dependencies.sh
- To install `CMake 3.20` see: https://github.com/tenstorrent/tt-metal/blob/4d7730d3e2d22c51d62baa1bfed861b557d9a3c0/dockerfile/ubuntu-20.04-amd64.Dockerfile#L9-L14
---

### Step 3. Hugepages

1. Download latest [setup_hugepages.py](https://github.com/tenstorrent/tt-metal/blob/main/infra/machine_setup/scripts/setup_hugepages.py) script.

```sh
wget https://raw.githubusercontent.com/tenstorrent/tt-metal/main/infra/machine_setup/scripts/setup_hugepages.py
```

2. Run first setup script.

```sh
sudo -E python3 setup_hugepages.py first_pass
```

3. Reboot

```sh
sudo reboot now
```

4. Run second setup script & check setup.

```sh
sudo -E python3 setup_hugepages.py enable && sudo -E python3 setup_hugepages.py check
```
---

### Step 4. Install and start using TT-NN and TT-Metalium!
### Step 3. Install and start using TT-NN and TT-Metalium!

> [!NOTE]
>
Expand Down
37 changes: 19 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ For the latest model updates and features, please see [MODEL_UPDATES.md](models/

## TT-NN Tech Reports

- [Advanced Performance Optimizations for Models](./tech_reports/AdvancedPerformanceOptimizationsForModels/AdvancedPerformanceOptimizationsForModels.md) (updated Dec 4th)
- [Programming Mesh of Devices](./tech_reports/Programming%20Mesh%20of%20Devices/Programming%20Mesh%20of%20Devices%20with%20TT-NN.md) (updated Sept 9th)
- [ViT Implementation in TT-NN on GS](./tech_reports/ViT-TTNN/vit.md) (updated Sept 22nd)
- [LLMs Bring up in TT-NN](./tech_reports/LLMs/llms.md) (updated Oct 29th)
- [YOLOv4 Implementation in TT-NN on WH](./tech_reports/YoloV4-TTNN/yolov4.md) (updated November 8th)
- [Advanced Performance Optimizations for Models](./tech_reports/AdvancedPerformanceOptimizationsForModels/AdvancedPerformanceOptimizationsForModels.md) (updated Dec 4th, 2024)
- [Programming Mesh of Devices](./tech_reports/Programming%20Mesh%20of%20Devices/Programming%20Mesh%20of%20Devices%20with%20TT-NN.md) (updated Sept 9th, 2024)
- [ViT Implementation in TT-NN on GS](./tech_reports/ViT-TTNN/vit.md) (updated Sept 22nd, 2024)
- [LLMs Bring up in TT-NN](./tech_reports/LLMs/llms.md) (updated Oct 29th, 2024)
- [YOLOv4 Implementation in TT-NN on WH](./tech_reports/YoloV4-TTNN/yolov4.md) (updated November 8th, 2024)

## Benchmarks

- [Matrix Multiply FLOPS on WH](./tech_reports/GEMM_FLOPS/GEMM_FLOPS.md) (updated November 13th)
- [Matrix Multiply FLOPS on WH](./tech_reports/GEMM_FLOPS/GEMM_FLOPS.md) (updated November 13th, 2024)

---

Expand All @@ -109,18 +109,19 @@ Get started with [simple kernels](https://docs.tenstorrent.com/tt-metalium/lates

## TT-Metalium Tech Reports

- [Matrix Engine](./tech_reports/matrix_engine/matrix_engine.md) (updated Sept 6th)
- [Data Formats](./tech_reports/data_formats/data_formats.md) (updated Sept 7th)
- [Reconfiguring Data Formats](./tech_reports/data_formats/reconfig_data_format.md) (updated Oct 17th)
- [Handling special floating-point numbers](./tech_reports/Handling_Special_Value/special_values.md) (updated Oct 5th)
- [Allocator](./tech_reports/memory/allocator.md) (Updated Dec 19th)
- [Tensor Layouts](./tech_reports/tensor_layouts/tensor_layouts.md) (updated Sept 6th)
- [Saturating DRAM Bandwidth](./tech_reports/Saturating_DRAM_bandwidth/Saturating_DRAM_bandwidth.md) (updated Sept 6th)
- [Flash Attention on Wormhole](./tech_reports/FlashAttention/FlashAttention.md) (updated Sept 6th)
- [CNNs on TT Architectures](./tech_reports/CNNs/ttcnn.md) (updated Sept 6th)
- [Ethernet and Multichip Basics](./tech_reports/EthernetMultichip/BasicEthernetGuide.md) (Updated Sept 20th)
- [Collective Communication Library (CCL)](./tech_reports/EthernetMultichip/CclDeveloperGuide.md) (Updated Sept 20th)
- [Blackhole Bring-Up Programming Guide](./tech_reports/Blackhole/BlackholeBringUpProgrammingGuide.md) (Updated Dec 18th)
- [Matrix Engine](./tech_reports/matrix_engine/matrix_engine.md) (updated Sept 6th, 2024)
- [Data Formats](./tech_reports/data_formats/data_formats.md) (updated Sept 7th, 2024)
- [Reconfiguring Data Formats](./tech_reports/data_formats/reconfig_data_format.md) (updated Oct 17th, 2024)
- [Handling special floating-point numbers](./tech_reports/Handling_Special_Value/special_values.md) (updated Oct 5th, 2024)
- [Allocator](./tech_reports/memory/allocator.md) (Updated Dec 19th, 2024)
- [Tensor Layouts](./tech_reports/tensor_layouts/tensor_layouts.md) (updated Sept 6th, 2024)
- [Saturating DRAM Bandwidth](./tech_reports/Saturating_DRAM_bandwidth/Saturating_DRAM_bandwidth.md) (updated Sept 6th, 2024)
- [Flash Attention on Wormhole](./tech_reports/FlashAttention/FlashAttention.md) (updated Sept 6th, 2024)
- [CNNs on TT Architectures](./tech_reports/CNNs/ttcnn.md) (updated Sept 6th, 2024)
- [Ethernet and Multichip Basics](./tech_reports/EthernetMultichip/BasicEthernetGuide.md) (Updated Sept 20th, 2024)
- [Collective Communication Library (CCL)](./tech_reports/EthernetMultichip/CclDeveloperGuide.md) (Updated Sept 20th, 2024)
- [Blackhole Bring-Up Programming Guide](./tech_reports/Blackhole/BlackholeBringUpProgrammingGuide.md) (Updated Dec 18th, 2024)
- [Sub-Devices](./tech_reports/SubDevices/SubDevices.md) (Updated Jan 2nd, 2025)

## TT-Metalium Programming Examples

Expand Down
11 changes: 10 additions & 1 deletion build_metal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ show_help() {
echo " --disable-unity-builds Disable Unity builds"
echo " --cxx-compiler-path Set path to C++ compiler."
echo " --c-compiler-path Set path to C++ compiler."
echo " --ttnn-shared-sub-libs Use shared libraries for ttnn."
}

clean() {
Expand Down Expand Up @@ -59,11 +60,12 @@ unity_builds="ON"
build_all="OFF"
cxx_compiler_path=""
c_compiler_path=""
ttnn_shared_sub_libs="OFF"

declare -a cmake_args

OPTIONS=h,e,c,t,a,m,s,u,b:,p
LONGOPTIONS=help,build-all,export-compile-commands,enable-ccache,enable-time-trace,enable-asan,enable-msan,enable-tsan,enable-ubsan,build-type:,enable-profiler,install-prefix:,build-tests,build-ttnn-tests,build-metal-tests,build-umd-tests,build-programming-examples,build-tt-train,build-static-libs,disable-unity-builds,release,development,debug,clean,cxx-compiler-path:,c-compiler-path:
LONGOPTIONS=help,build-all,export-compile-commands,enable-ccache,enable-time-trace,enable-asan,enable-msan,enable-tsan,enable-ubsan,build-type:,enable-profiler,install-prefix:,build-tests,build-ttnn-tests,build-metal-tests,build-umd-tests,build-programming-examples,build-tt-train,build-static-libs,disable-unity-builds,release,development,debug,clean,cxx-compiler-path:,c-compiler-path:,ttnn-shared-sub-libs

# Parse the options
PARSED=$(getopt --options=$OPTIONS --longoptions=$LONGOPTIONS --name "$0" -- "$@")
Expand Down Expand Up @@ -115,6 +117,8 @@ while true; do
build_static_libs="ON";;
--build-all)
build_all="ON";;
--ttnn-shared-sub-libs)
ttnn_shared_sub_libs="ON";;
--disable-unity-builds)
unity_builds="OFF";;
--cxx-compiler-path)
Expand Down Expand Up @@ -177,6 +181,7 @@ echo "INFO: Build directory: $build_dir"
echo "INFO: Install Prefix: $cmake_install_prefix"
echo "INFO: Build tests: $build_tests"
echo "INFO: Enable Unity builds: $unity_builds"
echo "INFO: TTNN Shared sub libs : $ttnn_shared_sub_libs"

# Prepare cmake arguments
cmake_args+=("-B" "$build_dir")
Expand Down Expand Up @@ -228,6 +233,10 @@ else
cmake_args+=("-DCMAKE_EXPORT_COMPILE_COMMANDS=OFF")
fi

if [ "$ttnn_shared_sub_libs" = "ON" ]; then
cmake_args+=("-DENABLE_TTNN_SHARED_SUBLIBS=ON")
fi

if [ "$build_tests" = "ON" ]; then
cmake_args+=("-DTT_METAL_BUILD_TESTS=ON")
cmake_args+=("-DTTNN_BUILD_TESTS=ON")
Expand Down
2 changes: 2 additions & 0 deletions cmake/project_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ option(TTNN_BUILD_TESTS "Enables build of ttnn tests" OFF)
option(ENABLE_CCACHE "Build with compiler cache" FALSE)
option(TT_UNITY_BUILDS "Build with Unity builds" ON)
option(BUILD_TT_TRAIN "Enables build of tt-train" OFF)
option(ENABLE_TTNN_SHARED_SUBLIBS "Use shared libraries for ttnn to speed up incremental builds" OFF)

###########################################################################################

if(CMAKE_CXX_CLANG_TIDY AND TT_UNITY_BUILDS)
Expand Down
Loading

0 comments on commit 9964d75

Please sign in to comment.