Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions backends/cadence/generic/operators/op_quantized_conv2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,40 @@ Tensor& quantized_conv2d_nhwc_per_tensor_out(
return out;
}

Tensor& quantized_conv2d_depthwise_nhwc_out(
ET_UNUSED KernelRuntimeContext& ctx,
const Tensor& input,
const Tensor& weight,
const Tensor& bias,
IntArrayRef stride,
IntArrayRef padding,
IntArrayRef dilation,
int64_t groups,
int64_t in_zero_point,
int64_t weight_zero_point,
double bias_scale,
double output_scale,
int64_t output_zero_point,
ET_UNUSED int64_t out_multiplier,
ET_UNUSED int64_t out_shift,
Tensor& out) {
quantized_conv2d_nhwc(
input,
weight,
bias,
stride,
padding,
dilation,
static_cast<int16_t>(groups),
static_cast<int32_t>(in_zero_point),
static_cast<int32_t>(weight_zero_point),
static_cast<float>(bias_scale),
static_cast<float>(output_scale),
static_cast<int32_t>(output_zero_point),
out);
return out;
}

Tensor& quantized_conv2d_nhwc_asym8sxsym8s_asym8s_per_tensor_out(
ET_UNUSED KernelRuntimeContext& ctx,
const Tensor& input,
Expand Down
18 changes: 18 additions & 0 deletions backends/cadence/generic/operators/op_quantized_conv2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,24 @@ ::executorch::aten::Tensor& quantized_conv2d_nhwc_per_tensor_out(
int64_t out_shift,
Tensor& out);

::executorch::aten::Tensor& quantized_conv2d_depthwise_nhwc_out(
KernelRuntimeContext& ctx,
const Tensor& input,
const Tensor& weight,
const Tensor& bias,
IntArrayRef stride,
IntArrayRef padding,
IntArrayRef dilation,
int64_t groups,
int64_t in_zero_point,
int64_t weight_zero_point,
double bias_scale,
double output_scale,
int64_t output_zero_point,
int64_t out_multiplier,
int64_t out_shift,
Tensor& out);

::executorch::aten::Tensor&
quantized_conv2d_nhwc_asym8sxsym8s_asym8s_per_tensor_out(
KernelRuntimeContext& ctx,
Expand Down
Loading