From 906c26e5fccd03c837b4450114d1ac7d878007a7 Mon Sep 17 00:00:00 2001 From: sneaxiy Date: Thu, 16 Sep 2021 15:07:11 +0000 Subject: [PATCH] rename macro name --- .../fluid/memory/allocation/auto_growth_best_fit_allocator.cc | 4 ++-- paddle/fluid/platform/flags.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 6daddd5f70..a35d8a73f7 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 3ebd4a0170..3693ca9676 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) \ -- GitLab