Skip to content

Commit 133d11d

Browse files
committed
Merge branch 'windows/build' into windows/online
test=develop
2 parents a7c8e42 + 6e66fad commit 133d11d

File tree

14 files changed

+10
-42
lines changed

14 files changed

+10
-42
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ if (WIN32)
137137
"Disable DSO when compiling for Windows" FORCE)
138138
set(WITH_MKL OFF CACHE STRING
139139
"Disable MKL when compiling for Windows" FORCE)
140+
set(WITH_DISTRIBUTE OFF CACHE STRING
141+
"Disable DISTRIBUTE when compiling for Windows" FORCE)
140142
endif()
141143

142144
set(THIRD_PARTY_PATH "${CMAKE_BINARY_DIR}/third_party" CACHE STRING

cmake/operators.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ function(op_library TARGET)
8484
endif()
8585
if (WIN32)
8686
# remove windows unsupported op, because windows has no nccl, no warpctc such ops.
87-
foreach(windows_unsupport_op "nccl_op" "gen_nccl_id_op" "warpctc_op"
88-
"channel_send_op" "channel_create_op" "channel_close_op" "channel_recv_op")
87+
foreach(windows_unsupport_op "nccl_op" "gen_nccl_id_op" "warpctc_op")
8988
if ("${TARGET}" STREQUAL "${windows_unsupport_op}")
9089
return()
9190
endif()

paddle/fluid/framework/eigen.h

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

1515
#pragma once
16-
// logging.h and windows.h conflict
17-
#define GLOG_NO_ABBREVIATED_SEVERITIES
18-
// solve static linking error in windows
19-
// https://github.com/google/glog/issues/301
20-
#define GOOGLE_GLOG_DLL_DECL
2116

2217
#include "paddle/fluid/framework/tensor.h"
2318
#include "unsupported/Eigen/CXX11/Tensor"

paddle/fluid/framework/op_registry.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ limitations under the License. */
2323
#include <unordered_map>
2424
#include <unordered_set>
2525

26-
#if defined(_WIN32)
27-
#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
28-
#define GOOGLE_GLOG_DLL_DECL
29-
#endif
30-
3126
#include "glog/logging.h" // For VLOG()
3227
#include "paddle/fluid/framework/attribute.h"
3328
#include "paddle/fluid/framework/details/op_registry.h"

paddle/fluid/framework/operator.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
14-
#define GLOG_NO_ABBREVIATED_SEVERITIES
15-
#define GOOGLE_GLOG_DLL_DECL
1614

1715
#include <gflags/gflags.h>
1816
#include <glog/logging.h>

paddle/fluid/framework/operator.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ limitations under the License. */
2020
#include <tuple>
2121
#include <unordered_map>
2222
#include <vector>
23-
#define GLOG_NO_ABBREVIATED_SEVERITIES
24-
#define GOOGLE_GLOG_DLL_DECL
2523

2624
#include "glog/logging.h" // For VLOG
2725
#include "paddle/fluid/framework/attribute.h"

paddle/fluid/inference/api/api_impl.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ limitations under the License. */
1414

1515
#pragma once
1616

17-
// logging.h and windows.h conflict
18-
#define GLOG_NO_ABBREVIATED_SEVERITIES
19-
// solve static linking error in windows
20-
// https://github.com/google/glog/issues/301
21-
#define GOOGLE_GLOG_DLL_DECL
22-
2317
#include <glog/logging.h>
2418
#include <map>
2519
#include <memory>

paddle/fluid/platform/cpu_helper.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ namespace platform {
3030
void SetNumThreads(int num_threads) {
3131
#ifdef PADDLE_USE_OPENBLAS
3232
// windows has no support for openblas multi-thread
33+
// please refer to: https://github.com/PaddlePaddle/Paddle/issues/7234
3334
#ifdef _WIN32
3435
if (num_threads > 1) {
3536
num_threads = 1;

paddle/fluid/platform/dynload/cudnn.h

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

1515
#pragma once
16-
#define GLOG_NO_ABBREVIATED_SEVERITIES
17-
#define GOOGLE_GLOG_DLL_DECL
1816
#include <glog/logging.h>
1917

2018
#include <cudnn.h>

paddle/fluid/platform/enforce.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ limitations under the License. */
1818
#include <cxxabi.h> // for __cxa_demangle
1919
#endif // __GNUC__
2020

21-
#if defined(_WIN32)
22-
#define NOMINMAX // msvc max/min macro conflict with std::min/max
23-
#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
24-
#define GOOGLE_GLOG_DLL_DECL
25-
#endif
26-
2721
#ifdef PADDLE_WITH_CUDA
2822
#include <cublas_v2.h>
2923
#include <cudnn.h>

0 commit comments

Comments
 (0)