-
Notifications
You must be signed in to change notification settings - Fork 86
Add op (hsatck & vstack) | feat(torchlib) #762
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
Add op (hsatck & vstack) | feat(torchlib) #762
Conversation
|
Currently, for the issue that if/else block may return different shape/type, the alternative is to create 2 functions with different inputs for the same aten op, just like aten_bitwise_not. Could you please change this function as well? |
Need microsoft/onnxscript#762 [ghstack-poisoned]
Need microsoft/onnxscript#762 [ghstack-poisoned]
Need microsoft/onnxscript#762 [ghstack-poisoned]
Need microsoft/onnxscript#762 [ghstack-poisoned]
@torch_op("aten::atleast_1d") | ||
def aten_atleast_1d(self: Sequence[TTensor]) -> TTensor: | ||
"""atleast_1d(Tensor self) -> Tensor""" | ||
|
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.
👀
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.
Looks like it works.
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.
Yes, it works. The error is something else. For this particular case, if we need to move aten::atleast_1d to a private share node, it would be a whole 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.
I would then lift the whole function. Just don't call one aten in another because that will create dependency assumptions and limit our ability to refactor
return op.SequenceMap(self, body=reshape_to_1d) | ||
|
||
|
||
@torch_op("aten::atleast_1d", trace_only=True) |
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.
Possible to make it not trace only, such that the function name is retained in the graph?
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.
Would nested affect performance?
), | ||
xfail( | ||
"vstack", | ||
reason="fixme: A bug of constant-propagation optimization within the subgraph, we can avoid it by turning off graph-optimizations in session options", |
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.
Should we turn it off in test and file a bug to ORT?
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.
Would nested affect performance?
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.
xfail actually works. I think CI breaks because of something else. Actually @gramalingam spot the bug, but I can still file an issue to track.
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.
microsoft/onnxscript#762 is actually not used by FX graph. Fixes microsoft/onnx-converters-private#168 [ghstack-poisoned]
microsoft/onnxscript#762 is actually not used by FX graph. Fixes microsoft/onnx-converters-private#168 [ghstack-poisoned]
microsoft/onnxscript#762 is actually not used by FX graph. Fixes microsoft/onnx-converters-private#168 [ghstack-poisoned]
microsoft/onnxscript#762 is actually not used by FX graph. Fixes microsoft/onnx-converters-private#168 [ghstack-poisoned]
microsoft/onnxscript#762 is actually not used by FX graph. Fixes microsoft/onnx-converters-private#168 [ghstack-poisoned]
microsoft/onnxscript#762 is actually not used by FX graph. Fixes microsoft/onnx-converters-private#168 [ghstack-poisoned]
microsoft/onnxscript#762 is actually not used by FX graph. Fixes microsoft/onnx-converters-private#168 [ghstack-poisoned]
microsoft/onnxscript#762 is actually not used by FX graph. Fixes microsoft/onnx-converters-private#168 [ghstack-poisoned]
microsoft/onnxscript#762 is actually not used by FX graph. Fixes https://github.com/microsoft/onnx-converters-private/issues/168 Pull Request resolved: #102872 Approved by: https://github.com/justinchuby
Missing operator: https://github.com/microsoft/onnx-converters-private/issues/168
Follow up issue track: microsoft/onnxruntime#16296