Skip to content

fix g3 dequant #7683

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

Merged
merged 1 commit into from
Jan 17, 2025
Merged
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
11 changes: 6 additions & 5 deletions backends/cadence/fusion_g3/operators/op_dequantize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ void check_dequantize_per_tensor_args(

ET_CHECK_MSG(
input.scalar_type() == dtype,
"input.scalar_type() %" PRId8 " is not matching dtype argumenta:",
static_cast<int8_t>(input.scalar_type()));
"input.scalar_type() %s is not matching dtype arguments:",
::executorch::runtime::toString(input.scalar_type()));

if (out_dtype.has_value()) {
ET_CHECK_MSG(
Expand Down Expand Up @@ -561,11 +561,12 @@ Tensor& dequantize_per_tensor_out(
const Tensor& input,
double scale,
int64_t zero_point,
int64_t quant_min,
int64_t quant_max,
__ET_UNUSED int64_t quant_min,
__ET_UNUSED int64_t quant_max,
ScalarType dtype,
::executorch::aten::optional<ScalarType> out_dtype,
Tensor& out) {
constexpr ScalarType out_dtype = ScalarType::Float;

#ifdef OP_ARG_CHECK
torch::executor::Error err = resize_tensor(out, input.sizes());
ET_CHECK_MSG(
Expand Down