From 81f9fae0c8c833131d6aabe87bf8dd2f11dbbdbd Mon Sep 17 00:00:00 2001 From: Artem Yerofieiev <169092593+ayerofieiev-tt@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:02:52 -0700 Subject: [PATCH] Replace assert with fatal in Shape::get_normalized_index (#12346) --- ttnn/cpp/ttnn/tensor/types.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ttnn/cpp/ttnn/tensor/types.cpp b/ttnn/cpp/ttnn/tensor/types.cpp index e0209c84df8..627cb115955 100644 --- a/ttnn/cpp/ttnn/tensor/types.cpp +++ b/ttnn/cpp/ttnn/tensor/types.cpp @@ -66,7 +66,7 @@ Padding::Padding(const std::vector& pad_dimensions, PadValue pad_v const uint32_t Padding::get_normalized_index(std::int64_t index) const { std::int64_t rank = static_cast(this->rank_); std::uint64_t normalized_index = index >= 0 ? index : rank + index; - TT_ASSERT( + TT_FATAL( normalized_index >= 0 and normalized_index < rank, fmt::format( "Index is out of bounds for the rank, should be between 0 and {} however is {}", @@ -164,7 +164,7 @@ const Shape Shape::without_padding() const { const uint32_t Shape::get_normalized_index(std::int64_t index) const { std::int64_t rank = static_cast(this->rank_); std::uint64_t normalized_index = index >= 0 ? index : rank + index; - TT_ASSERT( + TT_FATAL( normalized_index >= 0 and normalized_index < rank, fmt::format( "Index is out of bounds for the rank, should be between 0 and {} however is {}",