Skip to content

Commit

Permalink
#8633: Add tt_fatal for full and ones op
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthreshx committed Sep 24, 2024
1 parent 795790e commit ee2a2d8
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 ee2a2d8

Please sign in to comment.