diff --git a/paddle/fluid/framework/new_executor/interpretercore.cc b/paddle/fluid/framework/new_executor/interpretercore.cc index 2a7d0d05e90a8feab70bcfd6cf5695a988128814..5d22796e6f5d483d9f8545069cdeed4c35921675 100644 --- a/paddle/fluid/framework/new_executor/interpretercore.cc +++ b/paddle/fluid/framework/new_executor/interpretercore.cc @@ -19,7 +19,8 @@ #include "paddle/fluid/framework/details/share_tensor_buffer_functor.h" -DEFINE_bool(new_executor_use_inplace, true, "Use inplace in new executor"); +PADDLE_DEFINE_EXPORTED_bool(new_executor_use_inplace, true, + "Use inplace in new executor"); namespace paddle { namespace framework { diff --git a/python/paddle/fluid/__init__.py b/python/paddle/fluid/__init__.py index ec93678027fc8a73a2d3a5d8ca5fbd6028b8af9d..6d760c4ab3d6e5787e38ddb5dce9233b0a53b471 100644 --- a/python/paddle/fluid/__init__.py +++ b/python/paddle/fluid/__init__.py @@ -189,10 +189,10 @@ def __bootstrap__(): sysstr = platform.system() if 'Darwin' in sysstr: - remove_flags_if_exists('use_pinned_memory') + remove_flag_if_exists('use_pinned_memory') if os.name == 'nt': - remove_flags_if_exists('cpu_deterministic') + remove_flag_if_exists('cpu_deterministic') core.init_gflags(["--tryfromenv=" + ",".join(read_env_flags)]) # Note(zhouwei25): sys may not have argv in some cases,