Skip to content

Commit 883d5be

Browse files
authored
fix dynamic flag bug on mac (#41571) (#41660)
cherry-pick #41571
1 parent 4815519 commit 883d5be

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

paddle/fluid/platform/flags.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,11 @@ PADDLE_DEFINE_EXPORTED_double(
535535
"you should set FLAGS_local_exe_sub_scope_limit=-1. "
536536
"The default value is 256 MBytes.");
537537

538+
PADDLE_DEFINE_EXPORTED_bool(
539+
reader_queue_speed_test_mode, false,
540+
"If set true, the queue.pop will only get data from queue but not "
541+
"remove the data from queue for speed testing");
542+
538543
/**
539544
* MKLDNN related FLAG
540545
* Name: use_mkldnn

paddle/fluid/pybind/reader_py.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@
3232
#include "paddle/phi/core/ddim.h"
3333
#include "pybind11/stl.h"
3434

35-
PADDLE_DEFINE_EXPORTED_bool(
36-
reader_queue_speed_test_mode, false,
37-
"If set true, the queue.pop will only get data from queue but not "
38-
"remove the data from queue for speed testing");
35+
DECLARE_bool(reader_queue_speed_test_mode);
3936

4037
// disable auto conversion to list in Python
4138
PYBIND11_MAKE_OPAQUE(paddle::framework::LoDTensorArray);

0 commit comments

Comments
 (0)