Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude Padding from Shape Validation in Concat Operation #15308 #15329

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ConcatOpParallelizationStrategy ConcatDeviceOperation::get_parallelization_strat

void ConcatDeviceOperation::validate(const std::vector<Tensor> &input_tensors) const {
const auto &first_input = input_tensors[0];
tt::tt_metal::LegacyShape shape_first = first_input.get_legacy_shape();
ttnn::SimpleShape shape_first = first_input.get_logical_shape();
TT_FATAL(this->dim < shape_first.rank(), "ConcatDeviceOperation dim specified is larger than input tensor rank.");
shape_first[this->dim] = 0;
bool shard_first = input_tensors[0].is_sharded();
Expand All @@ -38,7 +38,7 @@ void ConcatDeviceOperation::validate(const std::vector<Tensor> &input_tensors) c
TT_FATAL(in_ref.device() == first_input.device(), "Operands to concat need to be on the same device.");
TT_FATAL(in_ref.get_layout() == first_input.get_layout(), "All Tensors should have same layouts.");
TT_FATAL(in_ref.get_dtype() == first_input.get_dtype(), "All Tensors should have same dtypes.");
tt::tt_metal::LegacyShape curr_shape = in_ref.get_legacy_shape();
ttnn::SimpleShape curr_shape = in_ref.get_logical_shape();
TT_FATAL(curr_shape.rank() == shape_first.rank(), "Input tensor ranks must be equal");
curr_shape[this->dim] = 0;
// last tensor can support without any kernel changes
Expand Down
Loading