Skip to content

Commit 4cc9809

Browse files
authored
Merge pull request #15799 from sneaxiy/feature/decoupled_reader
Try to decouple reader with program_desc
2 parents e9bec93 + 2f54d9f commit 4cc9809

23 files changed

+1255
-110
lines changed

paddle/fluid/API.spec

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ paddle.fluid.default_startup_program (ArgSpec(args=[], varargs=None, keywords=No
1010
paddle.fluid.default_main_program (ArgSpec(args=[], varargs=None, keywords=None, defaults=None), ('document', '5430f54ab4895f9f47db6bebbaf71659'))
1111
paddle.fluid.program_guard (ArgSpec(args=['main_program', 'startup_program'], varargs=None, keywords=None, defaults=(None,)), ('document', 'b54f403e57825a1592aece03afe3afb6'))
1212
paddle.fluid.name_scope (ArgSpec(args=['prefix'], varargs=None, keywords=None, defaults=(None,)), ('document', '0ef753f5cec69fef9ae6ad8b867b33a2'))
13+
paddle.fluid.cuda_places (ArgSpec(args=['device_ids'], varargs=None, keywords=None, defaults=(None,)), ('document', '7d9a51fc9cf3c5245b5227080a8064c3'))
14+
paddle.fluid.cpu_places (ArgSpec(args=['device_count'], varargs=None, keywords=None, defaults=(None,)), ('document', '4c0cd83f0b401fc2ff84c70974e5d210'))
15+
paddle.fluid.cuda_pinned_places (ArgSpec(args=['device_count'], varargs=None, keywords=None, defaults=(None,)), ('document', 'd0c3ebd813c39958c92b78e3eef7e912'))
1316
paddle.fluid.Executor.__init__ (ArgSpec(args=['self', 'place'], varargs=None, keywords=None, defaults=None), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
1417
paddle.fluid.Executor.close (ArgSpec(args=['self'], varargs=None, keywords=None, defaults=None), ('document', 'f5369953dd0c443961cf79f7a00e1a03'))
1518
paddle.fluid.Executor.run (ArgSpec(args=['self', 'program', 'feed', 'fetch_list', 'feed_var_name', 'fetch_var_name', 'scope', 'return_numpy', 'use_program_cache'], varargs=None, keywords=None, defaults=(None, None, None, 'feed', 'fetch', None, True, False)), ('document', 'f482e93b38b4018796969a2e1dde479d'))
@@ -44,7 +47,7 @@ paddle.fluid.AsyncExecutor.run (ArgSpec(args=['self', 'program', 'data_feed', 'f
4447
paddle.fluid.AsyncExecutor.save_model (ArgSpec(args=['self', 'save_path'], varargs=None, keywords=None, defaults=None), ('document', 'c8ac0dfcb3b187aba25d03af7fea56b2'))
4548
paddle.fluid.AsyncExecutor.stop (ArgSpec(args=['self'], varargs=None, keywords=None, defaults=None), ('document', '5f23d043607bb5d55e466ec3f578e093'))
4649
paddle.fluid.CompiledProgram.__init__ (ArgSpec(args=['self', 'program_or_graph'], varargs=None, keywords=None, defaults=None), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
47-
paddle.fluid.CompiledProgram.with_data_parallel (ArgSpec(args=['self', 'loss_name', 'build_strategy', 'exec_strategy', 'share_vars_from'], varargs=None, keywords=None, defaults=(None, None, None, None)), ('document', 'e1af7fd53cf868554f312779fc803864'))
50+
paddle.fluid.CompiledProgram.with_data_parallel (ArgSpec(args=['self', 'loss_name', 'build_strategy', 'exec_strategy', 'share_vars_from', 'places'], varargs=None, keywords=None, defaults=(None, None, None, None, None)), ('document', 'a8c7793803cf976680d9478e378fa356'))
4851
paddle.fluid.CompiledProgram.with_inference_optimize (ArgSpec(args=['self', 'config'], varargs=None, keywords=None, defaults=None), ('document', '9e5b009d850191a010e859189c127fd8'))
4952
paddle.fluid.ExecutionStrategy.__init__ __init__(self: paddle.fluid.core.ParallelExecutor.ExecutionStrategy) -> None
5053
paddle.fluid.BuildStrategy.GradientScaleStrategy.__init__ __init__(self: paddle.fluid.core.ParallelExecutor.BuildStrategy.GradientScaleStrategy, arg0: int) -> None
@@ -58,6 +61,12 @@ paddle.fluid.io.load_params (ArgSpec(args=['executor', 'dirname', 'main_program'
5861
paddle.fluid.io.load_persistables (ArgSpec(args=['executor', 'dirname', 'main_program', 'filename'], varargs=None, keywords=None, defaults=(None, None)), ('document', '28df5bfe26ca7a077f91156abb0fe6d2'))
5962
paddle.fluid.io.save_inference_model (ArgSpec(args=['dirname', 'feeded_var_names', 'target_vars', 'executor', 'main_program', 'model_filename', 'params_filename', 'export_for_deployment'], varargs=None, keywords=None, defaults=(None, None, None, True)), ('document', '70f4f53f13572436ac72d1c8b5efeb9d'))
6063
paddle.fluid.io.load_inference_model (ArgSpec(args=['dirname', 'executor', 'model_filename', 'params_filename', 'pserver_endpoints'], varargs=None, keywords=None, defaults=(None, None, None)), ('document', '7a5255386075dac3c75b7058254fcdcb'))
64+
paddle.fluid.io.PyReader.__init__ (ArgSpec(args=['self', 'feed_list', 'capacity', 'use_double_buffer', 'iterable'], varargs=None, keywords=None, defaults=(True, False)), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
65+
paddle.fluid.io.PyReader.decorate_batch_generator (ArgSpec(args=['self', 'reader', 'places'], varargs=None, keywords=None, defaults=(None,)), ('document', 'a3fefec8bacd6ce83f49906a9d05e779'))
66+
paddle.fluid.io.PyReader.decorate_sample_generator (ArgSpec(args=['self', 'sample_generator', 'batch_size', 'drop_last', 'places'], varargs=None, keywords=None, defaults=(True, None)), ('document', '7abd9cf7d695bab5bb6cf7ded5903cb2'))
67+
paddle.fluid.io.PyReader.decorate_sample_list_generator (ArgSpec(args=['self', 'reader', 'places'], varargs=None, keywords=None, defaults=(None,)), ('document', 'faef298f73e91aedcfaf5d184f3109b7'))
68+
paddle.fluid.io.PyReader.reset (ArgSpec(args=['self'], varargs=None, keywords=None, defaults=None), ('document', 'ff1cc1e2beb8824d453656c72c28ddfb'))
69+
paddle.fluid.io.PyReader.start (ArgSpec(args=['self'], varargs=None, keywords=None, defaults=None), ('document', 'b7ea0a548991924e4cfe61a577b8e56d'))
6170
paddle.fluid.initializer.ConstantInitializer.__init__ (ArgSpec(args=['self', 'value', 'force_cpu'], varargs=None, keywords=None, defaults=(0.0, False)), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
6271
paddle.fluid.initializer.UniformInitializer.__init__ (ArgSpec(args=['self', 'low', 'high', 'seed'], varargs=None, keywords=None, defaults=(-1.0, 1.0, 0)), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
6372
paddle.fluid.initializer.NormalInitializer.__init__ (ArgSpec(args=['self', 'loc', 'scale', 'seed'], varargs=None, keywords=None, defaults=(0.0, 1.0, 0)), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
@@ -230,7 +239,7 @@ paddle.fluid.layers.shuffle (ArgSpec(args=['reader', 'buffer_size'], varargs=Non
230239
paddle.fluid.layers.batch (ArgSpec(args=['reader', 'batch_size'], varargs=None, keywords=None, defaults=None), ('document', 'f563d376d35e1a4c4db100fd11b381a0'))
231240
paddle.fluid.layers.double_buffer (ArgSpec(args=['reader', 'place', 'name'], varargs=None, keywords=None, defaults=(None, None)), ('document', '07e5b796674796eb1ef3fee9c10d24e3'))
232241
paddle.fluid.layers.random_data_generator (ArgSpec(args=['low', 'high', 'shapes', 'lod_levels', 'for_parallel'], varargs=None, keywords=None, defaults=(True,)), ('document', '9b7f0f86ec24bbc97643cadcb6499cff'))
233-
paddle.fluid.layers.py_reader (ArgSpec(args=['capacity', 'shapes', 'dtypes', 'lod_levels', 'name', 'use_double_buffer'], varargs=None, keywords=None, defaults=(None, None, True)), ('document', '13dabc57863f62ab3141586784ee356b'))
242+
paddle.fluid.layers.py_reader (ArgSpec(args=['capacity', 'shapes', 'dtypes', 'lod_levels', 'name', 'use_double_buffer'], varargs=None, keywords=None, defaults=(None, None, True)), ('document', '4357643685cfd65454ba5a15f0151709'))
234243
paddle.fluid.layers.create_py_reader_by_data (ArgSpec(args=['capacity', 'feed_list', 'name', 'use_double_buffer'], varargs=None, keywords=None, defaults=(None, True)), ('document', '350f74d93fab9adb2ac4950f1c26416b'))
235244
paddle.fluid.layers.Preprocessor.__init__ (ArgSpec(args=['self', 'reader', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
236245
paddle.fluid.layers.Preprocessor.block (ArgSpec(args=['self'], varargs=None, keywords=None, defaults=None), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
@@ -511,6 +520,7 @@ paddle.fluid.unique_name.guard (ArgSpec(args=['new_generator'], varargs=None, ke
511520
paddle.fluid.recordio_writer.convert_reader_to_recordio_file (ArgSpec(args=['filename', 'reader_creator', 'feeder', 'compressor', 'max_num_records', 'feed_order'], varargs=None, keywords=None, defaults=(Compressor.Snappy, 1000, None)), ('document', '65c7523e86f0c50bb729b01667f36310'))
512521
paddle.fluid.recordio_writer.convert_reader_to_recordio_files (ArgSpec(args=['filename', 'batch_per_file', 'reader_creator', 'feeder', 'compressor', 'max_num_records', 'feed_order'], varargs=None, keywords=None, defaults=(Compressor.Snappy, 1000, None)), ('document', 'bc643f0f5f1b9db57ff0d8a57d379bd7'))
513522
paddle.fluid.Scope Scope() -> paddle.fluid.core._Scope
523+
paddle.reader.cache (ArgSpec(args=['reader'], varargs=None, keywords=None, defaults=None), ('document', '1676886070eb607cb608f7ba47be0d3c'))
514524
paddle.reader.map_readers (ArgSpec(args=['func'], varargs='readers', keywords=None, defaults=None), ('document', '77cbadb09df588e21e5cc0819b69c87d'))
515525
paddle.reader.buffered (ArgSpec(args=['reader', 'size'], varargs=None, keywords=None, defaults=None), ('document', '0d6186f109feceb99f60ec50a0a624cb'))
516526
paddle.reader.compose (ArgSpec(args=[], varargs='readers', keywords='kwargs', defaults=None), ('document', '884291104e1c3f37f33aae44b7deeb0d'))

paddle/fluid/operators/reader/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ function(reader_library TARGET_NAME)
1717
PARENT_SCOPE)
1818
endfunction()
1919

20+
cc_library(py_reader SRCS py_reader.cc DEPS reader)
2021
cc_library(buffered_reader SRCS buffered_reader.cc DEPS reader simple_threadpool)
22+
2123
reader_library(open_files_op SRCS open_files_op.cc DEPS buffered_reader)
2224
reader_library(create_random_data_generator_op SRCS create_random_data_generator_op.cc)
2325
reader_library(create_shuffle_reader_op SRCS create_shuffle_reader_op.cc)
@@ -26,7 +28,7 @@ reader_library(create_recordio_file_reader_op SRCS create_recordio_file_reader_o
2628
reader_library(create_double_buffer_reader_op SRCS create_double_buffer_reader_op.cc DEPS buffered_reader)
2729
reader_library(create_multi_pass_reader_op SRCS create_multi_pass_reader_op.cc)
2830
reader_library(create_custom_reader_op SRCS create_custom_reader_op.cc)
29-
reader_library(create_py_reader_op SRCS create_py_reader_op.cc)
31+
reader_library(create_py_reader_op SRCS create_py_reader_op.cc DEPS py_reader)
3032

3133
if (NOT WIN32 AND NOT ON_INFER)
3234
cc_library(ctr_reader SRCS ctr_reader.cc DEPS gzstream reader zlib)
@@ -38,7 +40,7 @@ cc_test(reader_blocking_queue_test SRCS reader_blocking_queue_test.cc)
3840
# Export local libraries to parent
3941
# set(READER_LIBRARY ${LOCAL_READER_LIBS} PARENT_SCOPE)
4042

41-
op_library(read_op)
43+
op_library(read_op DEPS py_reader buffered_reader)
4244

4345
foreach(src ${LOCAL_READER_LIBS})
4446
set(OP_LIBRARY ${src} ${OP_LIBRARY} CACHE INTERNAL "op libs")

paddle/fluid/operators/reader/blocking_queue.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include <condition_variable> // NOLINT
1818
#include <deque>
19+
#include <utility>
1920

2021
#include "paddle/fluid/platform/enforce.h"
2122

@@ -34,7 +35,7 @@ class BlockingQueue {
3435
explicit BlockingQueue(size_t capacity, bool speed_test_mode = false)
3536
: capacity_(capacity), speed_test_mode_(speed_test_mode), closed_(false) {
3637
PADDLE_ENFORCE_GT(
37-
capacity_, 0,
38+
capacity_, static_cast<size_t>(0),
3839
"The capacity of a reader::BlockingQueue must be greater than 0.");
3940
}
4041

paddle/fluid/operators/reader/buffered_reader.cc

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ BufferedReader::~BufferedReader() {
3030
#ifdef PADDLE_WITH_CUDA
3131
if (platform::is_gpu_place(place_)) {
3232
platform::SetDeviceId(boost::get<platform::CUDAPlace>(place_).device);
33-
PADDLE_ENFORCE(cudaStreamDestroy(stream));
34-
for (auto &event : events) PADDLE_ENFORCE(cudaEventDestroy(event));
33+
PADDLE_ENFORCE(cudaStreamDestroy(stream_));
34+
for (auto &event : events_) {
35+
PADDLE_ENFORCE(cudaEventDestroy(event));
36+
}
3537
}
3638
#endif
3739
}
@@ -46,15 +48,15 @@ BufferedReader::BufferedReader(
4648
#ifdef PADDLE_WITH_CUDA
4749
if (platform::is_gpu_place(place_)) {
4850
platform::SetDeviceId(boost::get<platform::CUDAPlace>(place_).device);
49-
compute_stream =
51+
compute_stream_ =
5052
((platform::CUDADeviceContext *)(platform::DeviceContextPool::Instance()
5153
.Get(place_)))
5254
->stream();
53-
events.resize(buffer_size);
54-
for (auto &event : events) {
55+
events_.resize(buffer_size);
56+
for (auto &event : events_) {
5557
PADDLE_ENFORCE(cudaEventCreateWithFlags(&event, cudaEventDisableTiming));
5658
}
57-
PADDLE_ENFORCE(cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking));
59+
PADDLE_ENFORCE(cudaStreamCreateWithFlags(&stream_, cudaStreamNonBlocking));
5860
}
5961
#endif
6062
cpu_buffer_.resize(buffer_size);
@@ -73,7 +75,7 @@ void BufferedReader::ReadAsync(size_t i) {
7375
#ifdef PADDLE_WITH_CUDA
7476
if (platform::is_gpu_place(place_)) {
7577
platform::SetDeviceId(boost::get<platform::CUDAPlace>(place_).device);
76-
PADDLE_ENFORCE(cudaEventRecord(events[i], compute_stream));
78+
PADDLE_ENFORCE(cudaEventRecord(events_[i], compute_stream_));
7779
}
7880
#endif
7981
position_.emplace(thread_pool_.enqueue([this, i]() -> size_t {
@@ -91,7 +93,7 @@ void BufferedReader::ReadAsync(size_t i) {
9193
// commands from different streams cannot run concurrently.
9294
if (platform::is_gpu_place(place_)) {
9395
platform::SetDeviceId(boost::get<platform::CUDAPlace>(place_).device);
94-
PADDLE_ENFORCE(cudaStreamWaitEvent(stream, events[i], 0));
96+
PADDLE_ENFORCE(cudaStreamWaitEvent(stream_, events_[i], 0));
9597
TensorVec &gpu = gpu_buffer_[i];
9698
gpu.resize(cpu.size());
9799
platform::RecordEvent record_event("BufferedReader:MemoryCopy");
@@ -106,20 +108,22 @@ void BufferedReader::ReadAsync(size_t i) {
106108
if (platform::is_cuda_pinned_place(cpu_place)) {
107109
memory::Copy(boost::get<platform::CUDAPlace>(place_), gpu_ptr,
108110
boost::get<platform::CUDAPinnedPlace>(cpu_place),
109-
cpu_ptr, size, stream);
111+
cpu_ptr, size, stream_);
110112
} else if ((platform::is_gpu_place(cpu_place))) {
111113
memory::Copy(boost::get<platform::CUDAPlace>(place_), gpu_ptr,
112114
boost::get<platform::CUDAPlace>(cpu_place), cpu_ptr,
113-
size, stream);
115+
size, stream_);
114116
} else {
117+
// if cpu place is not pinned, async copy is slower than sync copy,
118+
// so we use sync copy instead.
115119
// TODO(zcd): The default stream should not be used here.
116120
memory::Copy(boost::get<platform::CUDAPlace>(place_), gpu_ptr,
117121
boost::get<platform::CPUPlace>(cpu_place), cpu_ptr, size,
118122
0);
119123
}
120124
gpu[i].set_lod(cpu[i].lod());
121125
}
122-
PADDLE_ENFORCE(cudaStreamSynchronize(stream));
126+
PADDLE_ENFORCE(cudaStreamSynchronize(stream_));
123127
}
124128
#endif
125129
return i;

paddle/fluid/operators/reader/buffered_reader.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#pragma once
1616

1717
#include <list>
18+
#include <memory>
1819
#include <queue>
1920
#include <vector>
2021
#include "ThreadPool.h"
@@ -63,9 +64,9 @@ class BufferedReader : public framework::DecoratedReader {
6364
std::vector<TensorVec> gpu_buffer_;
6465
size_t prev_pos_{-1UL};
6566
#ifdef PADDLE_WITH_CUDA
66-
cudaStream_t stream;
67-
cudaStream_t compute_stream;
68-
std::vector<cudaEvent_t> events;
67+
cudaStream_t stream_;
68+
cudaStream_t compute_stream_;
69+
std::vector<cudaEvent_t> events_;
6970
#endif
7071
};
7172

paddle/fluid/operators/reader/create_py_reader_op.cc

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,13 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "paddle/fluid/operators/reader/lod_tensor_blocking_queue.h"
15+
#include "paddle/fluid/operators/reader/py_reader.h"
1616
#include "paddle/fluid/operators/reader/reader_op_registry.h"
1717

1818
namespace paddle {
1919
namespace operators {
2020
namespace reader {
2121

22-
class PyReader : public framework::FileReader {
23-
public:
24-
explicit PyReader(const std::shared_ptr<LoDTensorBlockingQueue>& queue)
25-
: framework::FileReader() {
26-
PADDLE_ENFORCE(queue != nullptr, "LoDTensorBlockingQueue must not be null");
27-
queue_ = queue;
28-
}
29-
30-
void ReadNext(std::vector<framework::LoDTensor>* out) override {
31-
bool success;
32-
*out = queue_->Pop(&success);
33-
if (!success) out->clear();
34-
}
35-
36-
~PyReader() { queue_->Close(); }
37-
38-
void Shutdown() override { queue_->Close(); }
39-
40-
void Start() override { queue_->ReOpen(); }
41-
42-
private:
43-
std::shared_ptr<LoDTensorBlockingQueue> queue_;
44-
};
45-
4622
class CreatePyReaderOp : public framework::OperatorBase {
4723
public:
4824
using framework::OperatorBase::OperatorBase;
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#include "paddle/fluid/operators/reader/py_reader.h"
16+
#include <memory>
17+
18+
namespace paddle {
19+
namespace operators {
20+
namespace reader {
21+
22+
PyReader::PyReader(const std::shared_ptr<LoDTensorBlockingQueue>& queue)
23+
: framework::FileReader() {
24+
PADDLE_ENFORCE(queue != nullptr, "LoDTensorBlockingQueue must not be null");
25+
queue_ = queue;
26+
}
27+
28+
void PyReader::ReadNext(std::vector<framework::LoDTensor>* out) {
29+
bool success;
30+
*out = queue_->Pop(&success);
31+
if (!success) out->clear();
32+
}
33+
34+
PyReader::~PyReader() { queue_->Close(); }
35+
36+
void PyReader::Shutdown() { queue_->Close(); }
37+
38+
void PyReader::Start() { queue_->ReOpen(); }
39+
40+
} // namespace reader
41+
} // namespace operators
42+
} // namespace paddle
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#pragma once
16+
17+
#include <atomic>
18+
#include <memory>
19+
#include <vector>
20+
#include "paddle/fluid/framework/reader.h"
21+
#include "paddle/fluid/operators/reader/lod_tensor_blocking_queue.h"
22+
23+
namespace paddle {
24+
namespace operators {
25+
namespace reader {
26+
27+
class PyReader : public framework::FileReader {
28+
public:
29+
explicit PyReader(const std::shared_ptr<LoDTensorBlockingQueue>& queue);
30+
31+
void ReadNext(std::vector<framework::LoDTensor>* out) override;
32+
33+
~PyReader();
34+
35+
void Shutdown() override;
36+
37+
void Start() override;
38+
39+
private:
40+
std::shared_ptr<LoDTensorBlockingQueue> queue_;
41+
};
42+
43+
} // namespace reader
44+
} // namespace operators
45+
} // namespace paddle

paddle/fluid/pybind/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set(PYBIND_DEPS pybind python proto_desc memory executor async_executor prune
55
if(WITH_PYTHON)
66
list(APPEND PYBIND_DEPS py_func_op)
77
endif()
8-
set(PYBIND_SRCS pybind.cc exception.cc protobuf.cc const_value.cc recordio.cc async_executor_py.cc imperative.cc ir.cc inference_api.cc)
8+
set(PYBIND_SRCS pybind.cc exception.cc protobuf.cc const_value.cc recordio.cc reader_py.cc async_executor_py.cc imperative.cc ir.cc inference_api.cc)
99

1010
if(WITH_PYTHON)
1111
if(WITH_AMD_GPU)

0 commit comments

Comments
 (0)