From 526e0323c34dcf67f17c861774ca14a234ab5fee Mon Sep 17 00:00:00 2001 From: JingZhuangzhuang <75348594+JZZ-NOTE@users.noreply.github.com> Date: Thu, 15 Sep 2022 11:31:33 +0800 Subject: [PATCH] Modify callstacklevel flag for c++ (#46059) --- paddle/fluid/platform/flags.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paddle/fluid/platform/flags.cc b/paddle/fluid/platform/flags.cc index dd66ab179b2..6643810195b 100644 --- a/paddle/fluid/platform/flags.cc +++ b/paddle/fluid/platform/flags.cc @@ -659,7 +659,11 @@ PADDLE_DEFINE_EXPORTED_bool(use_mkldnn, false, "Use MKLDNN to run"); * If FLAGS_call_stack_level == 2, the python stack, c++ stack, and error * message summary will be shown. */ +#ifdef PADDLE_NO_PYTHON +static const int32_t kDefaultCallStackLevel = 2; +#else static const int32_t kDefaultCallStackLevel = 1; +#endif PADDLE_DEFINE_EXPORTED_int32( call_stack_level, -- GitLab