From 60d18a8feb4a2bd30437756c07833082fa25b92a Mon Sep 17 00:00:00 2001 From: sneaxiy Date: Fri, 7 Feb 2020 15:45:49 +0000 Subject: [PATCH] fix ut, test=develop --- paddle/fluid/framework/details/build_strategy.cc | 1 + .../operators/reader/lod_tensor_blocking_queue.h | 15 --------------- paddle/fluid/pybind/reader_py.cc | 1 - .../paddle/fluid/tests/unittests/CMakeLists.txt | 2 +- 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/paddle/fluid/framework/details/build_strategy.cc b/paddle/fluid/framework/details/build_strategy.cc index 7a0b2199c09..419e13c5506 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 e218fc7a099..10325de5e58 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 db2e0f9a984..faaf5362d98 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 2f118373cce..3df912de4ce 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") -- GitLab