Skip to content

Commit

Permalink
#13867: Fix build failure due to incomplete type in fmt formatter (#1…
Browse files Browse the repository at this point in the history
…3871)

Co-authored-by: Artem Yerofieiev <[email protected]>
  • Loading branch information
dongjin-na and ayerofieiev-tt authored Oct 16, 2024
1 parent fa5798c commit ef06fc4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 1 addition & 3 deletions ttnn/cpp/ttnn/operations/data_movement/concat/concat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
#pragma once

#include "ttnn/tensor/types.hpp"
#include "ttnn/operations/core/core.hpp"

#include "ttnn/cpp/ttnn/operations/data_movement/concat/device/concat_device_operation.hpp"
#include "ttnn/decorators.hpp"

#include <ranges>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "ttnn/operations/creation.hpp"
#include "ttnn/cpp/ttnn/operations/eltwise/ternary/where.hpp"
#include "ttnn/operations/reduction/generic/generic_reductions.hpp"
#include "ttnn/operations/core/core.hpp"

namespace ttnn::operations::experimental::reduction {

Expand Down
9 changes: 9 additions & 0 deletions ttnn/cpp/ttnn/tensor/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,15 @@ const uint32_t LegacyShape::get_normalized_index(std::int64_t index) const {
return normalized_index;
}

Array4D LegacyShape::to_array_4D() const {
TT_FATAL(rank() == 4, "to_array_4D is only valid for 4D shapes! Called for {}.", *this);
Array4D ret_array;
for (int i = 0; i < rank(); i++) {
ret_array[i] = this->operator[](i);
}
return ret_array;
}

bool operator==(const ReplicateTensor& a, const ReplicateTensor& b) {
return a.replication_factor == b.replication_factor; // All instances are considered equal because there are no data members.
}
Expand Down
9 changes: 1 addition & 8 deletions ttnn/cpp/ttnn/tensor/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,7 @@ class LegacyShape {
}
friend std::ostream &operator<<(std::ostream &os, const LegacyShape &shape);

Array4D to_array_4D() const {
TT_FATAL(rank() == 4, "to_array_4D is only valid for 4D shapes! Called for {}.", *this);
Array4D ret_array;
for (int i = 0; i < rank(); i++) {
ret_array[i] = this->operator[](i);
}
return ret_array;
}
Array4D to_array_4D() const;
};

inline std::ostream &operator<<(std::ostream &os, const tt::tt_metal::LegacyShape &shape) {
Expand Down

0 comments on commit ef06fc4

Please sign in to comment.