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
[ONNX] Update Reducesum operator for opset 13 #50532
Conversation
💊 CI failures summary and remediationsAs of commit 4061597 (more details on the Dr. CI page):
🕵️ 5 new failures recognized by patternsThe following CI failures do not appear to be due to upstream breakages: pytorch_linux_bionic_py3_8_gcc9_coverage_test1 (1/5)Step: "Run tests" (full log | diagnosis details | 🔁 rerun)
|
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.
Is pending squeeze/unsqueeze PR.
torch/onnx/symbolic_opset13.py
Outdated
|
||
block_listed_operators = ['embedding_bag'] | ||
block_listed_operators = [''] |
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. If block_listed_operators is empty and not used, please remove this and lines 15-16.
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, removed it. And also update the code in reducesum symbolics to use the helper function.
@@ -108,3 +111,102 @@ def unbind(g, self, dim=0, _outputs=None): | |||
def glu(g, input, dim): | |||
first, second = g.op('Split', input, dim, outputs=2) | |||
return g.op('Mul', first, g.op('Sigmoid', second)) | |||
|
|||
|
|||
def _reduce_op_symbolic(onnx_op_name): |
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.
Changes for sum and embedding_bag look good. Thanks.
7d16f5a
to
d894078
Compare
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.
* udpate symbolic for squeeze/unsqueeze * update c++ unsqueeze/squeeze creation * clang format * enable tests * clang format * remove prints * remove magic number * add helper function * fix build issue * update opset9 symbolic with helper function * fix utility test * fix prim_fallthrough opset skip * enable reducesum opset 13 * enable embedding_bag which contain reducesum op * add ReduceSum helper * remove block_listed_operators * remove local test code * remove embedding_bag() in opset13 file * remove unuse import Co-authored-by: BowenBao <bowbao@microsoft.com> Co-authored-by: hwangdeyu <deyhuang@qq.com> [ghstack-poisoned]
* udpate symbolic for squeeze/unsqueeze * update c++ unsqueeze/squeeze creation * clang format * enable tests * clang format * remove prints * remove magic number * add helper function * fix build issue * update opset9 symbolic with helper function * fix utility test * fix prim_fallthrough opset skip * enable reducesum opset 13 * enable embedding_bag which contain reducesum op * add ReduceSum helper * remove block_listed_operators * remove local test code * remove embedding_bag() in opset13 file * remove unuse import Co-authored-by: BowenBao <bowbao@microsoft.com> Co-authored-by: hwangdeyu <deyhuang@qq.com> [ghstack-poisoned]
* udpate symbolic for squeeze/unsqueeze * update c++ unsqueeze/squeeze creation * clang format * enable tests * clang format * remove prints * remove magic number * add helper function * fix build issue * update opset9 symbolic with helper function * fix utility test * fix prim_fallthrough opset skip * enable reducesum opset 13 * enable embedding_bag which contain reducesum op * add ReduceSum helper * remove block_listed_operators * remove local test code * remove embedding_bag() in opset13 file * remove unuse import Co-authored-by: BowenBao <bowbao@microsoft.com> Co-authored-by: hwangdeyu <deyhuang@qq.com> [ghstack-poisoned]
* udpate symbolic for squeeze/unsqueeze * update c++ unsqueeze/squeeze creation * clang format * enable tests * clang format * remove prints * remove magic number * add helper function * fix build issue * update opset9 symbolic with helper function * fix utility test * fix prim_fallthrough opset skip * enable reducesum opset 13 * enable embedding_bag which contain reducesum op * add ReduceSum helper * remove block_listed_operators * remove local test code * remove embedding_bag() in opset13 file * remove unuse import Co-authored-by: BowenBao <bowbao@microsoft.com> Co-authored-by: hwangdeyu <deyhuang@qq.com> Differential Revision: [D26023940](https://our.internmc.facebook.com/intern/diff/D26023940) [ghstack-poisoned]
* udpate symbolic for squeeze/unsqueeze * update c++ unsqueeze/squeeze creation * clang format * enable tests * clang format * remove prints * remove magic number * add helper function * fix build issue * update opset9 symbolic with helper function * fix utility test * fix prim_fallthrough opset skip * enable reducesum opset 13 * enable embedding_bag which contain reducesum op * add ReduceSum helper * remove block_listed_operators * remove local test code * remove embedding_bag() in opset13 file * remove unuse import Co-authored-by: BowenBao <bowbao@microsoft.com> Co-authored-by: hwangdeyu <deyhuang@qq.com> [ghstack-poisoned]
* udpate symbolic for squeeze/unsqueeze * update c++ unsqueeze/squeeze creation * clang format * enable tests * clang format * remove prints * remove magic number * add helper function * fix build issue * update opset9 symbolic with helper function * fix utility test * fix prim_fallthrough opset skip * enable reducesum opset 13 * enable embedding_bag which contain reducesum op * add ReduceSum helper * remove block_listed_operators * remove local test code * remove embedding_bag() in opset13 file * remove unuse import Co-authored-by: BowenBao <bowbao@microsoft.com> Co-authored-by: hwangdeyu <deyhuang@qq.com> Differential Revision: [D26050888](https://our.internmc.facebook.com/intern/diff/D26050888) [ghstack-poisoned]
* udpate symbolic for squeeze/unsqueeze * update c++ unsqueeze/squeeze creation * clang format * enable tests * clang format * remove prints * remove magic number * add helper function * fix build issue * update opset9 symbolic with helper function * fix utility test * fix prim_fallthrough opset skip * enable reducesum opset 13 * enable embedding_bag which contain reducesum op * add ReduceSum helper * remove block_listed_operators * remove local test code * remove embedding_bag() in opset13 file * remove unuse import Co-authored-by: BowenBao <bowbao@microsoft.com> Co-authored-by: hwangdeyu <deyhuang@qq.com> Differential Revision: [D26050888](https://our.internmc.facebook.com/intern/diff/D26050888) [ghstack-poisoned]
Summary: Pull Request resolved: #50907 * udpate symbolic for squeeze/unsqueeze * update c++ unsqueeze/squeeze creation * clang format * enable tests * clang format * remove prints * remove magic number * add helper function * fix build issue * update opset9 symbolic with helper function * fix utility test * fix prim_fallthrough opset skip * enable reducesum opset 13 * enable embedding_bag which contain reducesum op * add ReduceSum helper * remove block_listed_operators * remove local test code * remove embedding_bag() in opset13 file * remove unuse import Test Plan: Imported from OSS Reviewed By: pbelevich Differential Revision: D26050888 Pulled By: SplitInfinity fbshipit-source-id: 88307af6a7880abf94eac126ec1638e962de8c1f Co-authored-by: BowenBao <bowbao@microsoft.com> Co-authored-by: hwangdeyu <deyhuang@qq.com>
* udpate symbolic for squeeze/unsqueeze * update c++ unsqueeze/squeeze creation * clang format * enable tests * clang format * remove prints * remove magic number * add helper function * fix build issue * update opset9 symbolic with helper function * fix utility test * fix prim_fallthrough opset skip * enable reducesum opset 13 * enable embedding_bag which contain reducesum op * add ReduceSum helper * remove block_listed_operators * remove local test code * remove embedding_bag() in opset13 file * remove unuse import Co-authored-by: BowenBao <bowbao@microsoft.com> Co-authored-by: hwangdeyu <deyhuang@qq.com> ghstack-source-id: b85885bf9e6e504f0f4e265d2ed6bf4b7b1551ba Pull Request resolved: pytorch#50907
embedding_bag which contains reducesum has also been updated.