From b026840a298bf2046afbae39aefecd2aac3c96ba Mon Sep 17 00:00:00 2001 From: Zhou Wei <1183042833@qq.com> Date: Mon, 11 Apr 2022 18:54:41 +0800 Subject: [PATCH] fix dynamic flag bug on mac (#41571) --- paddle/fluid/platform/flags.cc | 5 +++++ paddle/fluid/pybind/reader_py.cc | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/platform/flags.cc b/paddle/fluid/platform/flags.cc index 8209c0a5d6..18b53563cd 100644 --- a/paddle/fluid/platform/flags.cc +++ b/paddle/fluid/platform/flags.cc @@ -534,6 +534,11 @@ PADDLE_DEFINE_EXPORTED_double( "you should set FLAGS_local_exe_sub_scope_limit=-1. " "The default value is 256 MBytes."); +PADDLE_DEFINE_EXPORTED_bool( + reader_queue_speed_test_mode, false, + "If set true, the queue.pop will only get data from queue but not " + "remove the data from queue for speed testing"); + /** * MKLDNN related FLAG * Name: use_mkldnn diff --git a/paddle/fluid/pybind/reader_py.cc b/paddle/fluid/pybind/reader_py.cc index 8c456a2d98..e0aab0dd06 100644 --- a/paddle/fluid/pybind/reader_py.cc +++ b/paddle/fluid/pybind/reader_py.cc @@ -32,10 +32,7 @@ #include "paddle/phi/core/ddim.h" #include "pybind11/stl.h" -PADDLE_DEFINE_EXPORTED_bool( - reader_queue_speed_test_mode, false, - "If set true, the queue.pop will only get data from queue but not " - "remove the data from queue for speed testing"); +DECLARE_bool(reader_queue_speed_test_mode); // disable auto conversion to list in Python PYBIND11_MAKE_OPAQUE(paddle::framework::LoDTensorArray); -- GitLab