Test shape analysis with opinfos (#59814)
authorElias Ellison <eellison@devfair044.h1.fair>
Tue, 10 Aug 2021 16:40:41 +0000 (09:40 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 10 Aug 2021 16:47:33 +0000 (09:47 -0700)
commitea808df25deee98a3021f5cff1f818803d56c97b
treee5ffb81b1802958c194826f1f13fed74d8525a3f
parent7312bd953c67ce0e0bbd7edae8bb9b2cac731d9a
Test shape analysis with opinfos (#59814)

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

Using opinfos to test shape analysis. By default, we just check that we don't give incorrect answers, and then if `assert_jit_shape_analysis` is true, tests that we correctly propagates the full shape. and it found a couple bugs {emoji:1f603}

Test Plan: Imported from OSS

Reviewed By: Krovatkin

Differential Revision: D30200058

Pulled By: eellison

fbshipit-source-id: 6226be87f5390277cfa5a1fffaa1b072d4bc8803
test/test_ops.py
torch/_C/__init__.pyi.in
torch/csrc/jit/passes/remove_mutation.cpp
torch/csrc/jit/python/init.cpp
torch/csrc/jit/python/python_ir.cpp
torch/csrc/jit/runtime/symbolic_shape_registry.cpp
torch/testing/_internal/common_jit.py
torch/testing/_internal/common_methods_invocations.py
torch/testing/_internal/jit_metaprogramming_utils.py