-
Notifications
You must be signed in to change notification settings - Fork 19.6k
OpenVINO: linspace #21209
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: linspace #21209
Conversation
linspace and logspace Implementations
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #21209 +/- ##
==========================================
- Coverage 82.59% 82.55% -0.05%
==========================================
Files 564 564
Lines 54394 54683 +289
Branches 8459 8496 +37
==========================================
+ Hits 44929 45143 +214
- Misses 7391 7449 +58
- Partials 2074 2091 +17
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:
|
Requesting review: @rkazants / @mattdangerw |
start = ov_opset.convert(start, dtype).output(0) | ||
stop = ov_opset.convert(stop, dtype).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.
not needed because get_ov_output
already performs convert
. So please remove
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 review, @rkazants.
I've incorporated the rest of the changes but removing this seems to cause type errors.
num = ov_opset.constant(num, Type.i32).output(0) | ||
else: | ||
raise TypeError("`num` must be an int or OpenVINOKerasTensor.") | ||
num = ov_opset.convert(num, Type.i32).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.
not needed
keras/src/backend/openvino/numpy.py
Outdated
if isinstance(num, OpenVINOKerasTensor): | ||
num = get_ov_output(num, Type.i32) | ||
elif isinstance(num, int): | ||
num = ov_opset.constant(num, Type.i32).output(0) | ||
else: | ||
raise TypeError("`num` must be an int or OpenVINOKerasTensor.") |
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 think num = get_ov_output(num, Type.i32)
should be enought for all cases
keras/src/backend/openvino/numpy.py
Outdated
|
||
y = ov_opset.convert(y, out_dtype).output(0) | ||
if retstep: | ||
return OpenVINOKerasTensor(y), ov_opset.convert(step, out_dtype).output( |
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.
create return_step
variable and assign. return_step
should be wrapped with OpenVINOKerasTensor
@rkazants for review of linspace Implementations for OpenVINO.