Add support for exporting onnx split (#15092)
authorBowenBao <semisqg@gmail.com>
Tue, 8 Jan 2019 00:06:34 +0000 (16:06 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 8 Jan 2019 00:09:24 +0000 (16:09 -0800)
commit24867a58aae1c532da8c50d1c18cbfe5d3894f93
tree493b56d280418cbc995eb5c2ebcd02973fcd66a0
parentbc328d01e595ddf8d926e301784137c5182474f1
Add support for exporting onnx split (#15092)

Summary:
* With the update of split output to dynamic list it breaks the export to onnx.
 Now split ir becomes two ops: 1. Dynamic[] <= Split(), and 2. out1, out2, out3
 <= Prim::ListUnpack. In this fix these two consecutive ops get fused when being
 exported to onnx.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15092

Reviewed By: dzhulgakov

Differential Revision: D13583832

Pulled By: houseroad

fbshipit-source-id: 3eb18c871e750921ad6d5cc179254bee9bcf4c99
aten/src/ATen/core/interned_strings.h
test/onnx/expect/TestOperators.test_split.expect [new file with mode: 0644]
test/onnx/expect/TestOperators.test_split_with_sizes.expect [new file with mode: 0644]
test/onnx/test_operators.py
torch/csrc/jit/passes/onnx/peephole.cpp
torch/onnx/symbolic.py
torch/onnx/utils.py