-
Notifications
You must be signed in to change notification settings - Fork 64
feat(atenlib): arange with overloads #285
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
Codecov Report
@@ Coverage Diff @@
## main #285 +/- ##
==========================================
+ Coverage 73.17% 73.26% +0.08%
==========================================
Files 95 95
Lines 9144 9171 +27
==========================================
+ Hits 6691 6719 +28
+ Misses 2453 2452 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
def aten_arange_start(start: TReal, end: TReal, dtype: int = -1) -> TReal: | ||
# arange.start(Scalar start, Scalar end, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor | ||
|
||
if dtype != -1: |
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.
Since TReal has limited dtypes, what if the given dtype doesn't exist in the scope of TReal?
Should we set a default value it to dtype in case the given value of dtype is not in the scope of TReal?
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.
Good point. I am considering if I should cast after Range
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.
Good point. I am considering if I should cast after Range
If we pass start/end/step with an unexpected dtype into op.Range, will it work successfully?
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.
Updated. It will work if dtype is specified. Otherwise they need to be casted before entering the function.
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.
LGTM, thanks!
arange ops