|
|
|
@ -23,9 +23,11 @@ limitations under the License. */
|
|
|
|
|
#include "paddle/fluid/framework/feed_fetch_method.h"
|
|
|
|
|
#include "paddle/fluid/inference/api/api_impl.h"
|
|
|
|
|
#include "paddle/fluid/inference/api/helper.h"
|
|
|
|
|
#include "paddle/fluid/platform/cpu_helper.h"
|
|
|
|
|
#include "paddle/fluid/platform/profiler.h"
|
|
|
|
|
|
|
|
|
|
DEFINE_bool(profile, false, "Turn on profiler for fluid");
|
|
|
|
|
DECLARE_int32(paddle_num_threads);
|
|
|
|
|
|
|
|
|
|
namespace paddle {
|
|
|
|
|
namespace {
|
|
|
|
@ -72,6 +74,9 @@ bool NativePaddlePredictor::Init(
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// no matter with or without MKLDNN
|
|
|
|
|
paddle::platform::SetNumThreads(FLAGS_paddle_num_threads);
|
|
|
|
|
|
|
|
|
|
if (config_.use_gpu) {
|
|
|
|
|
place_ = paddle::platform::CUDAPlace(config_.device);
|
|
|
|
|
} else {
|
|
|
|
|