diff options
author | Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> | 2019-07-04 11:59:48 +0100 |
---|---|---|
committer | Áron Virginás-Tar <aron.virginas-tar@arm.com> | 2019-07-05 10:17:10 +0000 |
commit | fb2fa29e83e5ed7cd8ddf90ffb95946e7498f365 (patch) | |
tree | 511a6b94b2631c90afc91926a4665787f8ee5510 /1.2/HalPolicy.cpp | |
parent | 7a6d11bf423bf7e67cc81074bb4745b0babf59c0 (diff) | |
download | android-nn-driver-fb2fa29e83e5ed7cd8ddf90ffb95946e7498f365.tar.gz |
IVGCVSW-3402 Support HAL 1.2 version of ResizeBilinear
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
Change-Id: Ide4754ccfd905b85afafd0eb626973f0745fe6ec
Diffstat (limited to '1.2/HalPolicy.cpp')
-rw-r--r-- | 1.2/HalPolicy.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/1.2/HalPolicy.cpp b/1.2/HalPolicy.cpp index 99cc9802..1c6159ef 100644 --- a/1.2/HalPolicy.cpp +++ b/1.2/HalPolicy.cpp @@ -42,7 +42,6 @@ bool HandledByV1_0(V1_2::OperationType operationType) case V1_0::OperationType::RELU1: case V1_0::OperationType::RELU6: case V1_0::OperationType::RESHAPE: - case V1_0::OperationType::RESIZE_BILINEAR: case V1_0::OperationType::RNN: case V1_0::OperationType::SOFTMAX: case V1_0::OperationType::SPACE_TO_DEPTH: @@ -142,8 +141,10 @@ bool HalPolicy::ConvertOperation(const Operation& operation, const Model& model, return ConvertDepthwiseConv2d(operation, model, data); case V1_2::OperationType::PRELU: return ConvertPrelu(operation, model, data); + case V1_2::OperationType::RESIZE_BILINEAR: + return ConvertResize(operation, model, data, armnn::ResizeMethod::Bilinear); case V1_2::OperationType::RESIZE_NEAREST_NEIGHBOR: - return ConvertResizeNearestNeighbor(operation, model, data); + return ConvertResize(operation, model, data, armnn::ResizeMethod::NearestNeighbor); default: return Fail("%s: Operation type %s not supported in ArmnnDriver", __func__, toString(operation.type).c_str()); @@ -472,7 +473,10 @@ bool HalPolicy::ConvertPrelu(const Operation& operation, const Model& model, Con return SetupAndTrackLayerOutputSlot<hal_1_2::HalPolicy>(operation, 0, *layer, model, data); } -bool HalPolicy::ConvertResizeNearestNeighbor(const Operation& operation, const Model& model, ConversionData& data) +bool HalPolicy::ConvertResize(const Operation& operation, + const Model& model, + ConversionData& data, + armnn::ResizeMethod resizeMethod) { LayerInputHandle input = ConvertToLayerInputHandle<hal_1_2::HalPolicy>(operation, 0, model, data); if (!input.IsValid()) @@ -490,7 +494,7 @@ bool HalPolicy::ConvertResizeNearestNeighbor(const Operation& operation, const M const armnn::TensorInfo& outputInfo = GetTensorInfoForOperand(*output); armnn::ResizeDescriptor descriptor; - descriptor.m_Method = armnn::ResizeMethod::NearestNeighbor; + descriptor.m_Method = resizeMethod; descriptor.m_DataLayout = OptionalDataLayout<hal_1_2::HalPolicy>(operation, 3, model, data); OperandType operandType1; |