diff --git a/paddle/fluid/platform/flags.cc b/paddle/fluid/platform/flags.cc index 8209c0a5d6f8e9812370cb2adeefb2dded7e1d96..18b53563cd64eb6807f8198ff2d2cef67cf5d4b5 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 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);