diff --git a/paddle/fluid/platform/init.cc b/paddle/fluid/platform/init.cc index 0a78dc72ada7ce376d9a377142724387bc73ccad..7ceaeb8259a8d6c776f88863a358ffcee1a22573 100644 --- a/paddle/fluid/platform/init.cc +++ b/paddle/fluid/platform/init.cc @@ -66,16 +66,6 @@ PADDLE_DEFINE_EXPORTED_int32( "Multiple of the CUPTI device buffer size. If the timestamps have " "been dropped when you are profiling, try increasing this value."); -namespace paddle { -namespace platform { - -void ParseCommandLineFlags(int argc, char **argv, bool remove) { - ::GFLAGS_NAMESPACE::ParseCommandLineFlags(&argc, &argv, remove); -} - -} // namespace platform -} // namespace paddle - namespace paddle { namespace framework { @@ -109,6 +99,7 @@ bool InitGflags(std::vector args) { << ", Init commandline: " << line; char **arr = argv.data(); + ::GFLAGS_NAMESPACE::AllowCommandLineReparsing(); ::GFLAGS_NAMESPACE::ParseCommandLineFlags(&argc, &arr, true); successed = true; diff --git a/paddle/fluid/platform/init.h b/paddle/fluid/platform/init.h index 1fd5ec2d20efbcde16feebb6895ce2f9c4471681..2d5c34002b4bb91803c85ab9607bb187d4a3847e 100644 --- a/paddle/fluid/platform/init.h +++ b/paddle/fluid/platform/init.h @@ -20,14 +20,6 @@ limitations under the License. */ #include "gflags/gflags.h" #include "glog/logging.h" -namespace paddle { -namespace platform { - -void ParseCommandLineFlags(int argc, char** argv, bool remove); - -} // namespace platform -} // namespace paddle - namespace paddle { namespace framework {