Skip to content

Commit 6e3cb79

Browse files
authored
to make TIE quantized conv operator to fall back to hifi quantized conv op instead of cpu op for shapes not supported by the TIE kernel.
Differential Revision: D74337713 Pull Request resolved: #10770
1 parent b1b46ee commit 6e3cb79

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

backends/cadence/hifi/operators/operators.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
_(uint8_t, Byte) \
1313
_(int8_t, Char)
1414

15+
using ::executorch::aten::IntArrayRef;
1516
using ::executorch::aten::optional;
1617
using ::executorch::aten::ScalarType;
1718
using ::executorch::aten::Tensor;
@@ -67,6 +68,44 @@ void quantized_linear_per_tensor_out(
6768
__ET_UNUSED const optional<Tensor>& offset,
6869
Tensor& out);
6970

71+
void quantized_conv_out(
72+
__ET_UNUSED KernelRuntimeContext& ctx,
73+
const Tensor& input,
74+
const Tensor& weight,
75+
const Tensor& bias,
76+
IntArrayRef stride,
77+
IntArrayRef padding,
78+
IntArrayRef dilation,
79+
int64_t groups,
80+
int64_t in_zero_point,
81+
const Tensor& weight_zero_point,
82+
const Tensor& bias_scale,
83+
double output_scale,
84+
int64_t output_zero_point,
85+
__ET_UNUSED const Tensor& out_multiplier,
86+
__ET_UNUSED const Tensor& out_shift,
87+
bool channel_last,
88+
Tensor& out);
89+
90+
void quantized_conv_per_tensor_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,
98+
int64_t groups,
99+
int64_t in_zero_point,
100+
int64_t weight_zero_point,
101+
double bias_scale,
102+
double output_scale,
103+
int64_t output_zero_point,
104+
__ET_UNUSED int64_t out_multiplier,
105+
__ET_UNUSED int64_t out_shift,
106+
bool channel_last,
107+
Tensor& out);
108+
70109
} // namespace native
71110
} // namespace HiFi
72111
} // namespace impl

0 commit comments

Comments
 (0)