-
Notifications
You must be signed in to change notification settings - Fork 19.6k
[OpenVINO Backend]: support numpy.ndim #21176
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
Conversation
Signed-off-by: 11happy <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #21176 +/- ##
=======================================
Coverage 82.58% 82.58%
=======================================
Files 564 564
Lines 54359 54363 +4
Branches 8448 8448
=======================================
+ Hits 44891 44895 +4
Misses 7393 7393
Partials 2075 2075
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
keras/src/backend/openvino/numpy.py
Outdated
x = get_ov_output(x) | ||
x_shape = x.get_partial_shape() | ||
x_dim = x_shape.rank.get_length() |
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.
let us better implement this using ShapeOf->ShapeOf subgraph
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.
done, however I am curious about the two approaches, from a performance standpoint, would one approach be more efficient than the other?
Thank you
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.
No performance advantage. In case dynamic rank, get_length
will return exception and ShapeOf->Shape
approach will work.
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.
Thank you, I appreciate the explanation.
Signed-off-by: 11happy <[email protected]>
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.
@fchollet, look good to me. Recommend to merge
Overview:
Testing:
CC: