Skip to content

[OV2.0] Leftovers for Preprocessing/input/output#7893

Merged
ilya-lavrenov merged 4 commits intoopenvinotoolkit:masterfrom
nosovmik:ov/input_leftovers
Oct 8, 2021
Merged

[OV2.0] Leftovers for Preprocessing/input/output#7893
ilya-lavrenov merged 4 commits intoopenvinotoolkit:masterfrom
nosovmik:ov/input_leftovers

Conversation

@nosovmik
Copy link
Copy Markdown
Contributor

@nosovmik nosovmik commented Oct 7, 2021

Details:

Pre-process:

  • Implicit conversions for element type and layout
  • 'convert_element_type' with default argument to network
  • Convert_element_type - don't add ops if 'dst' and 'src' types are same
  • Convert_layout - don't add ops if 'dst' and 'src' layouts are same
  • Custom step - use Output instead of shared_ptr
  • Support of addressing input by tensor name

Post-process:

  • Avoid duplication of tensor names after post-processing

Test coverage: 100%

Tickets:

  • 62178, 67410

@nosovmik nosovmik requested review from a team, ilya-lavrenov and ilyachur October 7, 2021 15:26
@openvino-pushbot openvino-pushbot added category: TEMPLATE OpenVINO Template plugin category: IE Tests OpenVINO Test: plugins and common category: Core OpenVINO Core (aka ngraph) labels Oct 7, 2021
// layouts)
if (src_layout == dst) {
return {}; // No permutation is needed
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another option is to return 0 1 2 .. rank-1, but not sure which one is better. Your one maybe more easy to check for end users, but from math point of view NCHW -> NCHW is 0123

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, when I'll implement dynamic conversion "NC??" to "NCHW" - result will be [0, 1, 2, 3] and probably I'll add some logic here to return empty array for this case (for easier check). Also this find_permutation is not exported for end user yet to have more freedom for us

- Implicit conversions for element type and layout
- 'convert_element_type' with default argument to network
- Convert_element_type - don't add ops if dst and src types are same
- Convert_layout - don't add ops if dst and src layouts are same
- Custom step - use Output<Node> instead of shared_ptr<Node>
- Support of addressing input by tensor name

Post-process:
- Avoid duplication of tensor names after post-processing
# Conflicts:
#	ngraph/core/src/preprocess/preprocess_steps_impl.cpp
@ilya-lavrenov ilya-lavrenov self-assigned this Oct 7, 2021
@ilya-lavrenov ilya-lavrenov added this to the 2022.1 milestone Oct 7, 2021
/// \brief Constructor for particular output of model addressed by it's input name
///
/// \param input_tensor_name Name of input tensor name
explicit InputInfo(const std::string& input_tensor_name);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have tests for these constructors?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is covered by tests

@ilya-lavrenov ilya-lavrenov merged commit 2592856 into openvinotoolkit:master Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: Core OpenVINO Core (aka ngraph) category: IE Tests OpenVINO Test: plugins and common category: TEMPLATE OpenVINO Template plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants