Skip to content

Commit

Permalink
[VPU][TESTS] fix sorting ref for myriadTestsTopK_smoke on macOS and c…
Browse files Browse the repository at this point in the history
…henged dynamic_pointer_cast to ngraph::is_type at dynamic_to_static_shape_squeeze.cpp
  • Loading branch information
Polina committed Dec 21, 2020
1 parent 129a655 commit 6ad773e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void dynamicToStaticShapeSqueeze(std::shared_ptr<ngraph::Node> target) {
target, ngraph::opset3::Squeeze::type_info);

const auto dsr = target->input_value(0).get_node_shared_ptr();
VPU_THROW_UNLESS(std::dynamic_pointer_cast<ngraph::vpu::op::DynamicShapeResolver>(dsr),
VPU_THROW_UNLESS(ngraph::is_type<ngraph::vpu::op::DynamicShapeResolver>(dsr),
"DynamicToStaticShape transformation for {} of type {} expects {} as input with index {}",
target->get_friendly_name(), target->get_type_info(), ngraph::vpu::op::DynamicShapeResolver::type_info, 0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1255,10 +1255,7 @@ namespace topk_impl {
typedef std::function<bool(const Pair&, const Pair&)> CompareFunction;

bool compareIndices(const Pair& a, const Pair& b) {
if (a.second < b.second) return true;
if (a.second > b.second) return false;

return true; // shouldn't occur since all indices are different
return (a.second < b.second);
}

bool compareValuesMax(const Pair& a, const Pair& b) {
Expand Down

0 comments on commit 6ad773e

Please sign in to comment.