Skip to content

Commit e030741

Browse files
committed
fix gpu fraction
1 parent 746a62e commit e030741

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

paddle/contrib/inference/demo/simple_on_word2vec.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ void MainThreads(int num_threads, bool use_gpu) {
7272
NativeConfig config;
7373
config.model_dir = FLAGS_dirname + "word2vec.inference.model";
7474
config.use_gpu = use_gpu;
75+
config.fraction_of_gpu_memory = 0.15;
76+
config.device = 0;
7577
auto main_predictor =
7678
CreatePaddlePredictor<NativeConfig, PaddleEngineKind::kNative>(config);
7779

0 commit comments

Comments
 (0)