[TensorExpr] Re-enable "LoopNest.VectorizeUse" test. (#56094)

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

Now FunctionCalls are merged with Loads and vectorization for
intermediate values automatically started to work.

Fixes #53553.

Test Plan: Imported from OSS

Reviewed By: bertmaher

Differential Revision: D27781519

Pulled By: ZolotukhinM

fbshipit-source-id: 1ed68ca2399e9bd4598639bd6dd8f369365f0ef0
This commit is contained in:
Mikhail Zolotukhin 2021-04-14 21:36:54 -07:00 committed by Facebook GitHub Bot
parent ad17fadbfc
commit 556dfcb0db

View file

@ -4011,7 +4011,7 @@ TEST(LoopNest, DISABLED_ColReduceSplitMaskUnevenReorder) {
checkColReduce(s, *p.first, p.second);
}
TEST(LoopNest, DISABLED_VectorizeUse) {
TEST(LoopNest, VectorizeUse) {
KernelScope kernel_scope;
constexpr int N = 8;
Placeholder a("a", kFloat, {N});
@ -4019,7 +4019,7 @@ TEST(LoopNest, DISABLED_VectorizeUse) {
"b", {{N, "n"}}, [&](const VarHandle& n) { return a.load(n) + 1.0f; });
Tensor* c = Compute(
"c", {{N, "n"}}, [&](const VarHandle& n) { return b->load(n) + 2.0f; });
LoopNest nest({c});
LoopNest nest({c}, {b, c});
auto loops = nest.getAllLoopNestsWritingToBuf(b->buf())[0];
nest.vectorize(loops[0]);
loops = nest.getAllLoopNestsWritingToBuf(c->buf())[0];