From 3b959603ab1e3dc7b7b70798f357b3fe6c0e47c8 Mon Sep 17 00:00:00 2001 From: Teresa Charlin Date: Thu, 31 Oct 2019 17:05:47 +0000 Subject: MLCE-143 Fix for reference implementation for service stopping when running CTS. *ConvertDepthwise reports that weights are not supported with the first dimension of the tensor is not 1 *ConvertConcat was missing one case for reporting unsupported inputs. Signed-off-by: Teresa Charlin Change-Id: I7759ad2fea55d272e98b9eabbf4821dc9ac826e1 --- 1.2/HalPolicy.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '1.2') diff --git a/1.2/HalPolicy.cpp b/1.2/HalPolicy.cpp index 86b3bb78..7e9a2233 100644 --- a/1.2/HalPolicy.cpp +++ b/1.2/HalPolicy.cpp @@ -420,6 +420,12 @@ bool HalPolicy::ConvertDepthwiseConv2d(const Operation& operation, const Model& { return Fail("%s: Operand is invalid", __func__); } + if ( weightsOperand->dimensions[0] != 1) + { + return Fail("%s: Invalid weights; for depthwise convolution, dimension 0 must be 1 but it is %i", + __func__, weightsOperand->dimensions[0] ); + } + DepthwiseConvolution2dDescriptor desc; desc.m_DataLayout = DataLayout::NHWC; -- cgit v1.2.1