diff --git a/paddle/fluid/framework/async_executor.cc b/paddle/fluid/framework/async_executor.cc index 31335fa7231e28fb8872da754f33607c0304848c..2af42a009a9af0a45e773e8d4a9313e203c9a6ae 100755 --- a/paddle/fluid/framework/async_executor.cc +++ b/paddle/fluid/framework/async_executor.cc @@ -143,8 +143,7 @@ void PrepareReaders(std::vector >& readers, readers.resize(thread_num); for (size_t i = 0; i < readers.size(); ++i) { readers[i] = DataFeedFactory::CreateDataFeed(data_feed_desc.name()); - readers[i]->Init(data_feed_desc); // set batch size here - //readers[i]->SetQueueSize(32); // default is 32 + readers[i]->Init(data_feed_desc); // set batch_size and queue_size here } readers[0]->SetFileList(filelist); } diff --git a/paddle/fluid/framework/data_feed.cc b/paddle/fluid/framework/data_feed.cc index be983e614ef41dde2883ba333c6db217d9c7b124..afcae6cdcdcf5a3fcec5891f9303f21dd7a58b68 100755 --- a/paddle/fluid/framework/data_feed.cc +++ b/paddle/fluid/framework/data_feed.cc @@ -60,7 +60,7 @@ bool DataFeed::SetFileList(const std::vector& files) { CheckInit(); if (files.size() == 0) { LOG(ERROR) << "error: you have set an empty filelist"; - return false; + exit(-1); } filelist_.assign(files.begin(), files.end()); file_idx_ = 0; @@ -100,7 +100,7 @@ template void PrivateQueueDataFeed::SetQueueSize(int queue_size) { if (queue_size <= 0) { LOG(ERROR) << "error: illegal queue size: " << queue_size; - return; + exit(-1); } queue_size_ = queue_size; queue_.ReCap(queue_size_);