Skip to content

Commit 4e51180

Browse files
committed
Update base for Update on "[ExecuTorch] Add broadcasting support to optimized op_div"
Summary: Similar to broadcast support in op_mul Test Plan: Tests added Reviewers: Subscribers: Tasks: Tags: cc larryliu0820 manuelcandales Differential Revision: [D69491815](https://our.internmc.facebook.com/intern/diff/D69491815) [ghstack-poisoned]
1 parent 1a23d93 commit 4e51180

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

kernels/optimized/cpu/op_add_sub_impl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ Tensor& opt_add_sub_out_impl(
115115
} else if (selected_optimized_path != ElementwiseOptimizedPath::kNone) {
116116
// Cannot apply the trick of -alpha here because alpha is Scalar without
117117
// support for - operator. At least not right now.
118-
ScalarType out_type = out.scalar_type();
119118
ET_SWITCH_REALB_TYPES(out_type, ctx, op_name, CTYPE, [&]() {
120119
CTYPE alpha_val;
121120
ET_KERNEL_CHECK_MSG(

kernels/optimized/cpu/op_mul.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ Tensor& opt_mul_out(
130130
out.numel());
131131
});
132132
} else if (selected_optimized_path != ElementwiseOptimizedPath::kNone) {
133-
ScalarType out_type = out.scalar_type();
134133
ET_SWITCH_REALB_TYPES(out_type, ctx, "mul.out", CTYPE, [&]() {
135134
auto mul_lambda = [](auto x, auto y) { return x * y; };
136135
return torch::executor::handle_broadcast_elementwise<CTYPE>(

0 commit comments

Comments
 (0)