Skip to content

Commit 7377cdd

Browse files
Update on "[EE/BE][ET][Portable] Eliminate usage of ET_SWITCH_SCALAR_OBJ_TYPES in portable kernels"
Differential Revision: [D75981642](https://our.internmc.facebook.com/intern/diff/D75981642/) [ghstack-poisoned]
1 parent 115d8e9 commit 7377cdd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kernels/portable/cpu/op_scalar_tensor.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ scalar_tensor_out(KernelRuntimeContext& ctx, const Scalar& s, Tensor& out) {
2424

2525
constexpr auto name = "scalar_tensor.out";
2626

27-
if (s.isFloatingPoint() && executorch::runtime::isIntegralType(out_type, false)) {
27+
if (s.isFloatingPoint() &&
28+
executorch::runtime::isIntegralType(out_type, false)) {
2829
ET_SWITCH_INT_TYPES(out_type, ctx, name, CTYPE, [&]() {
29-
out.mutable_data_ptr<CTYPE>()[0] = static_cast<CTYPE>(utils::scalar_to<int64_t>(s));
30+
out.mutable_data_ptr<CTYPE>()[0] =
31+
static_cast<CTYPE>(utils::scalar_to<int64_t>(s));
3032
});
3133
} else {
3234
ET_SWITCH_REALHBBF16_TYPES(out_type, ctx, name, CTYPE, [&]() {

0 commit comments

Comments
 (0)