Skip to content

Commit 9704406

Browse files
committed
Temporary disable async load data in PyDP2.
* It seems some other change breaks the async load. It will cause data error in GPU mode.
1 parent 8604666 commit 9704406

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

paddle/gserver/dataproviders/PyDataProvider2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ class PyDataProvider2 : public DataProvider {
647647
DataBatch& gpuBatch = *batch;
648648
std::vector<Argument>& gpuArguments = gpuBatch.getStreams();
649649
gpuArguments.resize(cpuArguments.size());
650-
gpuBatch.setSize(size);
650+
gpuBatch.setSize(bsize);
651651
for (size_t i = 0; i < headers_.size(); ++i) {
652652
gpuArguments[i].resizeAndCopyFrom(
653653
cpuArguments[i], useGpu_, HPPL_STREAM_1);

python/paddle/trainer_config_helpers/data_sources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def py_data2(files, load_data_module, load_data_object, load_data_args,
201201
data.load_data_module = load_data_module
202202
data.load_data_object = load_data_object
203203
data.load_data_args = load_data_args
204-
data.async_load_data = True
204+
data.async_load_data = False
205205
return data
206206

207207
define_py_data_sources(

0 commit comments

Comments
 (0)