Verify def before infer fensor (#18129)
authorGerard Goossen <ggoossen@fb.com>
Fri, 22 Mar 2019 13:33:24 +0000 (06:33 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 22 Mar 2019 13:36:25 +0000 (06:36 -0700)
commit46990c20fa867aa29e049f7664da071e0cfc9c95
tree0dd1350e4121e3c6e0a9c6ca974ca39a795f0d16
parent77a7285764334cc50eb573c3d2614ffefba4a29f
Verify def before infer fensor (#18129)

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

A lot of tensor interference function assume the operator passes the schema.
So call Verity to make sure this is actually the case.

Created diff before to add checking in Concat (https://github.com/pytorch/pytorch/pull/17110), but I encountered lot more places where this is assumed (for example ElementwiseOpShapeInference)

Reviewed By: mdschatz

Differential Revision: D14503933

fbshipit-source-id: cf0097b8c3e4beb1cded6b61e092a6adee4b8fcb
caffe2/core/operator_schema.h
caffe2/python/operator_test/shape_inference_test.py