From 4cda9a36a4ce35b00c540027cd40e0f4f8e1453b Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Thu, 12 Oct 2017 20:07:08 -0700 Subject: [PATCH] Stablize executor_test (#4774) Use less GPU memory --- paddle/framework/executor_test.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/paddle/framework/executor_test.cc b/paddle/framework/executor_test.cc index eaa9c9414b6..8c7db3b2904 100644 --- a/paddle/framework/executor_test.cc +++ b/paddle/framework/executor_test.cc @@ -17,6 +17,7 @@ limitations under the License. */ #include #include +#include "gflags/gflags.h" #include "gtest/gtest.h" #include "paddle/framework/attribute.h" #include "paddle/framework/backward.h" @@ -317,3 +318,12 @@ TEST_F(ExecutorTesterFeedAndFetch, GPU) { } } #endif + +DECLARE_double(fraction_of_gpu_memory_to_use); + +int main(int argc, char** argv) { + testing::InitGoogleTest(&argc, argv); + // Use less GPU memory for unittest. + FLAGS_fraction_of_gpu_memory_to_use = 0.25; + return RUN_ALL_TESTS(); +} \ No newline at end of file -- GitLab