Skip to content

Commit 8aa1772

Browse files
authored
fix compile errors when using shared phi on windows (#56915)
* update * fix bug * fix bug * fix bug * fix bug * rerun ci * turn off shared_phi
1 parent 7d8402a commit 8aa1772

File tree

8 files changed

+13
-14
lines changed

8 files changed

+13
-14
lines changed

paddle/fluid/framework/new_executor/interpreter_base_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ PD_DECLARE_bool(new_executor_use_local_scope);
4545

4646
PHI_DECLARE_bool(check_nan_inf);
4747
PD_DECLARE_bool(benchmark);
48-
PD_DECLARE_uint64(executor_log_deps_every_microseconds);
48+
PHI_DECLARE_uint64(executor_log_deps_every_microseconds);
4949
PHI_DECLARE_bool(new_executor_use_cuda_graph);
5050
PHI_DECLARE_bool(enable_new_ir_in_executor);
5151
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)

paddle/fluid/framework/op_kernel_type.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ limitations under the License. */
2626
#include "paddle/phi/core/kernel_factory.h"
2727
#include "paddle/utils/flags.h"
2828

29-
PD_DECLARE_bool(use_stride_kernel);
29+
PHI_DECLARE_bool(use_stride_kernel);
3030

3131
namespace paddle {
3232
namespace framework {

paddle/fluid/imperative/tracer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
PHI_DECLARE_bool(use_mkldnn);
3939
PHI_DECLARE_string(tracer_mkldnn_ops_on);
4040
PHI_DECLARE_string(tracer_mkldnn_ops_off);
41-
PD_DECLARE_bool(use_stride_kernel);
41+
PHI_DECLARE_bool(use_stride_kernel);
4242

4343
namespace paddle {
4444
namespace imperative {

paddle/fluid/imperative/tracer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include "paddle/fluid/platform/macros.h"
3333
#include "paddle/phi/core/compat/arg_map_context.h"
3434

35-
PD_DECLARE_bool(use_stride_kernel);
35+
PHI_DECLARE_bool(use_stride_kernel);
3636
namespace paddle {
3737
namespace imperative {
3838

paddle/fluid/pybind/eager_method.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ typedef SSIZE_T ssize_t;
6969
#include "paddle/utils/pybind.h"
7070

7171
PHI_DECLARE_bool(set_to_1d);
72-
PD_DECLARE_bool(use_stride_kernel);
72+
PHI_DECLARE_bool(use_stride_kernel);
7373

7474
namespace paddle {
7575
namespace pybind {

paddle/phi/api/lib/api_gen_utils.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

1515
#include "paddle/phi/api/lib/api_gen_utils.h"
16+
#include "paddle/phi/core/flags.h"
1617
#include "paddle/phi/core/visit_type.h"
1718
#include "paddle/phi/kernels/strided_copy_kernel.h"
18-
#include "paddle/utils/flags.h"
1919

20-
PD_DECLARE_bool(use_stride_kernel);
20+
PHI_DECLARE_bool(use_stride_kernel);
2121

2222
#include "glog/logging.h"
2323

paddle/phi/api/lib/data_transform.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ limitations under the License. */
2121
#include "paddle/phi/api/lib/utils/allocator.h"
2222
#include "paddle/phi/backends/context_pool.h"
2323
#include "paddle/phi/core/distributed/auto_parallel/dist_tensor.h"
24+
#include "paddle/phi/core/flags.h"
2425
#include "paddle/phi/core/kernel_registry.h"
2526
#include "paddle/phi/core/tensor_utils.h"
2627
#include "paddle/phi/core/visit_type.h"
2728
#include "paddle/phi/kernels/cast_kernel.h"
2829
#include "paddle/phi/kernels/contiguous_kernel.h"
2930
#include "paddle/phi/kernels/transfer_layout_kernel.h"
30-
#include "paddle/utils/flags.h"
3131

32-
PD_DECLARE_bool(use_stride_kernel);
32+
PHI_DECLARE_bool(use_stride_kernel);
3333

3434
namespace paddle {
3535
namespace experimental {

paddle/phi/core/kernel_factory.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@
2525
#if defined(PADDLE_WITH_CUSTOM_DEVICE)
2626
#include "paddle/phi/backends/custom/custom_device_op_list.h"
2727
#endif
28-
#include "paddle/fluid/platform/flags.h"
2928
#include "paddle/phi/core/compat/op_utils.h"
29+
#include "paddle/phi/core/flags.h"
3030
#include "paddle/utils/string/string_helper.h"
3131

32-
PADDLE_DEFINE_EXPORTED_bool(
33-
use_stride_kernel,
34-
true,
35-
"Whether to use strdie kernel if op support stride.");
32+
PHI_DEFINE_EXPORTED_bool(use_stride_kernel,
33+
true,
34+
"Whether to use strdie kernel if op support stride.");
3635

3736
PD_DECLARE_int32(low_precision_op_list);
3837
PD_DECLARE_bool(enable_api_kernel_fallback);

0 commit comments

Comments
 (0)