deduplicated code in elementwise_op_broadcast_test.py (#15865)
authorAndre Georg Holzner <andre.holzner@oculus.com>
Wed, 9 Jan 2019 11:04:29 +0000 (03:04 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 9 Jan 2019 11:07:22 +0000 (03:07 -0800)
commit961f829067af733ccd4a4aea80b5192c385d9400
treeb631a10151063f61e7ea4cd477fdef68a5c1b3f3
parentc7ec7cdd46712c9dd93f8008b25e975b669c0a65
deduplicated code in elementwise_op_broadcast_test.py (#15865)

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

factored out code used in tests for operators Add, Mul and Sub
into two new methods: a first one to generate the test vectors, a second
one to run the actual tests given a caffe2 and python operator.

Reviewed By: houseroad

Differential Revision: D13526955

fbshipit-source-id: 8970ba5a1305ca19a54a14b51816d4a19f19d678
caffe2/python/operator_test/elementwise_op_broadcast_test.py