From 556dfcb0dbd8489accda245dc5ad48d2775df875 Mon Sep 17 00:00:00 2001 From: Mikhail Zolotukhin Date: Wed, 14 Apr 2021 21:36:54 -0700 Subject: [PATCH] [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 --- test/cpp/tensorexpr/test_loopnest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cpp/tensorexpr/test_loopnest.cpp b/test/cpp/tensorexpr/test_loopnest.cpp index 515d30f7f8a..593962dc371 100644 --- a/test/cpp/tensorexpr/test_loopnest.cpp +++ b/test/cpp/tensorexpr/test_loopnest.cpp @@ -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];