Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
6e66fadb
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6e66fadb
编写于
11月 21, 2018
作者:
P
peizhilin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean up the pre-definitions on windows
上级
67562a6f
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
10 addition
and
42 deletion
+10
-42
CMakeLists.txt
CMakeLists.txt
+2
-0
cmake/operators.cmake
cmake/operators.cmake
+1
-2
paddle/fluid/framework/eigen.h
paddle/fluid/framework/eigen.h
+0
-5
paddle/fluid/framework/op_registry.h
paddle/fluid/framework/op_registry.h
+0
-5
paddle/fluid/framework/operator.cc
paddle/fluid/framework/operator.cc
+0
-2
paddle/fluid/framework/operator.h
paddle/fluid/framework/operator.h
+0
-2
paddle/fluid/inference/api/api_impl.h
paddle/fluid/inference/api/api_impl.h
+0
-6
paddle/fluid/platform/cpu_helper.cc
paddle/fluid/platform/cpu_helper.cc
+1
-0
paddle/fluid/platform/dynload/cudnn.h
paddle/fluid/platform/dynload/cudnn.h
+0
-2
paddle/fluid/platform/enforce.h
paddle/fluid/platform/enforce.h
+0
-6
paddle/fluid/platform/init.h
paddle/fluid/platform/init.h
+0
-3
paddle/fluid/platform/port.h
paddle/fluid/platform/port.h
+4
-0
paddle/fluid/platform/profiler.cc
paddle/fluid/platform/profiler.cc
+2
-2
paddle/fluid/pybind/pybind.cc
paddle/fluid/pybind/pybind.cc
+0
-7
未找到文件。
CMakeLists.txt
浏览文件 @
6e66fadb
...
@@ -137,6 +137,8 @@ if (WIN32)
...
@@ -137,6 +137,8 @@ if (WIN32)
"Disable DSO when compiling for Windows"
FORCE
)
"Disable DSO when compiling for Windows"
FORCE
)
set
(
WITH_MKL OFF CACHE STRING
set
(
WITH_MKL OFF CACHE STRING
"Disable MKL when compiling for Windows"
FORCE
)
"Disable MKL when compiling for Windows"
FORCE
)
set
(
WITH_DISTRIBUTE OFF CACHE STRING
"Disable DISTRIBUTE when compiling for Windows"
FORCE
)
endif
()
endif
()
set
(
THIRD_PARTY_PATH
"
${
CMAKE_BINARY_DIR
}
/third_party"
CACHE STRING
set
(
THIRD_PARTY_PATH
"
${
CMAKE_BINARY_DIR
}
/third_party"
CACHE STRING
...
...
cmake/operators.cmake
浏览文件 @
6e66fadb
...
@@ -84,8 +84,7 @@ function(op_library TARGET)
...
@@ -84,8 +84,7 @@ function(op_library TARGET)
endif
()
endif
()
if
(
WIN32
)
if
(
WIN32
)
# remove windows unsupported op, because windows has no nccl, no warpctc such ops.
# remove windows unsupported op, because windows has no nccl, no warpctc such ops.
foreach
(
windows_unsupport_op
"nccl_op"
"gen_nccl_id_op"
"warpctc_op"
foreach
(
windows_unsupport_op
"nccl_op"
"gen_nccl_id_op"
"warpctc_op"
)
"channel_send_op"
"channel_create_op"
"channel_close_op"
"channel_recv_op"
)
if
(
"
${
TARGET
}
"
STREQUAL
"
${
windows_unsupport_op
}
"
)
if
(
"
${
TARGET
}
"
STREQUAL
"
${
windows_unsupport_op
}
"
)
return
()
return
()
endif
()
endif
()
...
...
paddle/fluid/framework/eigen.h
浏览文件 @
6e66fadb
...
@@ -13,11 +13,6 @@ See the License for the specific language governing permissions and
...
@@ -13,11 +13,6 @@ See the License for the specific language governing permissions and
limitations under the License. */
limitations under the License. */
#pragma once
#pragma once
// logging.h and windows.h conflict
#define GLOG_NO_ABBREVIATED_SEVERITIES
// solve static linking error in windows
// https://github.com/google/glog/issues/301
#define GOOGLE_GLOG_DLL_DECL
#include "paddle/fluid/framework/tensor.h"
#include "paddle/fluid/framework/tensor.h"
#include "unsupported/Eigen/CXX11/Tensor"
#include "unsupported/Eigen/CXX11/Tensor"
...
...
paddle/fluid/framework/op_registry.h
浏览文件 @
6e66fadb
...
@@ -23,11 +23,6 @@ limitations under the License. */
...
@@ -23,11 +23,6 @@ limitations under the License. */
#include <unordered_map>
#include <unordered_map>
#include <unordered_set>
#include <unordered_set>
#if defined(_WIN32)
#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#define GOOGLE_GLOG_DLL_DECL
#endif
#include "glog/logging.h" // For VLOG()
#include "glog/logging.h" // For VLOG()
#include "paddle/fluid/framework/attribute.h"
#include "paddle/fluid/framework/attribute.h"
#include "paddle/fluid/framework/details/op_registry.h"
#include "paddle/fluid/framework/details/op_registry.h"
...
...
paddle/fluid/framework/operator.cc
浏览文件 @
6e66fadb
...
@@ -11,8 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
...
@@ -11,8 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
limitations under the License. */
limitations under the License. */
#define GLOG_NO_ABBREVIATED_SEVERITIES
#define GOOGLE_GLOG_DLL_DECL
#include <gflags/gflags.h>
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <glog/logging.h>
...
...
paddle/fluid/framework/operator.h
浏览文件 @
6e66fadb
...
@@ -20,8 +20,6 @@ limitations under the License. */
...
@@ -20,8 +20,6 @@ limitations under the License. */
#include <tuple>
#include <tuple>
#include <unordered_map>
#include <unordered_map>
#include <vector>
#include <vector>
#define GLOG_NO_ABBREVIATED_SEVERITIES
#define GOOGLE_GLOG_DLL_DECL
#include "glog/logging.h" // For VLOG
#include "glog/logging.h" // For VLOG
#include "paddle/fluid/framework/attribute.h"
#include "paddle/fluid/framework/attribute.h"
...
...
paddle/fluid/inference/api/api_impl.h
浏览文件 @
6e66fadb
...
@@ -14,12 +14,6 @@ limitations under the License. */
...
@@ -14,12 +14,6 @@ limitations under the License. */
#pragma once
#pragma once
// logging.h and windows.h conflict
#define GLOG_NO_ABBREVIATED_SEVERITIES
// solve static linking error in windows
// https://github.com/google/glog/issues/301
#define GOOGLE_GLOG_DLL_DECL
#include <glog/logging.h>
#include <glog/logging.h>
#include <map>
#include <map>
#include <memory>
#include <memory>
...
...
paddle/fluid/platform/cpu_helper.cc
浏览文件 @
6e66fadb
...
@@ -30,6 +30,7 @@ namespace platform {
...
@@ -30,6 +30,7 @@ namespace platform {
void
SetNumThreads
(
int
num_threads
)
{
void
SetNumThreads
(
int
num_threads
)
{
#ifdef PADDLE_USE_OPENBLAS
#ifdef PADDLE_USE_OPENBLAS
// windows has no support for openblas multi-thread
// windows has no support for openblas multi-thread
// please refer to: https://github.com/PaddlePaddle/Paddle/issues/7234
#ifdef _WIN32
#ifdef _WIN32
if
(
num_threads
>
1
)
{
if
(
num_threads
>
1
)
{
num_threads
=
1
;
num_threads
=
1
;
...
...
paddle/fluid/platform/dynload/cudnn.h
浏览文件 @
6e66fadb
...
@@ -13,8 +13,6 @@ See the License for the specific language governing permissions and
...
@@ -13,8 +13,6 @@ See the License for the specific language governing permissions and
limitations under the License. */
limitations under the License. */
#pragma once
#pragma once
#define GLOG_NO_ABBREVIATED_SEVERITIES
#define GOOGLE_GLOG_DLL_DECL
#include <glog/logging.h>
#include <glog/logging.h>
#include <cudnn.h>
#include <cudnn.h>
...
...
paddle/fluid/platform/enforce.h
浏览文件 @
6e66fadb
...
@@ -18,12 +18,6 @@ limitations under the License. */
...
@@ -18,12 +18,6 @@ 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
#define GOOGLE_GLOG_DLL_DECL
#endif
#ifdef PADDLE_WITH_CUDA
#ifdef PADDLE_WITH_CUDA
#include <cublas_v2.h>
#include <cublas_v2.h>
#include <cudnn.h>
#include <cudnn.h>
...
...
paddle/fluid/platform/init.h
浏览文件 @
6e66fadb
...
@@ -16,9 +16,6 @@ limitations under the License. */
...
@@ -16,9 +16,6 @@ limitations under the License. */
#include <string>
#include <string>
#include <vector>
#include <vector>
#define GLOG_NO_ABBREVIATED_SEVERITIES
#define GOOGLE_GLOG_DLL_DECL
#include "gflags/gflags.h"
#include "gflags/gflags.h"
#include "glog/logging.h"
#include "glog/logging.h"
...
...
paddle/fluid/platform/port.h
浏览文件 @
6e66fadb
...
@@ -31,6 +31,10 @@
...
@@ -31,6 +31,10 @@
#include <sys/time.h>
#include <sys/time.h>
#include <algorithm> // std::accumulate
#include <algorithm> // std::accumulate
#else
#else
#define NOMINMAX // msvc max/min macro conflict with std::min/max
// solve static linking error in windows
// https://github.com/google/glog/issues/301
#define GOOGLE_GLOG_DLL_DECL
#include <io.h> // _popen, _pclose
#include <io.h> // _popen, _pclose
#include <stdio.h>
#include <stdio.h>
#include <windows.h>
#include <windows.h>
...
...
paddle/fluid/platform/profiler.cc
浏览文件 @
6e66fadb
...
@@ -438,10 +438,10 @@ void ParseEvents(const std::vector<std::vector<Event>>& events,
...
@@ -438,10 +438,10 @@ void ParseEvents(const std::vector<std::vector<Event>>& events,
event_items
[
index
].
total_time
+=
event_time
;
event_items
[
index
].
total_time
+=
event_time
;
// min time
// min time
event_items
[
index
].
min_time
=
event_items
[
index
].
min_time
=
(
std
::
min
)
(
event_time
,
event_items
[
index
].
min_time
);
std
::
min
(
event_time
,
event_items
[
index
].
min_time
);
// max time
// max time
event_items
[
index
].
max_time
=
event_items
[
index
].
max_time
=
(
std
::
max
)
(
event_time
,
event_items
[
index
].
max_time
);
std
::
max
(
event_time
,
event_items
[
index
].
max_time
);
}
}
// remove the push marker from the list
// remove the push marker from the list
...
...
paddle/fluid/pybind/pybind.cc
浏览文件 @
6e66fadb
...
@@ -21,13 +21,6 @@ limitations under the License. */
...
@@ -21,13 +21,6 @@ limitations under the License. */
#include <utility>
#include <utility>
#include <vector>
#include <vector>
#if defined(_WIN32)
#define NOMINMAX
#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#define GOOGLE_GLOG_DLL_DECL
#include <Windows.h>
#endif
#include "paddle/fluid/framework/executor.h"
#include "paddle/fluid/framework/executor.h"
#include "paddle/fluid/framework/feed_fetch_method.h"
#include "paddle/fluid/framework/feed_fetch_method.h"
#include "paddle/fluid/framework/framework.pb.h"
#include "paddle/fluid/framework/framework.pb.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录