diff --git a/paddle/fluid/framework/CMakeLists.txt b/paddle/fluid/framework/CMakeLists.txt index 5a5696976d69449ee749d10cffb6a5638e14aa8c..2c62d4ed6b0e61d4a36b61cda40fa539285ccb14 100644 --- a/paddle/fluid/framework/CMakeLists.txt +++ b/paddle/fluid/framework/CMakeLists.txt @@ -1,6 +1,6 @@ +add_subdirectory(ir) if (NOT WIN32) add_subdirectory(details) -add_subdirectory(ir) endif (NOT WIN32) # ddim lib proto_library(framework_proto SRCS framework.proto) @@ -114,19 +114,12 @@ else() cc_library(executor SRCS executor.cc DEPS op_registry device_context scope framework_proto glog lod_rank_table feed_fetch_method) endif() -<<<<<<< HEAD - - -if (NOT WIN32) -cc_library(parallel_executor SRCS parallel_executor.cc DEPS threaded_ssa_graph_executor scope_buffered_ssa_graph_executor graph graph_viz_pass multi_devices_graph_pass multi_devices_graph_print_pass multi_devices_graph_check_pass) -======= if (NOT WIN32) cc_library(parallel_executor SRCS parallel_executor.cc DEPS threaded_ssa_graph_executor scope_buffered_ssa_graph_executor graph graph_viz_pass multi_devices_graph_pass multi_devices_graph_print_pass multi_devices_graph_check_pass fast_threaded_ssa_graph_executor) ->>>>>>> origin/develop endif() # NOT WIN32 cc_library(prune SRCS prune.cc DEPS framework_proto) diff --git a/paddle/fluid/operators/CMakeLists.txt b/paddle/fluid/operators/CMakeLists.txt index 171f7ff761e192b90e64c9cba7a2de3a10755a69..8da0aaaafeb151e8f1900bc66f06e771c857fc00 100644 --- a/paddle/fluid/operators/CMakeLists.txt +++ b/paddle/fluid/operators/CMakeLists.txt @@ -85,11 +85,7 @@ function(op_library TARGET) #remove windows unsupported op if (WIN32) -<<<<<<< HEAD foreach(windows_unsupport_op "nccl_op" "gen_nccl_id_op" "warpctc_op") -======= - foreach(windows_unsupport_op "nccl_op" "gen_nccl_id_op") ->>>>>>> origin/develop if ("${TARGET}" STREQUAL "${windows_unsupport_op}") return() endif() diff --git a/paddle/fluid/platform/cpu_info.cc b/paddle/fluid/platform/cpu_info.cc index 90a0db3829b5eae329e41d2869149e60759506be..2880c09263f10e9c624e11b77188171f48d9db28 100644 --- a/paddle/fluid/platform/cpu_info.cc +++ b/paddle/fluid/platform/cpu_info.cc @@ -22,13 +22,13 @@ limitations under the License. */ #ifdef __APPLE__ #include #include + #elif defined(_WIN32) -#define NOMINMAX -#include +#define NOMINMAX // msvc max/min macro conflict with std::min/max #include #else #include -#endif +#endif // _WIN32 #include #include "gflags/gflags.h" diff --git a/paddle/fluid/platform/enforce.h b/paddle/fluid/platform/enforce.h index a0414994e1352159f3868370fd0ef1a11d083620..61a653d9313daff96d39c08e80f17d7e33acceb1 100644 --- a/paddle/fluid/platform/enforce.h +++ b/paddle/fluid/platform/enforce.h @@ -18,6 +18,11 @@ limitations under the License. */ #include // for __cxa_demangle #endif // __GNUC__ +#if defined(_WIN32) +#define NOMINMAX // msvc max/min macro conflict with std::min/max +#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h +#endif + #ifdef PADDLE_WITH_CUDA #include #include @@ -35,7 +40,6 @@ limitations under the License. */ #include "glog/logging.h" #include "paddle/fluid/platform/macros.h" #include "paddle/fluid/platform/port.h" -#include "paddle/fluid/platform/port.h" #include "paddle/fluid/string/printf.h" #include "paddle/fluid/string/to_string.h" @@ -263,10 +267,10 @@ inline void throw_on_error(T e) { } while (false) #else -#define PADDLE_ENFORCE(...) ::paddle::platform::throw_on_error(__VA_ARGS__); -#endif +#define PADDLE_ENFORCE(...) ::paddle::platform::throw_on_error(__VA_ARGS__) +#endif // REPLACE_ENFORCE_GLOG + #else // !_WIN32 -#define GLOG_NO_ABBREVIATED_SEVERITIES // disable enforce, caused by the varardic macro exception error #define PADDLE_THROW(x) \ do { \ @@ -274,7 +278,7 @@ inline void throw_on_error(T e) { std::runtime_error("Windows disable the enforce.")); \ } while (false) -#define PADDLE_ENFORCE(x) x +#define PADDLE_ENFORCE(x, ...) x #endif // !_WIN32 /* diff --git a/paddle/fluid/platform/macros.h b/paddle/fluid/platform/macros.h index 78775a2bb1788fdc52d17c5519aee34aed03c337..4cc04b090519637ab0b8d3740b8a12f216218cae 100644 --- a/paddle/fluid/platform/macros.h +++ b/paddle/fluid/platform/macros.h @@ -14,8 +14,6 @@ limitations under the License. */ #pragma once -#define GLOG_NO_ABBREVIATED_SEVERITIES - // Disable the copy and assignment operator for a class. #ifndef DISABLE_COPY_AND_ASSIGN #define DISABLE_COPY_AND_ASSIGN(classname) \ diff --git a/paddle/fluid/pybind/CMakeLists.txt b/paddle/fluid/pybind/CMakeLists.txt index 51713f474ad31082611f322669e38f9131ff92df..b5bd07d401f9ebfe441bc0f84f9bad317f0e8da9 100644 --- a/paddle/fluid/pybind/CMakeLists.txt +++ b/paddle/fluid/pybind/CMakeLists.txt @@ -1,4 +1,4 @@ -<<<<<<< HEAD + set(PYBIND_DEPS pybind python proto_desc memory executor prune feed_fetch_method) set(PYBIND_SRCS pybind.cc exception.cc protobuf.cc const_value.cc) if(NOT WIN32) @@ -8,20 +8,12 @@ endif() if(WITH_PYTHON) if(WITH_AMD_GPU) hip_library(paddle_pybind SHARED -<<<<<<< HEAD SRCS ${PYBIND_SRCS} -======= - SRCS pybind.cc exception.cc protobuf.cc const_value.cc recordio.cc ->>>>>>> origin/develop DEPS ${PYBIND_DEPS} ${GLOB_OP_LIB}) else() cc_library(paddle_pybind SHARED -<<<<<<< HEAD SRCS ${PYBIND_SRCS} -======= - SRCS pybind.cc exception.cc protobuf.cc const_value.cc recordio.cc ->>>>>>> origin/develop DEPS ${PYBIND_DEPS} ${GLOB_OP_LIB}) if(NOT APPLE AND NOT ANDROID AND NOT WIN32)