Skip to content

Commit

Permalink
#8633:Add TT_Fatal for full and ones op (#12921)
Browse files Browse the repository at this point in the history
#8633: Add tt_fatal for full and ones op
  • Loading branch information
ruthreshx authored Sep 25, 2024
1 parent 7e4a6b7 commit 5a993c1
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions ttnn/cpp/ttnn/operations/numpy/functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,13 @@ static Tensor full(
if (shape.rank() < 2) {
TT_THROW("TILE layout requires rank >= 2");
}
TT_ASSERT(
shape[-1] % tt::constants::TILE_WIDTH == 0,
"TILE layout requires width dimension to be multiple of {}",
tt::constants::TILE_WIDTH);
TT_ASSERT(
shape[-2] % tt::constants::TILE_HEIGHT == 0,
"TILE layout requires height dimension to be multiple of {}",
tt::constants::TILE_HEIGHT);
TT_FATAL(
shape[-1] % tt::constants::TILE_WIDTH == 0,
"TILE layout requires width dimension to be multiple of 32");

TT_FATAL(
shape[-2] % tt::constants::TILE_HEIGHT == 0,
"TILE layout requires height dimension to be multiple of 32");
}

constexpr DataType data_type = detail::get_data_type<T>();
Expand Down

0 comments on commit 5a993c1

Please sign in to comment.