From af0ed741e851fea6527d2fdccb7c0ac05566f92f Mon Sep 17 00:00:00 2001 From: Liangliang He Date: Tue, 7 Nov 2017 20:46:00 +0800 Subject: [PATCH] Add sync for resize bilinear benchmark --- mace/ops/resize_bilinear_benchmark.cc | 1 + mace/ops/resize_bilinear_test.cc | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/mace/ops/resize_bilinear_benchmark.cc b/mace/ops/resize_bilinear_benchmark.cc index 37c07cd2..c36fd7c9 100644 --- a/mace/ops/resize_bilinear_benchmark.cc +++ b/mace/ops/resize_bilinear_benchmark.cc @@ -40,6 +40,7 @@ static void ResizeBilinearBenchmark(int iters, while (iters--) { net.RunOp(D); } + net.Sync(); } #define BM_RESIZE_BILINEAR_MACRO(N, C, H0, W0, H1, W1, TYPE, DEVICE) \ diff --git a/mace/ops/resize_bilinear_test.cc b/mace/ops/resize_bilinear_test.cc index d569ad71..92f7ec46 100644 --- a/mace/ops/resize_bilinear_test.cc +++ b/mace/ops/resize_bilinear_test.cc @@ -86,12 +86,6 @@ void TestRandomResizeBilinear() { net.AddRandomInput("Input", {batch, channels, in_height, in_width}); net.AddInputFromArray("OutSize", {2}, {height, width}); - /* - vector input(24); - std::iota(begin(input), end(input), 0); - net.AddInputFromArray("Input", {1, 3, 2, 4}, input); - net.AddInputFromArray("OutSize", {2}, {1, 2}); - */ // Run net.RunOp(D); -- GitLab