Skip to content

Commit

Permalink
#16265: Remove usage of full like op in clamp to fix usupported dtype…
Browse files Browse the repository at this point in the history
… error
  • Loading branch information
umadevimcw authored and arikTT committed Dec 27, 2024
1 parent 0dbc59b commit 304b404
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,11 @@ Tensor ExecuteUnaryCompositeClamp::invoke(
} else if (min.value() > max.value()) {
return full_like(a, max.value());
}
const Tensor h_const = full_like(a, max.value());
Tensor a_max = ttnn::minimum(a, h_const, output_memory_config);
Tensor a_max = ttnn::minimum(a, max.value(), output_memory_config);
if (min.value() == 0.0f) {
return ttnn::relu(a_max, output_memory_config);
} else {
const Tensor l_const = full_like(a, min.value());
return ttnn::maximum(a_max, l_const, output_memory_config);
return ttnn::maximum(a_max, min.value(), output_memory_config);
}
}

Expand Down

0 comments on commit 304b404

Please sign in to comment.