Skip to content

Commit d3cbbf3

Browse files
authored
Cleanup hifi operator headers.
Differential Revision: D79134900 Pull Request resolved: pytorch#12940
1 parent b3b9415 commit d3cbbf3

File tree

1 file changed

+40
-43
lines changed

1 file changed

+40
-43
lines changed

backends/cadence/hifi/operators/operators.h

Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@
88

99
#pragma once
1010

11+
#include "executorch/runtime/core/exec_aten/exec_aten.h"
12+
#include "executorch/runtime/kernel/kernel_runtime_context.h"
13+
1114
#define ET_FORALL_CADENCE_QUANTIZED_TYPES(_) \
1215
_(uint8_t, Byte) \
1316
_(int8_t, Char)
1417

15-
using ::executorch::aten::IntArrayRef;
16-
using ::executorch::aten::optional;
17-
using ::executorch::aten::ScalarType;
18-
using ::executorch::aten::Tensor;
19-
using ::executorch::runtime::KernelRuntimeContext;
20-
2118
namespace cadence {
2219
namespace impl {
2320
namespace HiFi {
@@ -62,68 +59,68 @@ void quantized_relu_out(
6259
::executorch::aten::Tensor& output);
6360

6461
void quantized_linear_out(
65-
__ET_UNUSED KernelRuntimeContext& ctx,
66-
const Tensor& in,
67-
const Tensor& weight,
68-
const Tensor& bias,
62+
::executorch::runtime::KernelRuntimeContext& ctx,
63+
const ::executorch::aten::Tensor& in,
64+
const ::executorch::aten::Tensor& weight,
65+
const ::executorch::aten::Tensor& bias,
6966
int64_t in_zero_point,
70-
const Tensor& weight_zero_point,
71-
const Tensor& out_multiplier,
72-
const Tensor& out_shift,
67+
const ::executorch::aten::Tensor& weight_zero_point,
68+
const ::executorch::aten::Tensor& out_multiplier,
69+
const ::executorch::aten::Tensor& out_shift,
7370
int64_t out_zero_point,
74-
__ET_UNUSED const optional<Tensor>& offset,
75-
Tensor& out);
71+
const ::executorch::aten::optional<::executorch::aten::Tensor>& offset,
72+
::executorch::aten::Tensor& out);
7673

7774
void quantized_linear_per_tensor_out(
78-
__ET_UNUSED KernelRuntimeContext& ctx,
79-
const Tensor& in,
80-
const Tensor& weight,
81-
const Tensor& bias,
75+
::executorch::runtime::KernelRuntimeContext& ctx,
76+
const ::executorch::aten::Tensor& in,
77+
const ::executorch::aten::Tensor& weight,
78+
const ::executorch::aten::Tensor& bias,
8279
int64_t in_zero_point,
8380
int64_t weight_zero_point,
8481
int64_t out_multiplier,
8582
int64_t out_shift,
8683
int64_t out_zero_point,
87-
__ET_UNUSED const optional<Tensor>& offset,
88-
Tensor& out);
84+
const ::executorch::aten::optional<::executorch::aten::Tensor>& offset,
85+
::executorch::aten::Tensor& out);
8986

9087
void quantized_conv_out(
91-
__ET_UNUSED KernelRuntimeContext& ctx,
92-
const Tensor& input,
93-
const Tensor& weight,
94-
const Tensor& bias,
95-
IntArrayRef stride,
96-
IntArrayRef padding,
97-
IntArrayRef dilation,
88+
::executorch::runtime::KernelRuntimeContext& ctx,
89+
const ::executorch::aten::Tensor& input,
90+
const ::executorch::aten::Tensor& weight,
91+
const ::executorch::aten::Tensor& bias,
92+
::executorch::aten::IntArrayRef stride,
93+
::executorch::aten::IntArrayRef padding,
94+
::executorch::aten::IntArrayRef dilation,
9895
int64_t groups,
9996
int64_t in_zero_point,
100-
const Tensor& weight_zero_point,
101-
const Tensor& bias_scale,
97+
const ::executorch::aten::Tensor& weight_zero_point,
98+
const ::executorch::aten::Tensor& bias_scale,
10299
double output_scale,
103100
int64_t output_zero_point,
104-
__ET_UNUSED const Tensor& out_multiplier,
105-
__ET_UNUSED const Tensor& out_shift,
101+
const ::executorch::aten::Tensor& out_multiplier,
102+
const ::executorch::aten::Tensor& out_shift,
106103
bool channel_last,
107-
Tensor& out);
104+
::executorch::aten::Tensor& out);
108105

109106
void quantized_conv_per_tensor_out(
110-
__ET_UNUSED KernelRuntimeContext& ctx,
111-
const Tensor& input,
112-
const Tensor& weight,
113-
const Tensor& bias,
114-
IntArrayRef stride,
115-
IntArrayRef padding,
116-
IntArrayRef dilation,
107+
::executorch::runtime::KernelRuntimeContext& ctx,
108+
const ::executorch::aten::Tensor& input,
109+
const ::executorch::aten::Tensor& weight,
110+
const ::executorch::aten::Tensor& bias,
111+
::executorch::aten::IntArrayRef stride,
112+
::executorch::aten::IntArrayRef padding,
113+
::executorch::aten::IntArrayRef dilation,
117114
int64_t groups,
118115
int64_t in_zero_point,
119116
int64_t weight_zero_point,
120117
double bias_scale,
121118
double output_scale,
122119
int64_t output_zero_point,
123-
__ET_UNUSED int64_t out_multiplier,
124-
__ET_UNUSED int64_t out_shift,
120+
int64_t out_multiplier,
121+
int64_t out_shift,
125122
bool channel_last,
126-
Tensor& out);
123+
::executorch::aten::Tensor& out);
127124

128125
} // namespace native
129126
} // namespace HiFi

0 commit comments

Comments
 (0)