diff --git a/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.cc b/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.cc index 6daddd5f7064e869488c57a03ed21e9385c00cff..a35d8a73f7edae601ac5ab4c01f38e8772e724b3 100644 --- a/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.cc +++ b/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.cc @@ -19,14 +19,14 @@ #include "paddle/fluid/memory/allocation/aligned_allocator.h" #include "paddle/fluid/platform/flags.h" -PADDLE_DEFINE_READONLY_EXPORTED_bool( +PADDLE_DEFINE_EXPORTED_READONLY_bool( free_idle_chunk, false, "Whether to free idle chunk when each allocation is freed. " "If false, all freed allocation would be cached to speed up next " "allocation request. If true, no allocation would be cached. This " "flag only works when FLAGS_allocator_strategy=auto_growth."); -PADDLE_DEFINE_READONLY_EXPORTED_bool( +PADDLE_DEFINE_EXPORTED_READONLY_bool( free_when_no_cache_hit, false, "Whether to free idle chunks when no cache hit. If true, idle " "chunk would be freed when no cache hit; if false, idle " diff --git a/paddle/fluid/platform/flags.h b/paddle/fluid/platform/flags.h index 3ebd4a01707a5e60ccda058464069329dc57b6b2..3693ca9676677d456f833ee4b00a725004fc2b18 100644 --- a/paddle/fluid/platform/flags.h +++ b/paddle/fluid/platform/flags.h @@ -61,7 +61,7 @@ const ExportedFlagInfoMap &GetExportedFlagInfoMap(); #define PADDLE_DEFINE_EXPORTED_bool(name, default_value, doc) \ __PADDLE_DEFINE_EXPORTED_FLAG(name, true, bool, bool, default_value, doc) -#define PADDLE_DEFINE_READONLY_EXPORTED_bool(name, default_value, doc) \ +#define PADDLE_DEFINE_EXPORTED_READONLY_bool(name, default_value, doc) \ __PADDLE_DEFINE_EXPORTED_FLAG(name, false, bool, bool, default_value, doc) #define PADDLE_DEFINE_EXPORTED_int32(name, default_value, doc) \