From 39aeaa160e2e54691feca9e13d6267e0cbfaef71 Mon Sep 17 00:00:00 2001 From: Wilber Date: Thu, 18 Feb 2021 22:34:28 -0600 Subject: [PATCH] fix jetson problem (#30939) --- paddle/fluid/inference/api/analysis_predictor.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/paddle/fluid/inference/api/analysis_predictor.cc b/paddle/fluid/inference/api/analysis_predictor.cc index 8f51613d7f4..81c68a65576 100644 --- a/paddle/fluid/inference/api/analysis_predictor.cc +++ b/paddle/fluid/inference/api/analysis_predictor.cc @@ -653,6 +653,13 @@ std::unique_ptr CreatePaddlePredictor< process_level_allocator_enabled = true; } +// TODO(wilber): jetson tx2 may fail to run the model due to insufficient memory +// under the native_best_fit strategy. Modify the default allocation strategy to +// auto_growth. todo, find a more appropriate way to solve the problem. +#ifdef WITH_NV_JETSON + gflags.push_back("--allocator_strategy=auto_growth"); +#endif + if (framework::InitGflags(gflags)) { VLOG(3) << "The following gpu analysis configurations only take effect " "for the first predictor: "; -- GitLab