Skip to content

Commit fa745c3

Browse files
committed
lintrunner on "Reapply "Implement unary_ufunc functions using elementwise_util (#9386)""
This PR was reverted due to internal test failures, which should be fixed now (and is being sent as an exported diff to make sure). Original summary: One less set of independent implementations to worry about going forward (e.g., we don't have to vectorize these separately from elementwise_util and they get all benefits of elementwise_util). Differential Revision: [D76754824](https://our.internmc.facebook.com/intern/diff/D76754824/) [ghstack-poisoned]
1 parent 665b378 commit fa745c3

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

backends/cadence/fusion_g3/operators/op_exp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ Tensor& exp_out(KernelRuntimeContext& ctx, const Tensor& in, Tensor& out) {
6161
} else {
6262
static constexpr const char op_name[] = "exp.out";
6363
return torch::executor::native::internal::
64-
unary_ufunc_realhbbf16_to_floathbf16<op_name>(
65-
[](auto x) { return executorch::math::exp(x); }, ctx, in, out);
64+
unary_ufunc_realhbbf16_to_floathbf16<op_name>(
65+
[](auto x) { return executorch::math::exp(x); }, ctx, in, out);
6666
}
6767
}
6868

backends/cadence/fusion_g3/operators/op_rsqrt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ Tensor& rsqrt_out(KernelRuntimeContext& ctx, const Tensor& in, Tensor& out) {
5454
} else {
5555
static constexpr const char op_name[] = "rsqrt.out";
5656
return torch::executor::native::internal::
57-
unary_ufunc_realhbbf16_to_floathbf16<op_name>(
58-
[](auto x) { return executorch::math::rsqrt(x); }, ctx, in, out);
57+
unary_ufunc_realhbbf16_to_floathbf16<op_name>(
58+
[](auto x) { return executorch::math::rsqrt(x); }, ctx, in, out);
5959
}
6060
}
6161

backends/cadence/fusion_g3/operators/op_sqrt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Tensor& sqrt_out(KernelRuntimeContext& ctx, const Tensor& in, Tensor& out) {
5656
} else {
5757
static constexpr const char op_name[] = "sqrt.out";
5858
return torch::executor::native::internal::
59-
unary_ufunc_realhbbf16_to_floathbf16<op_name>(
60-
[](auto x) { return executorch::math::sqrt(x); }, ctx, in, out);
59+
unary_ufunc_realhbbf16_to_floathbf16<op_name>(
60+
[](auto x) { return executorch::math::sqrt(x); }, ctx, in, out);
6161
}
6262
}
6363

backends/cadence/fusion_g3/operators/op_tanh.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Tensor& tanh_out(KernelRuntimeContext& ctx, const Tensor& in, Tensor& out) {
5656
} else {
5757
static constexpr const char op_name[] = "tanh.out";
5858
return torch::executor::native::internal::
59-
unary_ufunc_realhbbf16_to_floathbf16<op_name>(
60-
[](auto x) { return executorch::math::tanh(x); }, ctx, in, out);
59+
unary_ufunc_realhbbf16_to_floathbf16<op_name>(
60+
[](auto x) { return executorch::math::tanh(x); }, ctx, in, out);
6161
}
6262
}
6363

backends/cadence/hifi/operators/op_rsqrt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Tensor& rsqrt_out(RuntimeContext& ctx, const Tensor& in, Tensor& out) {
4040

4141
static constexpr const char op_name[] = "rsqrt.out";
4242
return torch::executor::native::internal::
43-
unary_ufunc_realhbbf16_to_floathbf16<op_name>(
44-
[](auto x) { return executorch::math::rsqrt(x); }, ctx, in, out);
43+
unary_ufunc_realhbbf16_to_floathbf16<op_name>(
44+
[](auto x) { return executorch::math::rsqrt(x); }, ctx, in, out);
4545
}
4646

4747
} // namespace native

backends/cadence/hifi/operators/op_tanh.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Tensor& tanh_out(RuntimeContext& ctx, const Tensor& in, Tensor& out) {
3636

3737
static constexpr const char op_name[] = "tanh.out";
3838
return torch::executor::native::internal::
39-
unary_ufunc_realhbbf16_to_floathbf16<op_name>(
40-
[](auto x) { return executorch::math::tanh(x); }, ctx, in, out);
39+
unary_ufunc_realhbbf16_to_floathbf16<op_name>(
40+
[](auto x) { return executorch::math::tanh(x); }, ctx, in, out);
4141
}
4242

4343
} // namespace native

0 commit comments

Comments
 (0)