Skip to content
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

MatrixBandPart operation for TensorFlow Hub models #22447

Closed

Conversation

himanshugupta11002
Copy link
Contributor

Details:

  • Implement the corresponding loader into op directory and named as matrix_band_part.cpp
    • according to hints given I was find the sizes m and n of two last dimension of input and generate ranges [0, m) and [0, n).
      Unsqueeze these ranges so that to have tensor of shapes [m, 1] and [1, n]
  • Register it into the dictionary of loaders
  • Then apply the logical operations
  • Implement the layer test for this operation

Problem when I am running on Codespaces it give me so many errors on which I am currently working on.

Tickets:

@himanshugupta11002 himanshugupta11002 requested a review from a team as a code owner January 26, 2024 08:44
@github-actions github-actions bot added category: TF FE OpenVINO TensorFlow FrontEnd category: TFL FE OpenVINO TensorFlow Lite FrontEnd labels Jan 26, 2024
@rkazants rkazants self-assigned this Jan 26, 2024
@rkazants
Copy link
Contributor

build_jenkins

Copy link
Contributor

@rkazants rkazants left a comment

Choose a reason for hiding this comment

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

@himanshugupta11002, please update https://github.com/openvinotoolkit/openvino/blob/master/src/frontends/tensorflow/docs/supported_ops.md documentation. It is recently added new check. Without it, Ci will fail.

@himanshugupta11002
Copy link
Contributor Author

okay I'll update it

@rkazants rkazants added the ExternalIntelPR External contributor from Intel label Jan 26, 2024
@rkazants rkazants added this to the 2024.0 milestone Jan 26, 2024
@rkazants
Copy link
Contributor

okay I'll update it

Hi @himanshugupta11002, any update on the fix? It should be very easy:)
Please do not delay.

Best regards,
Roman

@himanshugupta11002 himanshugupta11002 requested a review from a team as a code owner February 1, 2024 20:11
@himanshugupta11002 himanshugupta11002 requested review from zKulesza and removed request for a team February 1, 2024 20:11
@github-actions github-actions bot added the category: docs OpenVINO documentation label Feb 1, 2024
@rkazants
Copy link
Contributor

rkazants commented Feb 2, 2024

build_jenkins

Copy link
Contributor

@rkazants rkazants left a comment

Choose a reason for hiding this comment

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

Please apply code formatting

Copy link
Contributor

@rkazants rkazants left a comment

Choose a reason for hiding this comment

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

please apply comment. code-formatting is not yet applied

@rkazants
Copy link
Contributor

build_jenkins

@rkazants
Copy link
Contributor

Hi @himanshugupta11002,

can you please apply comments asap because we have code freeze for 2024.0 release tomorrow and your PR is highly recommended to be included?

Best regards,
Roman

@rkazants
Copy link
Contributor

build_jenkins

Comment on lines 71 to 75
make_shared<v1::Less>(make_shared<v1::Constant>(element::i64, Shape{}, {num_lower}), make_shared<v1::Constant>(element::i64, Shape{}, {0})),
make_shared<v1::LessEqual>(make_shared<v1::Subtract>(m, n), make_shared<v1::Constant>(element::i64, Shape{}, {num_lower}))
),
make_shared<v1::LogicalOr>(
make_shared<v1::Less>(make_shared<v1::Constant>(element::i64, Shape{}, {num_upper}), make_shared<v1::Constant>(element::i64, Shape{}, {0})),
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix num_lower and num_upper usage here as well.

),
make_shared<v1::LogicalOr>(
make_shared<v1::Less>(make_shared<v1::Constant>(element::i64, Shape{}, {num_upper}), make_shared<v1::Constant>(element::i64, Shape{}, {0})),
make_shared<v1::LessEqual>(make_shared<v1::Subtract>(n, m), make_shared<v1::Constant>(element::i64, Shape{}, {num_upper}))
Copy link
Contributor

@rkazants rkazants Feb 19, 2024

Choose a reason for hiding this comment

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

num_upper in Constant

@rkazants
Copy link
Contributor

Hi @himanshugupta11002, pls address comments above. I believe your PR is close to completeness.

Best regards,
Roman

@rkazants rkazants modified the milestones: 2024.0, 2024.1 Feb 21, 2024
@himanshugupta11002
Copy link
Contributor Author

Hi @rkazants, should I add comments in the matrixbandpart.cpp file, or should I add them in all files where I have made changes?

Copy link
Contributor

Choose a reason for hiding this comment

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

please revert this change

Copy link
Contributor

@rkazants rkazants Feb 26, 2024

Choose a reason for hiding this comment

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

@himanshugupta11002, can you please revert this asap? That is because it is blocking to merge PR and to enable StableDiffusion model from Keras.

Copy link
Contributor

Choose a reason for hiding this comment

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

please revert this change

@rkazants
Copy link
Contributor

Hi @himanshugupta11002, I am closing this PR. I fix your implementation there: #23082. Your contribution is preserved there.
I did so because we urgently need this translator for Keras StableDiffusion model support.

Best regards,
Roman

@rkazants rkazants closed this Feb 26, 2024
github-merge-queue bot pushed a commit that referenced this pull request Feb 26, 2024
**Details:** `MatrixBandPart` is needed to support Keras StableDiffusion
model. This is reserved PR for
#22447

**Ticket:** CVS-133786

---------

Signed-off-by: Kazantsev, Roman <[email protected]>
Co-authored-by: himanshugupta11002 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: docs OpenVINO documentation category: MO Model Optimizer category: TF FE OpenVINO TensorFlow FrontEnd category: TFL FE OpenVINO TensorFlow Lite FrontEnd ExternalIntelPR External contributor from Intel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Good First Issue][TF FE]: Support MatrixBandPart operation for TensorFlow Hub models
2 participants