Skip to content

Commit

Permalink
#0: Enable unity for sublibraries (#16450)
Browse files Browse the repository at this point in the history
### Problem description
Clean builds slowed down after splitting ttnn in sub-libraries. 

### What's changed
Enabled unity build for ttnn sub-libraries. Reduced clean build time to
be similar to the original build time before splitting ttnn into
sub-libraries.

### Checklist
- [x] Post commit CI
[passes](https://github.com/tenstorrent/tt-metal/actions/runs/12630837775)
  • Loading branch information
sankarmanoj-tt authored Jan 7, 2025
1 parent 3787a8a commit d5c7379
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions ttnn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ function(add_ttnn_sublibrary SUBLIBRARY_NAME)
else()
add_library(${SUBLIBRARY_NAME} OBJECT ${ARGN})
endif()
TT_ENABLE_UNITY_BUILD(${SUBLIBRARY_NAME})
if(WITH_PYTHON_BINDINGS)
target_compile_definitions(${SUBLIBRARY_NAME} PUBLIC TTNN_WITH_PYTHON_BINDINGS=1)
else()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
//
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "ttnn/decorators.hpp"

namespace ttnn {
Expand Down

0 comments on commit d5c7379

Please sign in to comment.