-
Notifications
You must be signed in to change notification settings - Fork 19.6k
[OpenVINO Backend] support ops.where #21295
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?
[OpenVINO Backend] support ops.where #21295
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21295 +/- ##
==========================================
- Coverage 82.57% 79.76% -2.82%
==========================================
Files 564 564
Lines 54677 54689 +12
Branches 8500 8503 +3
==========================================
- Hits 45152 43625 -1527
- Misses 7435 9035 +1600
+ Partials 2090 2029 -61
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
if x1_type == Type.boolean or x2_type == Type.boolean: | ||
x1 = get_ov_output(x1) | ||
x2 = get_ov_output(x2) | ||
elif is_x1_number and not (isinstance(x1, float) and x2_integral): | ||
x2 = get_ov_output(x2) | ||
x1 = get_ov_output(x1, x2_type) | ||
elif is_x2_number and not (isinstance(x2, float) and x1_integral): | ||
x1 = get_ov_output(x1) | ||
x2 = get_ov_output(x2, x1_type) | ||
else: | ||
x1 = get_ov_output(x1) | ||
x2 = get_ov_output(x2) | ||
x1, x2 = _align_operand_types(x1, x2, "select()") |
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 do and see what failures will be:
x1 = get_ov_output(x1)
x2 = get_ov_output(x2)
x1, x2 = _align_operand_types(x1, x2, "select()")
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.
Now the code is quite tricky and there are many workarounds here - not clean logic
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.
Thanks for your feedback. I know it’s a bit rough, but I tried to keep it clear and pass the format tests. I appreciate any suggestions.
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, I’ve removed all the logic and kept the _align_operand_types
as suggested. Running the tests now.
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 do and see what failures will be:
x1 = get_ov_output(x1) x2 = get_ov_output(x2) x1, x2 = _align_operand_types(x1, x2, "select()")
Hi @rkazants
I just wanted to kindly follow up on the recent changes I made based on your suggestion regarding _align_operand_types
. Please let me know if there's anything else you'd like me to adjust.
Thanks!
d9b5b2c
to
4f27995
Compare
Hi @rkazants
I've supported
ops.where
, which I need for my GSoC project.Could you please review it?
Thanks!