From 539aac44825a490f040a05ebabc081962f2f6f95 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Fri, 28 Aug 2020 15:38:46 +0800 Subject: [PATCH] fix(dnn/cuda): fix sass loader GitOrigin-RevId: f7dec65a2a7eaa24382b6311de3c299cb868bdb8 --- src/opr/test/dnn/convolution.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/opr/test/dnn/convolution.cpp b/src/opr/test/dnn/convolution.cpp index 973977ee1..78361a312 100644 --- a/src/opr/test/dnn/convolution.cpp +++ b/src/opr/test/dnn/convolution.cpp @@ -2033,7 +2033,7 @@ TEST(TestOprDNN, HeuristicReproducible) { #if MGB_CUDA TEST(TestOprDNN, ConvolutionMultiCompNode) { - REQUIRE_GPU(2); + REQUIRE_GPU(1); auto cn0 = CompNode::load("gpu0:0"), cn1 = CompNode::load("gpu0:1"); cn0.activate(); auto&& prop = CompNodeEnv::from_comp_node(cn0).cuda_env().device_prop; @@ -2106,21 +2106,22 @@ TEST(TestOprDNN, ConvolutionMultiCompNode) { auto func0 = graph0->compile({make_callback_copy(y0, host_y0)}); auto func1 = graph1->compile({make_callback_copy(y1, host_y1)}); - auto worker = [&func0, &func1](int wid) { - static int const iter_num = 1000; - if (wid == 0) { - for (int i = 0; i < iter_num; ++i) - func0->execute(); - } else { - for (int i = 0; i < iter_num; ++i) - func1->execute(); - } - }; - std::thread worker0(worker, 0); - std::thread worker1(worker, 1); - worker0.join(); - worker1.join(); + auto worker = [&func0, &func1](int wid) { + static const int iter_num = 1000; + if (wid == 0) { + for (int i = 0; i < iter_num; ++i) + func0->execute(); + } else { + for (int i = 0; i < iter_num; ++i) + func1->execute(); + } + }; + std::thread worker0(worker, 0); + std::thread worker1(worker, 1); + worker0.join(); + worker1.join(); } + #endif // vim: syntax=cpp.doxygen foldmethod=marker foldmarker=f{{{,f}}} -- GitLab