-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend Einsum Core and common transformation to support broadcasting, repeated labels and ellipsis #28151
base: master
Are you sure you want to change the base?
Extend Einsum Core and common transformation to support broadcasting, repeated labels and ellipsis #28151
Conversation
Signed-off-by: MATEUSZ MIKOLAJCZYK <MATEUSZ.MIKOLAJCZYK@intel.com>
Signed-off-by: MATEUSZ MIKOLAJCZYK <MATEUSZ.MIKOLAJCZYK@intel.com>
Signed-off-by: MATEUSZ MIKOLAJCZYK <MATEUSZ.MIKOLAJCZYK@intel.com>
…into mateuszm/einsum/core
Signed-off-by: MATEUSZ MIKOLAJCZYK <MATEUSZ.MIKOLAJCZYK@intel.com>
…into mateuszm/einsum/core
Signed-off-by: MATEUSZ MIKOLAJCZYK <MATEUSZ.MIKOLAJCZYK@intel.com>
Signed-off-by: MATEUSZ MIKOLAJCZYK <MATEUSZ.MIKOLAJCZYK@intel.com>
…rom Einsum Signed-off-by: MATEUSZ MIKOLAJCZYK <MATEUSZ.MIKOLAJCZYK@intel.com>
…into mateuszm/einsum/core
Signed-off-by: MATEUSZ MIKOLAJCZYK <MATEUSZ.MIKOLAJCZYK@intel.com>
Signed-off-by: MATEUSZ MIKOLAJCZYK <MATEUSZ.MIKOLAJCZYK@intel.com>
Signed-off-by: MATEUSZ MIKOLAJCZYK <MATEUSZ.MIKOLAJCZYK@intel.com>
Signed-off-by: MATEUSZ MIKOLAJCZYK <MATEUSZ.MIKOLAJCZYK@intel.com>
…position Signed-off-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>
Signed-off-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>
Signed-off-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>
…larity Signed-off-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>
…into mateuszm/einsum/core
…improved clarity Signed-off-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>
Signed-off-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>
Signed-off-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are three model tests enabled in this PR, making it valuable work.
However, the complexity of the changes makes the review process non-trivial.
Please share more context about the problem that has been resolved, the solution applied to the decomposition, and the expected subgraph.
@@ -491,6 +837,7 @@ void contract_two_inputs(ov::pass::EinsumDecomposition* einsum_decompose_ptr, | |||
std::vector<int64_t> common_labels_inds1, common_labels_inds2; | |||
std::vector<int64_t> separate_labels_inds1, separate_labels_inds2; | |||
std::vector<int64_t> reduced_labels_inds1, reduced_labels_inds2; | |||
std::vector<std::string> common_labels, sep_labels1, sep_labels2, reduced_labels; // +++++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::vector<std::string> common_labels, sep_labels1, sep_labels2, reduced_labels; // +++++ | |
std::vector<std::string> common_labels, sep_labels1, sep_labels2, reduced_labels; |
!has_ellipsis_in_input || (input_nodes[i].get_partial_shape().rank().get_length() == | ||
static_cast<ov::Dimension::value_type>(labels.size() - 1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To call get_partial_shape().rank().get_length()
static rank must be ensured, if it is ensured at this point, then get_partial_shape().size()
could be used instead. Also it may be better to add to the input rank instead of subtract from the labels size, just to avoid overflow for empty labels vector.
!has_ellipsis_in_input || (input_nodes[i].get_partial_shape().rank().get_length() == | |
static_cast<ov::Dimension::value_type>(labels.size() - 1)); | |
!has_ellipsis_in_input || ((input_nodes[i].get_partial_shape().size() + 1) == labels.size()); |
Details:
Tickets: