-
Notifications
You must be signed in to change notification settings - Fork 19.6k
Correct implementation for several OpenVINO operations #21746
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
Correct implementation for several OpenVINO operations #21746
Conversation
Summary of ChangesHello @danielenricocahall, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the OpenVINO backend by addressing and correcting the implementations of key numerical operations such as "mean", "max", and "floor". It also expands test coverage by enabling previously excluded unit tests for these operations. The changes include a refactoring effort to consolidate redundant logic for "min" and "max" into a shared utility function, leading to a more robust and maintainable codebase for the OpenVINO backend. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces correct implementations for several OpenVINO operations (mean, max, floor) and enables their unit tests, which is a great step forward. The consolidation of duplicated logic for min/max into _compute_extrema and axis handling into _resolve_axis improves code maintainability. However, I've identified a couple of issues related to keepdims=True when axis=None that affect both mean and _compute_extrema (and by extension max and min). The proposed fixes should ensure NumPy-compliant behavior in these cases.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21746 +/- ##
==========================================
- Coverage 82.62% 82.62% -0.01%
==========================================
Files 572 572
Lines 58499 58518 +19
Branches 9143 9147 +4
==========================================
+ Hits 48336 48350 +14
- Misses 7838 7841 +3
- Partials 2325 2327 +2
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:
|
mean,max, andfloor(while ensuring tests with overlapping names, such astest_maximum...are still skipped for the time being)mean,max, andflooroperationsop_utilsmodule?)