Skip to content

Commit e3527dd

Browse files
committed
Update base for Update on "[Executorch] Refactor op_add to support op_sub broadcasting"
Summary: Refactor op_add to conslidate commong broadcasting related improvements Test Plan: Previously added tests Reviewers: Subscribers: Tasks: Tags: cc larryliu0820 manuelcandales Differential Revision: [D69491817](https://our.internmc.facebook.com/intern/diff/D69491817) [ghstack-poisoned]
1 parent 3e44312 commit e3527dd

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

kernels/optimized/cpu/op_add.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ Tensor& opt_add_out(
140140
out.numel());
141141
});
142142
} else if (selected_optimized_path != ElementwiseOptimizedPath::kNone) {
143-
ScalarType out_type = out.scalar_type();
144143
ET_SWITCH_REALB_TYPES(out_type, ctx, "add.out", CTYPE, [&]() {
145144
CTYPE alpha_val;
146145
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)