Skip to content

Commit

Permalink
#7625: Enable multicore for tilize with padding by default
Browse files Browse the repository at this point in the history
  • Loading branch information
yan-zaretskiy committed May 15, 2024
1 parent a7636ab commit b658ebb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ttnn/cpp/ttnn/op_library/to_layout/to_layout_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ Tensor execute(

} else if (layout == ttnn::TILE_LAYOUT) {
tensor = unsqueeze_to_4D(tensor);
bool use_multicore = true;
std::vector<uint32_t> padded_4D_output_shape;
padded_4D_output_shape.push_back(tensor.get_shape()[-4]);
padded_4D_output_shape.push_back(tensor.get_shape()[-3]);
padded_4D_output_shape.push_back(ttnn::pad_to_multiple_of_tile_size(tensor.get_shape()[-2]));
padded_4D_output_shape.push_back(ttnn::pad_to_multiple_of_tile_size(tensor.get_shape()[-1]));
tensor =
tt::tt_metal::tilize_with_val_padding(tensor, padded_4D_output_shape, 0, output_memory_config, dtype);
tensor = tt::tt_metal::tilize_with_val_padding(
tensor, padded_4D_output_shape, 0, output_memory_config, dtype, use_multicore);
return reshape(tensor, ttnn::Shape(tt::tt_metal::Shape{output_shape, padded_output_shape}));

} else {
Expand Down

0 comments on commit b658ebb

Please sign in to comment.