Eliminate AdjustBatch ops (#19083)
authorYinghai Lu <yinghai@fb.com>
Wed, 17 Apr 2019 16:37:37 +0000 (09:37 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 17 Apr 2019 17:00:25 +0000 (10:00 -0700)
commitf1f31b634d73eb5e260564cb3a4964d29aeecaac
treef5cae34114949aef05f9950b114c15f40a474b2f
parent3fcee4875c4383bff78917284875f180ad41903c
Eliminate AdjustBatch ops (#19083)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19083

As we have discussed, there are too many of AdjustBatch ops and they incur reallocation overhead and affects the performance. We will eliminate these ops by
- inling the input adjust batch op into Glow
- inling the output adjust batch op into OnnxifiOp and do that only conditionally.

This is the C2 part of the change and requires change from Glow side to work e2e.

Reviewed By: rdzhabarov

Differential Revision: D14860582

fbshipit-source-id: ac2588b894bac25735babb62b1924acc559face6
caffe2/operators/adjust_batch_op.cc [deleted file]
caffe2/operators/adjust_batch_op.h [deleted file]
caffe2/operators/onnxifi_op.cc
caffe2/operators/onnxifi_op.h
caffe2/opt/onnxifi_transformer.cc
caffe2/opt/onnxifi_transformer.h
caffe2/python/operator_test/adjust_batch_op_test.py [deleted file]