diff --git a/paddle/fluid/platform/flags.cc b/paddle/fluid/platform/flags.cc index 4e47c130c7252f6f7f6c8f9e0e993022e99d7686..71f96668a56f3e0cdce00d3b3faa8910eb982cf6 100644 --- a/paddle/fluid/platform/flags.cc +++ b/paddle/fluid/platform/flags.cc @@ -535,6 +535,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 8c456a2d980d36b4049df7bcecaf2ff8767dc8ff..e0aab0dd06ecbbaff9b870a3b6497da2279ebd12 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);