提交 cfbf1ba3 编写于 作者: D dzhwinter

add source

上级 c1ad52f7
add_subdirectory(ir)
if (NOT WIN32) if (NOT WIN32)
add_subdirectory(details) add_subdirectory(details)
add_subdirectory(ir)
endif (NOT WIN32) endif (NOT WIN32)
# ddim lib # ddim lib
proto_library(framework_proto SRCS framework.proto) proto_library(framework_proto SRCS framework.proto)
...@@ -114,19 +114,12 @@ else() ...@@ -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) cc_library(executor SRCS executor.cc DEPS op_registry device_context scope framework_proto glog lod_rank_table feed_fetch_method)
endif() 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) if (NOT WIN32)
cc_library(parallel_executor SRCS parallel_executor.cc DEPS cc_library(parallel_executor SRCS parallel_executor.cc DEPS
threaded_ssa_graph_executor scope_buffered_ssa_graph_executor threaded_ssa_graph_executor scope_buffered_ssa_graph_executor
graph graph_viz_pass multi_devices_graph_pass graph graph_viz_pass multi_devices_graph_pass
multi_devices_graph_print_pass multi_devices_graph_check_pass multi_devices_graph_print_pass multi_devices_graph_check_pass
fast_threaded_ssa_graph_executor) fast_threaded_ssa_graph_executor)
>>>>>>> origin/develop
endif() # NOT WIN32 endif() # NOT WIN32
cc_library(prune SRCS prune.cc DEPS framework_proto) cc_library(prune SRCS prune.cc DEPS framework_proto)
......
...@@ -85,11 +85,7 @@ function(op_library TARGET) ...@@ -85,11 +85,7 @@ function(op_library TARGET)
#remove windows unsupported op #remove windows unsupported op
if (WIN32) 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" "warpctc_op")
=======
foreach(windows_unsupport_op "nccl_op" "gen_nccl_id_op")
>>>>>>> origin/develop
if ("${TARGET}" STREQUAL "${windows_unsupport_op}") if ("${TARGET}" STREQUAL "${windows_unsupport_op}")
return() return()
endif() endif()
......
...@@ -22,13 +22,13 @@ limitations under the License. */ ...@@ -22,13 +22,13 @@ limitations under the License. */
#ifdef __APPLE__ #ifdef __APPLE__
#include <sys/sysctl.h> #include <sys/sysctl.h>
#include <sys/types.h> #include <sys/types.h>
#elif defined(_WIN32) #elif defined(_WIN32)
#define NOMINMAX #define NOMINMAX // msvc max/min macro conflict with std::min/max
#include <psapi.h>
#include <windows.h> #include <windows.h>
#else #else
#include <unistd.h> #include <unistd.h>
#endif #endif // _WIN32
#include <algorithm> #include <algorithm>
#include "gflags/gflags.h" #include "gflags/gflags.h"
......
...@@ -18,6 +18,11 @@ limitations under the License. */ ...@@ -18,6 +18,11 @@ limitations under the License. */
#include <cxxabi.h> // for __cxa_demangle #include <cxxabi.h> // for __cxa_demangle
#endif // __GNUC__ #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 #ifdef PADDLE_WITH_CUDA
#include <cublas_v2.h> #include <cublas_v2.h>
#include <cudnn.h> #include <cudnn.h>
...@@ -35,7 +40,6 @@ limitations under the License. */ ...@@ -35,7 +40,6 @@ limitations under the License. */
#include "glog/logging.h" #include "glog/logging.h"
#include "paddle/fluid/platform/macros.h" #include "paddle/fluid/platform/macros.h"
#include "paddle/fluid/platform/port.h" #include "paddle/fluid/platform/port.h"
#include "paddle/fluid/platform/port.h"
#include "paddle/fluid/string/printf.h" #include "paddle/fluid/string/printf.h"
#include "paddle/fluid/string/to_string.h" #include "paddle/fluid/string/to_string.h"
...@@ -263,10 +267,10 @@ inline void throw_on_error(T e) { ...@@ -263,10 +267,10 @@ inline void throw_on_error(T e) {
} while (false) } while (false)
#else #else
#define PADDLE_ENFORCE(...) ::paddle::platform::throw_on_error(__VA_ARGS__); #define PADDLE_ENFORCE(...) ::paddle::platform::throw_on_error(__VA_ARGS__)
#endif #endif // REPLACE_ENFORCE_GLOG
#else // !_WIN32 #else // !_WIN32
#define GLOG_NO_ABBREVIATED_SEVERITIES
// disable enforce, caused by the varardic macro exception error // disable enforce, caused by the varardic macro exception error
#define PADDLE_THROW(x) \ #define PADDLE_THROW(x) \
do { \ do { \
...@@ -274,7 +278,7 @@ inline void throw_on_error(T e) { ...@@ -274,7 +278,7 @@ inline void throw_on_error(T e) {
std::runtime_error("Windows disable the enforce.")); \ std::runtime_error("Windows disable the enforce.")); \
} while (false) } while (false)
#define PADDLE_ENFORCE(x) x #define PADDLE_ENFORCE(x, ...) x
#endif // !_WIN32 #endif // !_WIN32
/* /*
......
...@@ -14,8 +14,6 @@ limitations under the License. */ ...@@ -14,8 +14,6 @@ limitations under the License. */
#pragma once #pragma once
#define GLOG_NO_ABBREVIATED_SEVERITIES
// Disable the copy and assignment operator for a class. // Disable the copy and assignment operator for a class.
#ifndef DISABLE_COPY_AND_ASSIGN #ifndef DISABLE_COPY_AND_ASSIGN
#define DISABLE_COPY_AND_ASSIGN(classname) \ #define DISABLE_COPY_AND_ASSIGN(classname) \
......
<<<<<<< HEAD
set(PYBIND_DEPS pybind python proto_desc memory executor prune feed_fetch_method) 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) set(PYBIND_SRCS pybind.cc exception.cc protobuf.cc const_value.cc)
if(NOT WIN32) if(NOT WIN32)
...@@ -8,20 +8,12 @@ endif() ...@@ -8,20 +8,12 @@ endif()
if(WITH_PYTHON) if(WITH_PYTHON)
if(WITH_AMD_GPU) if(WITH_AMD_GPU)
hip_library(paddle_pybind SHARED hip_library(paddle_pybind SHARED
<<<<<<< HEAD
SRCS ${PYBIND_SRCS} SRCS ${PYBIND_SRCS}
=======
SRCS pybind.cc exception.cc protobuf.cc const_value.cc recordio.cc
>>>>>>> origin/develop
DEPS ${PYBIND_DEPS} DEPS ${PYBIND_DEPS}
${GLOB_OP_LIB}) ${GLOB_OP_LIB})
else() else()
cc_library(paddle_pybind SHARED cc_library(paddle_pybind SHARED
<<<<<<< HEAD
SRCS ${PYBIND_SRCS} SRCS ${PYBIND_SRCS}
=======
SRCS pybind.cc exception.cc protobuf.cc const_value.cc recordio.cc
>>>>>>> origin/develop
DEPS ${PYBIND_DEPS} DEPS ${PYBIND_DEPS}
${GLOB_OP_LIB}) ${GLOB_OP_LIB})
if(NOT APPLE AND NOT ANDROID AND NOT WIN32) if(NOT APPLE AND NOT ANDROID AND NOT WIN32)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册