-
Notifications
You must be signed in to change notification settings - Fork 749
Removed unnecessary conditions in op_add and op_mul #7135
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,7 @@ enum datatype { Ushort = 20, Bits4u = 21, Bits4 = 22 }; | |
| */ | ||
| namespace cadence { | ||
| namespace impl { | ||
| namespace FusionG3 { | ||
| namespace G3 { | ||
| namespace native { | ||
|
|
||
| namespace { | ||
|
|
@@ -364,8 +364,8 @@ void quantize_impl( | |
|
|
||
| #undef ASYM_CALCULATE_FLOAT_TYPE_TENSOR | ||
| #undef ASYM_CALCULATE_FLOAT_TYPE_CHANNEL | ||
| #undef ASYM_ASYM_QUANTIZE_IMPL_CHANNEL_TENSOR | ||
| #undef ASYM_ASYM_QUANTIZE_IMPL_CHANNEL_CHANNEL | ||
| #undef ASYM_QUANTIZE_IMPL_TENSOR | ||
| #undef ASYM_QUANTIZE_IMPL_CHANNEL | ||
| } | ||
| } else { | ||
| if (out.scalar_type() == ScalarType::Byte) { | ||
|
|
@@ -549,8 +549,8 @@ void quantize_impl( | |
| } | ||
| #undef SYM_CALCULATE_FLOAT_TYPE_TENSOR | ||
| #undef SYM_CALCULATE_FLOAT_TYPE_CHANNEL | ||
| #undef SYM_ASYM_QUANTIZE_IMPL_CHANNEL_TENSOR | ||
| #undef SYM_ASYM_QUANTIZE_IMPL_CHANNEL_CHANNEL | ||
| #undef SYM_QUANTIZE_IMPL_TENSOR | ||
| #undef SYM_QUANTIZE_IMPL_CHANNEL | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -565,6 +565,7 @@ Tensor& quantize_per_tensor_out( | |
| int64_t quant_max, | ||
| ScalarType dtype, | ||
| Tensor& out) { | ||
|
|
||
|
||
| torch::executor::Error err = resize_tensor(out, input.sizes()); | ||
| ET_CHECK_MSG( | ||
| err == torch::executor::Error::Ok, | ||
|
|
@@ -719,7 +720,6 @@ Tensor& quantize_per_channel_out( | |
| axis_ptr, | ||
| (int)quant_min, | ||
| (int)quant_max); | ||
|
|
||
| return out; | ||
| } | ||
|
|
||
|
|
@@ -802,6 +802,6 @@ Tensor& quantize_per_token_out( | |
| } | ||
|
|
||
| } // namespace native | ||
| } // namespace FusionG3 | ||
| } // namespace G3 | ||
| } // namespace impl | ||
| } // namespace cadence | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: missing new line at end of file
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
All the operator files do not have a new line at the end. Not having a new line at the end is not shown as linter error. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove new line to make linter happy