Skip to content

Commit af3a382

Browse files
committed
Update on "[Executorch] Add broadcasting support to optimized op_sub"
Summary: This diff builds on top of previous one to add support for limited handling of broadcasting for sub Test Plan: tests added Reviewers: Subscribers: Tasks: Tags: cc larryliu0820 manuelcandales Differential Revision: [D69491818](https://our.internmc.facebook.com/intern/diff/D69491818) [ghstack-poisoned]
2 parents 8f1a3e6 + ba6d2bc commit af3a382

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)