-
Notifications
You must be signed in to change notification settings - Fork 276
Add tensorflow tensor support #3340
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
Add tensorflow tensor support #3340
Conversation
|
I've implemented the suggested change to the save_file.register decorator. I've also fixed string literals in exceptions in tf_linalg.py and tf_numeric.py to address the pre-commit linting issues that were causing CI failures. The PR should be ready for review now. |
Hi @darshil929 |
…ersion changes, and improve tensor device handling
I'm analyzing the precommit issues now and will get them fixed as soon as possible. |
Sure sir, I am working on a example-prototype to add as a part of my proposal and demonstrate my understandings which will take a little time to complete. As soon as it is done, I will email you the draft. |
Could you check that adding |
Sir, I have made the required changes. |
|
Hi @alexsu52
All tests now pass. Could you please review when you have a chance. |
…-framework testing
|
Hi @alexsu52 Sir, I've successfully moved norm tests to the TemplateTestNNCFTensorOperators class. All tests are running perfectly on the TensorFlow backend. However, there are some failures on PyTorch and NumPy backends. Could you please advice if I should modify the backend implementations to handle these edge cases? Thank you! |
Hi @darshil929, Thank you for the contribution! Please, update tests regarding the description of the norm function https://github.com/alexsu52/nncf/blob/develop/nncf/tensor/functions/linalg.py#L19. For example, the test Some insights, numpy behavior is the default behavior unless otherwise noted. If you find a bug in the numpy, pytorch or openvino backends, please feel free to fix it. Please also keep the function description up to date. |
alexsu52
left a comment
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.
Please, fix the pre-commit tests.
|
Sir, I've updated the norm tests to align with the documented behavior in I've also preserved the TensorFlow implementation's extended capabilities for All tests are now passing. Could you please review these changes? Thanks! |
alexsu52
left a comment
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.
LGTM




Changes
ord=0in tf_linalg.py's norm functionReason for changes
Right now TensorFlow tensors don't work with nncf.Tensor, which is blocking issue #3041 from being done. This PR adds TensorFlow backend support so we can use TensorFlow tensors with NNCF operations. I'm continuing the work from PR #3106 but fixing some things reviewers pointed out and adding stuff that was missing.
Related tickets
#3041
#3106
Tests