Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
804dd7da
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
804dd7da
编写于
10月 15, 2018
作者:
D
dzhwinter
浏览文件
操作
浏览文件
下载
差异文件
merge conflict. both linux and windows pass.
上级
962061f0
b12f7c23
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
31 addition
and
12 deletion
+31
-12
cmake/cuda.cmake
cmake/cuda.cmake
+4
-1
cmake/external/warpctc.cmake
cmake/external/warpctc.cmake
+4
-3
cmake/flags.cmake
cmake/flags.cmake
+7
-3
cmake/generic.cmake
cmake/generic.cmake
+9
-1
paddle/fluid/framework/ir/node.cc
paddle/fluid/framework/ir/node.cc
+1
-1
paddle/fluid/framework/ir/node.h
paddle/fluid/framework/ir/node.h
+1
-1
paddle/fluid/inference/CMakeLists.txt
paddle/fluid/inference/CMakeLists.txt
+2
-0
paddle/fluid/operators/elementwise_op_function.h
paddle/fluid/operators/elementwise_op_function.h
+2
-2
paddle/fluid/platform/port.h
paddle/fluid/platform/port.h
+1
-0
未找到文件。
cmake/cuda.cmake
浏览文件 @
804dd7da
...
...
@@ -172,6 +172,9 @@ set(CUDA_PROPAGATE_HOST_FLAGS OFF)
if
(
NOT WIN32
)
# windows msvc2015 support c++11 natively.
# -std=c++11 -fPIC not recoginize by msvc
list
(
APPEND CUDA_NVCC_FLAGS
"-std=c++11"
)
list
(
APPEND CUDA_NVCC_FLAGS
"-w"
"-Xcompiler -fPIC"
)
else
(
NOT WIN32
)
list
(
APPEND CUDA_NVCC_FLAGS
"-w"
"-Xcompiler -fPIC"
"-Xcompiler /w"
)
endif
(
NOT WIN32
)
...
...
cmake/external/warpctc.cmake
浏览文件 @
804dd7da
...
...
@@ -34,7 +34,9 @@ IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "App
ELSE
()
SET
(
USE_OMP ON
)
ENDIF
()
message
(
"warpctc"
)
message
(
${
CMAKE_CXX_COMPILER
}
)
message
(
${
CMAKE_CXX_FLAGS
}
)
ExternalProject_Add
(
extern_warpctc
${
EXTERNAL_PROJECT_LOG_ARGS
}
...
...
@@ -43,8 +45,7 @@ ExternalProject_Add(
UPDATE_COMMAND
""
CMAKE_ARGS -DCMAKE_CXX_COMPILER=
${
CMAKE_CXX_COMPILER
}
-DCMAKE_C_COMPILER=
${
CMAKE_C_COMPILER
}
-DCMAKE_CXX_FLAGS=
${
CMAKE_CXX_FLAGS
}
-DCMAKE_C_FLAGS=
${
CMAKE_C_FLAGS
}
-DCMAKE_CXX_FLAGS=
""
-DCMAKE_INSTALL_PREFIX=
${
WARPCTC_INSTALL_DIR
}
-DWITH_GPU=
${
WITH_GPU
}
-DWITH_OMP=
${
USE_OMP
}
...
...
cmake/flags.cmake
浏览文件 @
804dd7da
...
...
@@ -26,6 +26,7 @@ function(CheckCompilerCXX11Flag)
endfunction
()
CheckCompilerCXX11Flag
()
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11"
)
# safe_set_flag
#
...
...
@@ -116,10 +117,8 @@ if (NOT WIN32)
set
(
COMMON_FLAGS
-fPIC
-fno-omit-frame-pointer
-Werror
-Wall
-Wextra
-Wnon-virtual-dtor
-Wdelete-non-virtual-dtor
-Wno-unused-parameter
-Wno-unused-function
...
...
@@ -144,6 +143,12 @@ set(GPU_COMMON_FLAGS
-Wno-error=unused-function
# Warnings in Numpy Header.
-Wno-error=array-bounds
# Warnings in Eigen::array
)
set
(
COMMON_FLAGS
-fPIC
-fno-omit-frame-pointer
)
set
(
GPU_COMMON_FLAGS
-fPIC
-fno-omit-frame-pointer
)
else
(
NOT WIN32
)
set
(
COMMON_FLAGS
...
...
@@ -165,7 +170,6 @@ if(LINUX)
set
(
GPU_COMMON_FLAGS
-Wall
-Wextra
-Werror
${
GPU_COMMON_FLAGS
}
)
endif
(
LINUX
)
...
...
cmake/generic.cmake
浏览文件 @
804dd7da
...
...
@@ -306,7 +306,11 @@ function(cc_test TARGET_NAME)
set
(
multiValueArgs SRCS DEPS ARGS
)
cmake_parse_arguments
(
cc_test
"
${
options
}
"
"
${
oneValueArgs
}
"
"
${
multiValueArgs
}
"
${
ARGN
}
)
add_executable
(
${
TARGET_NAME
}
${
cc_test_SRCS
}
)
if
(
WIN32
)
target_link_libraries
(
${
TARGET_NAME
}
${
cc_test_DEPS
}
paddle_gtest_main lod_tensor memory gtest gflags glog shlwapi openblas
)
else
(
WIN32
)
target_link_libraries
(
${
TARGET_NAME
}
${
cc_test_DEPS
}
paddle_gtest_main lod_tensor memory gtest gflags glog openblas
)
endif
(
WIN32
)
add_dependencies
(
${
TARGET_NAME
}
${
cc_test_DEPS
}
paddle_gtest_main lod_tensor memory gtest gflags glog
)
add_test
(
NAME
${
TARGET_NAME
}
COMMAND
${
TARGET_NAME
}
${
cc_test_ARGS
}
...
...
@@ -376,7 +380,11 @@ function(nv_test TARGET_NAME)
set
(
multiValueArgs SRCS DEPS
)
cmake_parse_arguments
(
nv_test
"
${
options
}
"
"
${
oneValueArgs
}
"
"
${
multiValueArgs
}
"
${
ARGN
}
)
cuda_add_executable
(
${
TARGET_NAME
}
${
nv_test_SRCS
}
)
if
(
WIN32
)
target_link_libraries
(
${
TARGET_NAME
}
${
nv_test_DEPS
}
paddle_gtest_main lod_tensor memory gtest gflags glog shlwapi
)
else
(
WIN32
)
target_link_libraries
(
${
TARGET_NAME
}
${
nv_test_DEPS
}
paddle_gtest_main lod_tensor memory gtest gflags glog
)
endif
(
WIN32
)
add_dependencies
(
${
TARGET_NAME
}
${
nv_test_DEPS
}
paddle_gtest_main lod_tensor memory gtest gflags glog
)
add_test
(
${
TARGET_NAME
}
${
TARGET_NAME
}
)
if
(
nv_test_SERIAL
)
...
...
paddle/fluid/framework/ir/node.cc
浏览文件 @
804dd7da
...
...
@@ -18,7 +18,7 @@ namespace paddle {
namespace
framework
{
namespace
ir
{
char
Node
::
kControlDepVarName
[];
c
onstexpr
c
har
Node
::
kControlDepVarName
[];
int
Node
::
count_
=
0
;
}
// namespace ir
}
// namespace framework
...
...
paddle/fluid/framework/ir/node.h
浏览文件 @
804dd7da
...
...
@@ -27,7 +27,7 @@ namespace ir {
class
Node
{
public:
enum
class
Type
{
kOperation
,
kVariable
};
static
c
har
kControlDepVarName
[]
;
static
c
onstexpr
char
kControlDepVarName
[]
=
"__control_var"
;
explicit
Node
(
const
std
::
string
&
name
,
Type
type
)
:
name_
(
name
),
...
...
paddle/fluid/inference/CMakeLists.txt
浏览文件 @
804dd7da
...
...
@@ -28,6 +28,8 @@ cc_library(paddle_fluid_origin DEPS ${fluid_modules} paddle_fluid_api)
# Create static library
if
(
WIN32
)
cc_library
(
paddle_fluid DEPS
${
fluid_modules
}
${
fluid_third_partys
}
paddle_fluid_api paddle_inference_api
)
else
(
WIND32
)
cc_library
(
paddle_fluid DEPS
${
fluid_modules
}
paddle_fluid_api paddle_inference_api
)
endif
(
WIN32
)
if
(
NOT APPLE
)
# TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
...
...
paddle/fluid/operators/elementwise_op_function.h
浏览文件 @
804dd7da
...
...
@@ -97,8 +97,8 @@ class MidWiseTransformIterator;
// NOTE(dzhwinter): ptrdiff_t in iterator is deperecated in c++17
template
<
typename
T
>
class
RowwiseTransformIterator
<
T
,
platform
::
CPUDeviceContext
>
:
public
std
::
iterator
<
std
::
random_access_iterator_tag
,
typename
T
,
std
::
ptrdiff_t
,
typename
T
*
,
typename
T
&>
{
:
public
std
::
iterator
<
std
::
random_access_iterator_tag
,
T
,
std
::
ptrdiff_t
,
T
*
,
T
&>
{
public:
RowwiseTransformIterator
(
const
T
*
ptr
,
int
n
)
:
ptr_
(
ptr
),
i_
(
0
),
n_
(
n
)
{}
...
...
paddle/fluid/platform/port.h
浏览文件 @
804dd7da
...
...
@@ -18,6 +18,7 @@
#include <stdexcept>
#include <string>
#include <memory> // NOLINT
#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#define GOOGLE_GLOG_DLL_DECL
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录