diff --git a/paddle/fluid/framework/details/build_strategy.cc b/paddle/fluid/framework/details/build_strategy.cc index 7a0b2199c093688ba18630f5459d91da9fe18e41..419e13c5506641c05a780f41f4c66ab0162b35b2 100644 --- a/paddle/fluid/framework/details/build_strategy.cc +++ b/paddle/fluid/framework/details/build_strategy.cc @@ -400,6 +400,7 @@ ir::Graph *BuildStrategy::Apply(ir::Graph *graph, continue; } } else if (pass->Type() == "set_reader_device_count_pass") { + pass->Erase(kPlaces); pass->SetNotOwned>(kPlaces, &places); } VLOG(1) << "Start Apply Pass " << pass->Type(); diff --git a/paddle/fluid/operators/reader/lod_tensor_blocking_queue.h b/paddle/fluid/operators/reader/lod_tensor_blocking_queue.h index e218fc7a0991c9bdbb58c5b75286631ad8d1e222..10325de5e588ab0afc19d502e6232d6171c803f5 100644 --- a/paddle/fluid/operators/reader/lod_tensor_blocking_queue.h +++ b/paddle/fluid/operators/reader/lod_tensor_blocking_queue.h @@ -121,12 +121,6 @@ class OrderedMultiDeviceLoDTensorBlockingQueue { return CurQueue()->Push(lod_tensor_vec); } - bool Push(std::vector&& lod_tensor_vec) { - return CurQueue()->Push(std::move(lod_tensor_vec)); - } - - inline size_t Cap() const { return capacity_; } - inline size_t Size() const { size_t size = 0; if (queues_) { @@ -137,15 +131,6 @@ class OrderedMultiDeviceLoDTensorBlockingQueue { return size; } - inline void ReOpen() { - if (queues_) { - for (auto& item : *queues_) { - item->ReOpen(); - } - } - data_index_ = 0; - } - inline void Close() { { std::lock_guard lock(init_mutex_); diff --git a/paddle/fluid/pybind/reader_py.cc b/paddle/fluid/pybind/reader_py.cc index db2e0f9a98495597587a9a1698ebc1bd177bd193..faaf5362d9810e277729864ab465392add6a2302 100644 --- a/paddle/fluid/pybind/reader_py.cc +++ b/paddle/fluid/pybind/reader_py.cc @@ -318,7 +318,6 @@ void BindReader(py::module *module) { }, py::call_guard()) .def("size", &reader::OrderedMultiDeviceLoDTensorBlockingQueue::Size) - .def("capacity", &reader::OrderedMultiDeviceLoDTensorBlockingQueue::Cap) .def("close", &reader::OrderedMultiDeviceLoDTensorBlockingQueue::Close) .def("kill", &reader::OrderedMultiDeviceLoDTensorBlockingQueue::Kill) .def("wait_for_inited", diff --git a/python/paddle/fluid/tests/unittests/CMakeLists.txt b/python/paddle/fluid/tests/unittests/CMakeLists.txt index 2f118373ccebb804d17199c6c2caad3efd65e12b..3df912de4ce2ceb80ddf8e250644cdebeb019478 100644 --- a/python/paddle/fluid/tests/unittests/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/CMakeLists.txt @@ -354,5 +354,5 @@ set_tests_properties(test_parallel_executor_test_while_train test_parallel_execu test_parallel_executor_feed_persistable_var test_parallel_executor_crf_auto_growth test_buffer_shared_memory_reuse_pass_and_fuse_optimization_op_pass test_data_norm_op test_imperative_using_non_zero_gpu test_fuse_bn_act_pass - test_optimizer_in_control_flow + test_optimizer_in_control_flow test_dataloader_keep_order test_buffer_shared_memory_reuse_pass PROPERTIES LABELS "RUN_TYPE=DIST")