未验证 提交 419597de 编写于 作者: Y Yuanle Liu 提交者: GitHub

gflags allow command line reparsing (#51152)

上级 02f66747
...@@ -66,16 +66,6 @@ PADDLE_DEFINE_EXPORTED_int32( ...@@ -66,16 +66,6 @@ PADDLE_DEFINE_EXPORTED_int32(
"Multiple of the CUPTI device buffer size. If the timestamps have " "Multiple of the CUPTI device buffer size. If the timestamps have "
"been dropped when you are profiling, try increasing this value."); "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 paddle {
namespace framework { namespace framework {
...@@ -109,6 +99,7 @@ bool InitGflags(std::vector<std::string> args) { ...@@ -109,6 +99,7 @@ bool InitGflags(std::vector<std::string> args) {
<< ", Init commandline: " << line; << ", Init commandline: " << line;
char **arr = argv.data(); char **arr = argv.data();
::GFLAGS_NAMESPACE::AllowCommandLineReparsing();
::GFLAGS_NAMESPACE::ParseCommandLineFlags(&argc, &arr, true); ::GFLAGS_NAMESPACE::ParseCommandLineFlags(&argc, &arr, true);
successed = true; successed = true;
......
...@@ -20,14 +20,6 @@ limitations under the License. */ ...@@ -20,14 +20,6 @@ limitations under the License. */
#include "gflags/gflags.h" #include "gflags/gflags.h"
#include "glog/logging.h" #include "glog/logging.h"
namespace paddle {
namespace platform {
void ParseCommandLineFlags(int argc, char** argv, bool remove);
} // namespace platform
} // namespace paddle
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册