ag allocator by default, test=develop (#21837)

release/1.7
Zeng Jinle 6 years ago committed by GitHub
parent e519a1fc82
commit d9f5d1eb29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,7 +27,7 @@ DEFINE_bool(free_idle_chunk, false,
"allocation request. If true, no allocation would be cached. This " "allocation request. If true, no allocation would be cached. This "
"flag only works when FLAGS_allocator_strategy=auto_growth."); "flag only works when FLAGS_allocator_strategy=auto_growth.");
DEFINE_bool(free_when_no_cache_hit, true, DEFINE_bool(free_when_no_cache_hit, false,
"Whether to free idle chunks when no cache hit. If true, idle " "Whether to free idle chunks when no cache hit. If true, idle "
"chunk would be freed when no cache hit; if false, idle " "chunk would be freed when no cache hit; if false, idle "
"chunk would be freed when out of memory occurs. This flag " "chunk would be freed when out of memory occurs. This flag "

@ -307,7 +307,12 @@ DEFINE_double(memory_fraction_of_eager_deletion, 1.0,
* Example: * Example:
* Note: For selecting allocator policy of PaddlePaddle. * Note: For selecting allocator policy of PaddlePaddle.
*/ */
DEFINE_string(allocator_strategy, "naive_best_fit", #ifdef PADDLE_ON_INFERENCE
static constexpr char kDefaultAllocatorStrategy[] = "naive_best_fit";
#else
static constexpr char kDefaultAllocatorStrategy[] = "auto_growth";
#endif
DEFINE_string(allocator_strategy, kDefaultAllocatorStrategy,
"The allocation strategy. naive_best_fit means the original best " "The allocation strategy. naive_best_fit means the original best "
"fit allocator of Fluid. " "fit allocator of Fluid. "
"auto_growth means the experimental auto-growth allocator. " "auto_growth means the experimental auto-growth allocator. "

Loading…
Cancel
Save