Skip to content

Commit 3526ac1

Browse files
committed
refine code
1 parent 744cc41 commit 3526ac1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

paddle/fluid/operators/reader/open_files_op.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ void MultiFileReader::ReadNext(std::vector<framework::LoDTensor>* out) {
6363

6464
void MultiFileReader::ReInit() {
6565
EndScheduler();
66-
for (auto& reader : readers_) {
67-
reader->ReInit();
68-
}
6966
StartNewScheduler();
7067
}
7168

@@ -141,6 +138,7 @@ void MultiFileReader::PrefetchThreadFunc(size_t reader_idx, size_t thread_idx) {
141138
std::vector<framework::LoDTensor> ins;
142139
reader->ReadNext(&ins);
143140
if (ins.empty()) {
141+
reader->ReInit();
144142
break;
145143
}
146144
try {

0 commit comments

Comments
 (0)