Skip to content

Commit bde7998

Browse files
committed
Update on "[ExecuTorch] Add broadcast support for optimized add op"
Summary: This brings add op to feature parity, wrt, broadcasting, to mul op in optimized kernels lib Test Plan: tests added Reviewers: Subscribers: Tasks: Tags: cc larryliu0820 manuelcandales Differential Revision: [D69491814](https://our.internmc.facebook.com/intern/diff/D69491814) [ghstack-poisoned]
2 parents 132d2f5 + 216c4be commit bde7998

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)