VaridicSplit ref impl: No evaluate output if has zeros dimension (#12939)
* VaridicSplit ref impl: No evaluate output if has zeros dimension * Move check of zeros dims in output shape to the variadic_split::evaluate method
This commit is contained in:
@@ -58,16 +58,23 @@ inline bool evaluate(const HostTensorPtr& in,
|
||||
const HostTensorPtr& out,
|
||||
const Coordinate& lower_bounds,
|
||||
const Coordinate& upper_bounds) {
|
||||
runtime::reference::slice(in->get_data_ptr<const char>(),
|
||||
out->get_data_ptr<char>(),
|
||||
in->get_shape(),
|
||||
lower_bounds,
|
||||
upper_bounds,
|
||||
Strides(lower_bounds.size(), 1),
|
||||
out->get_shape(),
|
||||
in->get_element_type().size());
|
||||
const auto& output_shape = out->get_shape();
|
||||
auto has_nonzero_dims = std::all_of(output_shape.begin(), output_shape.end(), [](size_t dim) {
|
||||
return dim != 0;
|
||||
});
|
||||
|
||||
return true;
|
||||
if (has_nonzero_dims) {
|
||||
runtime::reference::slice(in->get_data_ptr<const char>(),
|
||||
out->get_data_ptr<char>(),
|
||||
in->get_shape(),
|
||||
lower_bounds,
|
||||
upper_bounds,
|
||||
Strides(lower_bounds.size(), 1),
|
||||
out->get_shape(),
|
||||
in->get_element_type().size());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} // namespace
|
||||
} // namespace variadic_split
|
||||
|
||||
@@ -143,7 +143,6 @@ std::vector<std::string> disabledTestPatterns() {
|
||||
R"(smoke_ConversionLayerTest/ConversionLayerTest.CompareWithRefs.*CUSTOM.*)",
|
||||
R"(smoke_ConversionLayerTest/ConversionLayerTest.CompareWithRefs.*UNSPECIFIED.*)",
|
||||
// Issue:
|
||||
R"(.*smoke_VariadicSplit4D_CPU_zero_dims.*)",
|
||||
// New API tensor tests
|
||||
R"(.*OVInferRequestCheckTensorPrecision.*type=i4.*)",
|
||||
R"(.*OVInferRequestCheckTensorPrecision.*type=u1.*)",
|
||||
|
||||
Reference in New Issue
Block a user