-
Notifications
You must be signed in to change notification settings - Fork 19.6k
[OpenVINO Backend] Support numpy min operation #21168
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #21168 +/- ##
==========================================
- Coverage 82.69% 82.60% -0.09%
==========================================
Files 564 564
Lines 54223 54434 +211
Branches 8424 8456 +32
==========================================
+ Hits 44837 44963 +126
- Misses 7310 7396 +86
+ Partials 2076 2075 -1
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:
|
@@ -35,7 +35,6 @@ NumpyDtypeTest::test_max | |||
NumpyDtypeTest::test_mean | |||
NumpyDtypeTest::test_median | |||
NumpyDtypeTest::test_meshgrid | |||
NumpyDtypeTest::test_min | |||
NumpyDtypeTest::test_moveaxis |
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 add line with NumpyDtypeTest::test_minimum_python_types
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.
I have added it. Thank you!
keras/src/backend/openvino/numpy.py
Outdated
is_empty = False | ||
for dim in x_shape: | ||
if dim == 0: | ||
is_empty = True | ||
break |
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 skip is_empty
case at all because this is invalid case for which it throws exception.
We assume that x
is not empty always.
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 remove is_empty
case related code
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.
I have removed the is_empty
case. Thanks
keras/src/backend/openvino/numpy.py
Outdated
|
||
return OpenVINOKerasTensor(result) | ||
|
||
if axis is None and initial is not None: |
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 handle initial input at the final step. It is the same for all cases.
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.
Handled at the end. Thanks
keras/src/backend/openvino/numpy.py
Outdated
if is_bool: | ||
result = ov_opset.convert(result, Type.boolean).output(0) |
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 handle it finally. It same for all cases
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.
Handled finally. Thanks
@rkazants Could you please review the changes? |
@rkazants
Closes: openvinotoolkit/openvino#30117