[IE][VPU][TESTS]: Gather: support outer padding for indices (#3665)
* Update firmware * Add the test case from the network * Disable fp32 case, because in this case the network has output Convert which receives non-inner stride in its input which is not supported now. * Support FP16 comparator.
This commit is contained in:
1 parent
f90b6e85b8
commit
24237863b2
5 files changed
+44
-8
No files matched your search
@@ -6,14 +6,14 @@ include_guard(GLOBAL)
|
||||
|
||||
set(VPU_SUPPORTED_FIRMWARES usb-ma2x8x pcie-ma2x8x)
|
||||
set(VPU_SUPPORTED_FIRMWARES_HASH
|
||||
"ae5d571270919f03ad713ea27a1ccabd78a6c334faad8bb860aed88192967062"
|
||||
"c50742b4587369c44a9f65fbd66a8009fd14a76f4674a4e431c75c1330c8c780")
|
||||
"e22b4ef621f576e03ac5774d70fb1ed571c6af1f5b26eedcfce9ad44363617f2"
|
||||
"326551cc31ce05b762c9e4d8b700183c6f548f458289720e7de0c0ad12be62b2")
|
||||
|
||||
#
|
||||
# Default packages
|
||||
#
|
||||
|
||||
set(FIRMWARE_PACKAGE_VERSION 1567)
|
||||
set(FIRMWARE_PACKAGE_VERSION 1570)
|
||||
set(VPU_CLC_MA2X8X_VERSION "movi-cltools-20.09.2")
|
||||
|
||||
#
|
||||
|
||||
+3
-1
@@ -33,6 +33,8 @@ std::vector<std::string> disabledTestPatterns() {
|
||||
// TODO: Issue: 42721
|
||||
R"(.*(DSR_GatherND).*)",
|
||||
// TODO: Issue 43781
|
||||
".*ROIPoolingLayerTest.*"
|
||||
".*ROIPoolingLayerTest.*",
|
||||
// TODO: Issue 26090
|
||||
".*DSR_GatherStaticDataDynamicIdx.*f32.*1.3.200.304.*"
|
||||
};
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <shared_test_classes/base/layer_test_utils.hpp>
|
||||
#include <ngraph_functions/builders.hpp>
|
||||
#include <vpu/ngraph/operations/dynamic_shape_resolver.hpp>
|
||||
#include <ie_ngraph_utils.hpp>
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -37,6 +38,25 @@ using GatherParameters = std::tuple<
|
||||
|
||||
class DSR_GatherBase : public testing::WithParamInterface<GatherParameters>,
|
||||
public DSR_TestsCommon {
|
||||
public:
|
||||
static std::string getTestCaseName(testing::TestParamInfo<GatherParameters> obj) {
|
||||
DataType dataType, idxType;
|
||||
GatherTestCase gatherTestCase;
|
||||
LayerTestsUtils::TargetDevice targetDevice;
|
||||
std::tie(dataType, idxType, gatherTestCase, targetDevice) = obj.param;
|
||||
|
||||
std::ostringstream result;
|
||||
result << "DT=" << dataType << "_";
|
||||
result << "IT=" << idxType << "_";
|
||||
result << "DataRealShape=" << CommonTestUtils::vec2str(gatherTestCase.inputShapes.shape) << "_";
|
||||
result << "DataUBShape=" << CommonTestUtils::vec2str(gatherTestCase.inputShapes.upperBoundShape) << "_";
|
||||
result << "IdxRealShape=" << CommonTestUtils::vec2str(gatherTestCase.inputShapes.shape) << "_";
|
||||
result << "IdxUBShape=" << CommonTestUtils::vec2str(gatherTestCase.inputShapes.upperBoundShape) << "_";
|
||||
result << "Axis=" << gatherTestCase.axis << "_";
|
||||
result << "trgDev=" << targetDevice;
|
||||
return result.str();
|
||||
}
|
||||
|
||||
protected:
|
||||
std::set<std::string> m_indicesInputNames;
|
||||
|
||||
@@ -89,7 +109,8 @@ INSTANTIATE_TEST_CASE_P(smoke_DynamicGatherData, DSR_GatherDynamicDataStaticIdx,
|
||||
GatherTestCase{DataShapeWithUpperBound{{800}, {1000}}, DataShapeWithUpperBound{{700}, {}}, 0},
|
||||
GatherTestCase{DataShapeWithUpperBound{{800, 4}, {1000, 4}}, DataShapeWithUpperBound{{700}, {}}, 0},
|
||||
GatherTestCase{DataShapeWithUpperBound{{800, 4}, {1000, 4}}, DataShapeWithUpperBound{{700}, {}}, -2}),
|
||||
testing::Values(CommonTestUtils::DEVICE_MYRIAD)));
|
||||
testing::Values(CommonTestUtils::DEVICE_MYRIAD)),
|
||||
DSR_GatherBase::getTestCaseName);
|
||||
|
||||
|
||||
class DSR_GatherStaticDataDynamicIdx : public DSR_GatherBase {
|
||||
@@ -100,6 +121,7 @@ protected:
|
||||
const auto& idxType = std::get<1>(parameters);
|
||||
const auto& gatherSetup = std::get<2>(parameters);
|
||||
targetDevice = std::get<3>(parameters);
|
||||
outPrc = InferenceEngine::details::convertPrecision(inDataType);;
|
||||
|
||||
const auto dataParam = std::make_shared<ngraph::opset3::Parameter>(inDataType, gatherSetup.inputShapes.shape);
|
||||
m_parameterVector.push_back(dataParam);
|
||||
@@ -124,8 +146,10 @@ INSTANTIATE_TEST_CASE_P(smoke_DynamicGatherIdx, DSR_GatherStaticDataDynamicIdx,
|
||||
testing::Values(
|
||||
GatherTestCase{DataShapeWithUpperBound{{1000}, {}}, DataShapeWithUpperBound{{800}, {1000}}, 0},
|
||||
GatherTestCase{DataShapeWithUpperBound{{1000, 4}, {}}, DataShapeWithUpperBound{{800}, {1000}}, 0},
|
||||
GatherTestCase{DataShapeWithUpperBound{{1000, 4}, {}}, DataShapeWithUpperBound{{800}, {1000}}, -2}),
|
||||
testing::Values(CommonTestUtils::DEVICE_MYRIAD)));
|
||||
GatherTestCase{DataShapeWithUpperBound{{1000, 4}, {}}, DataShapeWithUpperBound{{800}, {1000}}, -2},
|
||||
GatherTestCase{DataShapeWithUpperBound{{1, 3, 200, 304}, {}}, DataShapeWithUpperBound{{142, 64}, {300, 64}}, 2}),
|
||||
testing::Values(CommonTestUtils::DEVICE_MYRIAD)),
|
||||
DSR_GatherBase::getTestCaseName);
|
||||
|
||||
|
||||
class DSR_GatherDynamicDataDynamicIdx : public DSR_GatherBase {
|
||||
@@ -160,6 +184,7 @@ INSTANTIATE_TEST_CASE_P(smoke_DynamicGather, DSR_GatherDynamicDataDynamicIdx, te
|
||||
GatherTestCase{DataShapeWithUpperBound{{800}, {1000}}, DataShapeWithUpperBound{{700}, {1000}}, 0},
|
||||
GatherTestCase{DataShapeWithUpperBound{{800, 4}, {1000, 4}}, DataShapeWithUpperBound{{700}, {1000}}, 0},
|
||||
GatherTestCase{DataShapeWithUpperBound{{800, 4}, {1000, 4}}, DataShapeWithUpperBound{{700}, {1000}}, -2}),
|
||||
testing::Values(CommonTestUtils::DEVICE_MYRIAD)));
|
||||
testing::Values(CommonTestUtils::DEVICE_MYRIAD)),
|
||||
DSR_GatherBase::getTestCaseName);
|
||||
|
||||
} // namespace
|
||||
@@ -270,6 +270,10 @@ void LayerTestsCommon::Compare(const std::vector<std::uint8_t> &expected, const
|
||||
Compare(reinterpret_cast<const ngraph::bfloat16 *>(expectedBuffer),
|
||||
reinterpret_cast<const ngraph::bfloat16 *>(actualBuffer), size, ngraph::bfloat16(threshold));
|
||||
break;
|
||||
case InferenceEngine::Precision::FP16:
|
||||
Compare(reinterpret_cast<const ngraph::float16 *>(expectedBuffer),
|
||||
reinterpret_cast<const ngraph::float16 *>(actualBuffer), size, ngraph::float16(threshold));
|
||||
break;
|
||||
default:
|
||||
FAIL() << "Comparator for " << precision << " precision isn't supported";
|
||||
}
|
||||
|
||||
@@ -299,4 +299,9 @@ static ie_abs(const T &val) {
|
||||
static ngraph::bfloat16 ie_abs(const ngraph::bfloat16& val) {
|
||||
return ngraph::bfloat16::from_bits(val.to_bits() ^ 0x8000);
|
||||
}
|
||||
|
||||
static ngraph::float16 ie_abs(const ngraph::float16& val) {
|
||||
return ngraph::float16::from_bits(val.to_bits() ^ 0x8000);
|
||||
}
|
||||
|
||||
} // namespace CommonTestUtils
|
||||
Reference in new issue
Block a user