summaryrefslogtreecommitdiff
path: root/runtime/onert/backend/cpu/ops/DepthwiseConvolutionLayer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/onert/backend/cpu/ops/DepthwiseConvolutionLayer.cc')
-rw-r--r--runtime/onert/backend/cpu/ops/DepthwiseConvolutionLayer.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/runtime/onert/backend/cpu/ops/DepthwiseConvolutionLayer.cc b/runtime/onert/backend/cpu/ops/DepthwiseConvolutionLayer.cc
index f1dc1103a..85553d14d 100644
--- a/runtime/onert/backend/cpu/ops/DepthwiseConvolutionLayer.cc
+++ b/runtime/onert/backend/cpu/ops/DepthwiseConvolutionLayer.cc
@@ -43,11 +43,12 @@ void DepthwiseConvolutionLayer::convFloat32()
op_params.float_activation_min = output_activation_min;
op_params.float_activation_max = output_activation_max;
- nnfw::cker::DepthwiseConv(
+ nnfw::cker::DepthwiseConv<float, float>(
op_params, getTensorShape(_input), reinterpret_cast<const float *>(_input->buffer()),
getTensorShape(_kernel), reinterpret_cast<const float *>(_kernel->buffer()),
getTensorShape(_bias), reinterpret_cast<const float *>(_bias->buffer()),
- getTensorShape(_output), reinterpret_cast<float *>(_output->buffer()));
+ getTensorShape(_output), reinterpret_cast<float *>(_output->buffer()),
+ _external_context->ruy_context());
}
void DepthwiseConvolutionLayer::convQuant8()
@@ -79,11 +80,12 @@ void DepthwiseConvolutionLayer::convQuant8()
op_params.quantized_activation_min = output_activation_min;
op_params.quantized_activation_max = output_activation_max;
- nnfw::cker::DepthwiseConv(
+ nnfw::cker::DepthwiseConv<uint8_t, int32_t>(
op_params, getTensorShape(_input), reinterpret_cast<const uint8_t *>(_input->buffer()),
getTensorShape(_kernel), reinterpret_cast<const uint8_t *>(_kernel->buffer()),
getTensorShape(_bias), reinterpret_cast<const int32_t *>(_bias->buffer()),
- getTensorShape(_output), reinterpret_cast<uint8_t *>(_output->buffer()));
+ getTensorShape(_output), reinterpret_cast<uint8_t *>(_output->buffer()),
+ _external_context->ruy_context());
}
void DepthwiseConvolutionLayer::configure(
@@ -91,7 +93,8 @@ void DepthwiseConvolutionLayer::configure(
const uint32_t paddingLeft, const uint32_t paddingRight, const uint32_t paddingTop,
const uint32_t paddingBottom, const uint32_t strideWidth, const uint32_t strideHeight,
const uint32_t multiplier, const uint32_t dilationWidth, const uint32_t dilationHeight,
- const ir::Activation activation, IPortableTensor *output)
+ const ir::Activation activation, IPortableTensor *output,
+ const std::shared_ptr<ExternalContext> &external_context)
{
_input = input;
_kernel = kernel;
@@ -107,6 +110,7 @@ void DepthwiseConvolutionLayer::configure(
_dilationHeight = dilationHeight;
_activation = activation;
_output = output;
+ _external_context = external_context;
}
void DepthwiseConvolutionLayer::run()