diff options
author | Chunseok Lee <chunseok.lee@samsung.com> | 2020-12-14 14:43:43 +0900 |
---|---|---|
committer | Chunseok Lee <chunseok.lee@samsung.com> | 2020-12-14 14:43:43 +0900 |
commit | 62529acabbafce7730601ed01d5709d7bc0d378a (patch) | |
tree | bf6912cfa8fac4a2997292bfcb3c82055734c97e /runtime/onert/backend/cpu/ops/DepthwiseConvolutionLayer.cc | |
parent | 6ea13af5257155ff993c205cf997b870cc627f73 (diff) | |
download | nnfw-62529acabbafce7730601ed01d5709d7bc0d378a.tar.gz nnfw-62529acabbafce7730601ed01d5709d7bc0d378a.tar.bz2 nnfw-62529acabbafce7730601ed01d5709d7bc0d378a.zip |
Imported Upstream version 1.12.0upstream/1.12.0
Diffstat (limited to 'runtime/onert/backend/cpu/ops/DepthwiseConvolutionLayer.cc')
-rw-r--r-- | runtime/onert/backend/cpu/ops/DepthwiseConvolutionLayer.cc | 14 |
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() |