Skip to content

Commit 8ba2cee

Browse files
Zonglin Pengzonglinpeng
authored andcommitted
removed unused headers and lint
1 parent ff529c8 commit 8ba2cee

File tree

4 files changed

+5
-18
lines changed

4 files changed

+5
-18
lines changed

backends/cadence/reference/operators/im2row_out.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
22

3-
#include <executorch/backends/cadence/reference/kernels/kernels.h>
43
#include <executorch/backends/cadence/reference/operators/operators.h>
54

65
#include <algorithm>

backends/cadence/reference/operators/operators.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ namespace native {
1414
namespace {
1515
using ::executorch::runtime::getLeadingDims;
1616

17-
1817
#define ET_FORALL_CADENCE_QUANTIZED_TYPES(_) \
19-
_(uint8_t, Byte) \
18+
_(uint8_t, Byte) \
2019
_(int8_t, Char)
2120

2221
inline __attribute__((always_inline)) void linear_(
@@ -38,12 +37,7 @@ inline __attribute__((always_inline)) void linear_(
3837

3938
// Given an N-dimensional input [d0, d1, d2, ..., d_{N-2}, d_{N-1}], the
4039
// leading dimensions is d0 * d1 * ... * d_{N-2}
41-
<<<<<<< HEAD
4240
int64_t leading_dims = getLeadingDims(input, input.dim() - 1);
43-
=======
44-
int64_t leading_dims =
45-
getLeadingDims(input, input.dim() - 1);
46-
>>>>>>> 5ebcf7f03 (create quantized_linear_per_tensor_out in cpu)
4741

4842
for (int i = 0; i < leading_dims; ++i) {
4943
for (int j = 0; j < M; ++j) {

backends/cadence/reference/operators/quantized_linear_out.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9-
#include <executorch/backends/cadence/reference/kernels/kernels.h>
109
#include <executorch/backends/cadence/reference/operators/operators.h>
1110
#include <executorch/backends/cadence/reference/operators/quantized_ops.h>
1211
#include <executorch/runtime/kernel/kernel_includes.h>

backends/cadence/reference/operators/quantized_ops.h

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#include <executorch/backends/cadence/reference/kernels/kernels.h>
66
#include <executorch/backends/cadence/reference/operators/operators.h>
77

8-
using executorch::runtime::getLeadingDims;
9-
108
// Generate kernels that perform elementwise arithmetic on two quantized
119
// tensors. The tensors are either the same size, or the second tensor is a
1210
// scalar.
@@ -65,7 +63,8 @@ inline __attribute__((always_inline)) void quantized_linear_per_tensor_(
6563
// weight comes in shape [out_dim, in_dim]
6664
// output comes in empty with shape [leading_dims, out_dim]
6765
// Perform matrix multiply (M x N) x (N x P)' => M x P
68-
const int64_t leading_dims = getLeadingDims(src, src.dim() - 1);
66+
const int64_t leading_dims =
67+
executorch::runtime::getLeadingDims(src, src.dim() - 1);
6968
const int64_t out_dim = weight.size(0); // = out_dim
7069
const int64_t in_dim = weight.size(1); // = in_dim
7170

@@ -87,13 +86,8 @@ inline __attribute__((always_inline)) void quantized_linear_per_tensor_(
8786
(int32_t)weight_data[j * in_dim + k] - (int32_t)weight_zero_point;
8887
sum += x * w;
8988
}
90-
<<<<<<< HEAD
9189
out_data[i * out_dim + j] = ::impl::reference::kernels::quantize<T>(
9290
sum, requant_scale, out_zero_point);
93-
=======
94-
out_data[i * out_dim + j] =
95-
::impl::reference::kernels::quantize<T>(sum, requant_scale, out_zero_point);
96-
>>>>>>> 5ebcf7f03 (create quantized_linear_per_tensor_out in cpu)
9791
}
9892
}
9993
}
@@ -138,7 +132,8 @@ inline __attribute__((always_inline)) void quantized_linear_per_channel_(
138132
// weight comes in shape [out_dim, in_dim]
139133
// output comes in empty with shape [leading_dims, out_dim]
140134
// Perform matrix multiply (M x N) x (N x P)' => M x P
141-
int64_t leading_dims = getLeadingDims(src, src.dim() - 1);
135+
int64_t leading_dims =
136+
executorch::runtime::getLeadingDims(src, src.dim() - 1);
142137
const int64_t out_dim = weight.size(0); // = out_dim
143138
const int64_t in_dim = weight.size(1); // = in_dim
144139

0 commit comments

Comments
 (0)