[TensorExpr] Simplify TE IR before applying any transformations. (#64717)
authorMikhail Zolotukhin <mvz@fb.com>
Fri, 10 Sep 2021 01:48:17 +0000 (18:48 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 10 Sep 2021 01:50:51 +0000 (18:50 -0700)
commita17d6c7f80e429a1c21413329a2d73cadb11a6ef
tree8eed593a1336461e84b464c19ca1a5ee9e59d948
parentef2c9d7d8a0b7dbeae36a15d6758ddb75ef02b64
[TensorExpr] Simplify TE IR before applying any transformations. (#64717)

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

This also exposed several bugs, which are fixed in this PR.

Differential Revision:
D30826408
D30826408

Test Plan: Imported from OSS

Reviewed By: navahgar

Pulled By: ZolotukhinM

fbshipit-source-id: a67ec5739aceed9ffdf0d24f77eb3787cefe4560
test/cpp/tensorexpr/test_kernel.cpp
torch/csrc/jit/tensorexpr/ir.h
torch/csrc/jit/tensorexpr/kernel.cpp
torch/csrc/jit/tensorexpr/loopnest.cpp