|
|
@ -86,6 +86,9 @@ DEFINE_bool(reader_queue_speed_test_mode, false,
|
|
|
|
"If set true, the queue.pop will only get data from queue but not "
|
|
|
|
"If set true, the queue.pop will only get data from queue but not "
|
|
|
|
"remove the data from queue for speed testing");
|
|
|
|
"remove the data from queue for speed testing");
|
|
|
|
DECLARE_bool(use_mkldnn);
|
|
|
|
DECLARE_bool(use_mkldnn);
|
|
|
|
|
|
|
|
#ifdef PADDLE_WITH_NGRAPH
|
|
|
|
|
|
|
|
DECLARE_bool(use_ngraph);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// disable auto conversion to list in Python
|
|
|
|
// disable auto conversion to list in Python
|
|
|
|
PYBIND11_MAKE_OPAQUE(paddle::framework::LoDTensorArray);
|
|
|
|
PYBIND11_MAKE_OPAQUE(paddle::framework::LoDTensorArray);
|
|
|
@ -740,6 +743,9 @@ All parameter, weight, gradient are variables in Paddle.
|
|
|
|
return framework::OpInfoMap::Instance().Get(op_type).HasInferInplace();
|
|
|
|
return framework::OpInfoMap::Instance().Get(op_type).HasInferInplace();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
m.def("get_flags_use_mkldnn", []() { return FLAGS_use_mkldnn; });
|
|
|
|
m.def("get_flags_use_mkldnn", []() { return FLAGS_use_mkldnn; });
|
|
|
|
|
|
|
|
#ifdef PADDLE_WITH_NGRAPH
|
|
|
|
|
|
|
|
m.def("get_flags_use_ngraph", []() { return FLAGS_use_ngraph; });
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
m.def("prune", [](const ProgramDesc &origin,
|
|
|
|
m.def("prune", [](const ProgramDesc &origin,
|
|
|
|
const std::vector<std::array<size_t, 2>> &targets) {
|
|
|
|
const std::vector<std::array<size_t, 2>> &targets) {
|
|
|
|