-
Notifications
You must be signed in to change notification settings - Fork 64
feat(atenlib): add, sub, mul #235
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
[ghstack-poisoned]
…ctory" [ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
… tests with OpInfo" [ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
return op.Mul(self, other) | ||
|
||
|
||
def aten_mul_bool(self: TensorType, other: TensorType) -> TensorType: |
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.
Need to test this as well
Codecov Report
@@ Coverage Diff @@
## main #235 +/- ##
==========================================
+ Coverage 71.65% 71.69% +0.04%
==========================================
Files 93 93
Lines 8827 8833 +6
==========================================
+ Hits 6325 6333 +8
+ Misses 2502 2500 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
lintrunner found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
return op.Mul(self, other) | ||
|
||
|
||
def aten_mul_bool(self: BOOL, other: BOOL) -> BOOL: |
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.
BOOL[...]
instead of BOOL
? Unless the type-annotation-design is going to change the meaning of BOOL
, which is currently a tensor of rank-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.
yeah but mypy complains about BOOL[...]
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’ll see if I can turn it off
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.
Couldn't make it to work. I will leave it as is for now as update when things fit together. Currently the types for the ops are also BOOL etc. I think?
@@ -157,14 +157,19 @@ def wrapped(fn): | |||
|
|||
# Ops to be tested for numerical consistency between onnx and pytorch | |||
OPINFO_FUNCTION_MAPPING = { | |||
"add": core_ops.aten_add, |
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.
For my own knowledge: what is core_ops
a reference to? I see core.py
above.
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.
Oh, I see it's just an alias for the same
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!
[ghstack-poisoned]
[ghstack-poisoned]
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #235 * #223 * __->__ #212
[ghstack-poisoned]
[ghstack-poisoned]
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * #235 * __->__ #223
Stack from ghstack (oldest at bottom):