From 211b707b30929ebd8a1e3fb5fabfb848f0617095 Mon Sep 17 00:00:00 2001 From: tensor-tang Date: Tue, 5 Jun 2018 11:19:30 +0800 Subject: [PATCH] fix unknown gpu flag when cpu only --- paddle/contrib/inference/demo/simple_on_word2vec.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paddle/contrib/inference/demo/simple_on_word2vec.cc b/paddle/contrib/inference/demo/simple_on_word2vec.cc index ee865f3790..9b4843f714 100644 --- a/paddle/contrib/inference/demo/simple_on_word2vec.cc +++ b/paddle/contrib/inference/demo/simple_on_word2vec.cc @@ -65,7 +65,10 @@ void Main(bool use_gpu) { } TEST(demo, word2vec_cpu) { Main(false /*use_gpu*/); } + +#ifdef PADDLE_WITH_CUDA TEST(demo, word2vec_gpu) { Main(true /*use_gpu*/); } +#endif } // namespace demo } // namespace paddle -- GitLab