Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
b78394ea
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b78394ea
编写于
8月 29, 2018
作者:
D
dzhwinter
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
done
上级
b74af56b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
38 addition
and
11 deletion
+38
-11
cmake/cuda.cmake
cmake/cuda.cmake
+8
-0
cmake/flags.cmake
cmake/flags.cmake
+1
-1
cmake/generic.cmake
cmake/generic.cmake
+15
-0
cmake/version.cmake
cmake/version.cmake
+1
-1
paddle/fluid/inference/CMakeLists.txt
paddle/fluid/inference/CMakeLists.txt
+6
-2
paddle/fluid/platform/dynload/cudnn.h
paddle/fluid/platform/dynload/cudnn.h
+6
-6
paddle/fluid/platform/enforce.h
paddle/fluid/platform/enforce.h
+1
-1
未找到文件。
cmake/cuda.cmake
浏览文件 @
b78394ea
...
...
@@ -177,6 +177,7 @@ list(APPEND CUDA_NVCC_FLAGS "-w")
# Set :expt-relaxed-constexpr to suppress Eigen warnings
list
(
APPEND CUDA_NVCC_FLAGS
"--expt-relaxed-constexpr"
)
if
(
NOT WIN32
)
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
list
(
APPEND CUDA_NVCC_FLAGS
${
CMAKE_CXX_FLAGS_DEBUG
}
)
elseif
(
CMAKE_BUILD_TYPE STREQUAL
"Release"
)
...
...
@@ -187,6 +188,13 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
# nvcc 9 does not support -Os. Use Release flags instead
list
(
APPEND CUDA_NVCC_FLAGS
${
CMAKE_CXX_FLAGS_RELEASE
}
)
endif
()
else
(
NOT WIN32
)
if
(
CMAKE_BUILD_TYPE STREQUAL
"Release"
)
list
(
APPEND CUDA_NVCC_FLAGS
"-O3 -DNDEBUG"
)
else
()
message
(
FATAL
"Windows only support Release build now. Please set visual studio build type to Release, x64 build."
)
endif
()
endif
(
NOT WIN32
)
mark_as_advanced
(
CUDA_BUILD_CUBIN CUDA_BUILD_EMULATION CUDA_VERBOSE_BUILD
)
mark_as_advanced
(
CUDA_SDK_ROOT_DIR CUDA_SEPARABLE_COMPILATION
)
cmake/flags.cmake
浏览文件 @
b78394ea
...
...
@@ -136,7 +136,7 @@ else(NOT WIN32)
set
(
COMMON_FLAGS
"/w"
)
#disable all warnings
set
(
GPU_COMMON_FLAGS
"/w"
)
#disable all warnings
/w
)
#disable all warnings
endif
(
NOT WIN32
)
...
...
cmake/generic.cmake
浏览文件 @
b78394ea
...
...
@@ -110,6 +110,20 @@ function(find_fluid_modules TARGET_NAME)
endif
()
endfunction
(
find_fluid_modules
)
# find all third_party modules is used for paddle static library
# for reduce the dependency when building the inference libs.
set_property
(
GLOBAL PROPERTY FLUID_THIRD_PARTY
)
function
(
find_fluid_third_partys TARGET_NAME
)
get_filename_component
(
__target_path
${
TARGET_NAME
}
ABSOLUTE
)
string
(
REGEX REPLACE
"^
${
PADDLE_SOURCE_DIR
}
/"
""
__target_path
${
__target_path
}
)
string
(
FIND
"
${
__target_path
}
"
"third_party"
pos
)
if
(
pos GREATER 1
)
get_property
(
fluid_ GLOBAL PROPERTY FLUID_THIRD_PARTY
)
set
(
fluid_third_partys
${
fluid_third_partys
}
${
TARGET_NAME
}
)
set_property
(
GLOBAL PROPERTY FLUID_THIRD_PARTY
"
${
fluid_third_partys
}
"
)
endif
()
endfunction
(
find_fluid_third_partys
)
function
(
merge_static_libs TARGET_NAME
)
set
(
libs
${
ARGN
}
)
list
(
REMOVE_DUPLICATES libs
)
...
...
@@ -250,6 +264,7 @@ function(cc_library TARGET_NAME)
endif
()
target_link_libraries
(
${
TARGET_NAME
}
${
cc_library_DEPS
}
)
add_dependencies
(
${
TARGET_NAME
}
${
cc_library_DEPS
}
)
find_fluid_third_partys
(
${
cc_library_DEPS
}
)
endif
()
# cpplint code style
...
...
cmake/version.cmake
浏览文件 @
b78394ea
...
...
@@ -44,5 +44,5 @@ while ("${PADDLE_VERSION}" STREQUAL "")
endif
()
endwhile
()
add_definitions
(
-DPADDLE_VERSION=
${
PADDLE_VERSION
}
)
add_definitions
(
-DPADDLE_VERSION=
"
${
PADDLE_VERSION
}
"
)
message
(
STATUS
"Paddle version is
${
PADDLE_VERSION
}
"
)
paddle/fluid/inference/CMakeLists.txt
浏览文件 @
b78394ea
...
...
@@ -13,6 +13,10 @@ cc_library(paddle_fluid_api
DEPS
${
FLUID_CORE_MODULES
}
${
GLOB_OP_LIB
}
)
get_property
(
fluid_modules GLOBAL PROPERTY FLUID_MODULES
)
get_property
(
fluid_third_partys GLOBAL PROPERTY FLUID_THRID_PARTYS
)
if
(
WIN32
)
list
(
APPEND fluid_third_partys gflags glog protobuf cblas
)
endif
(
WIN32
)
# paddle_fluid_origin exclude inference api interface
cc_library
(
paddle_fluid_origin DEPS
${
fluid_modules
}
paddle_fluid_api
)
...
...
@@ -22,8 +26,8 @@ if(NOT APPLE)
endif
()
# Create static library
message
(
"messages "
${
fluid_modules
}
)
cc_library
(
paddle_fluid DEPS
${
fluid_modules
}
paddle_fluid_api paddle_inference_api
)
cc_library
(
paddle_fluid DEPS
${
fluid_modules
}
${
fluid_third_partys
}
paddle_fluid_api paddle_inference_api
)
if
(
NOT APPLE
)
# TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
set
(
LINK_FLAGS
"-Wl,--retain-symbols-file
${
CMAKE_CURRENT_SOURCE_DIR
}
/paddle_fluid.sym"
)
...
...
paddle/fluid/platform/dynload/cudnn.h
浏览文件 @
b78394ea
...
...
@@ -48,12 +48,12 @@ extern void EnforceCUDNNLoaded(const char* fn_name);
#else
#define DECLARE_DYNAMIC_LOAD_CUDNN_WRAP(__name) \
struct DynLoad__##__name {
\
template <typename... Args>
\
auto operator()(Args... args) -> decltype(__name(args...)
) { \
return __name(args...);
\
}
\
};
\
struct DynLoad__##__name { \
template <typename... Args> \
inline cudnnStatus_t operator()(Args... args
) { \
return __name(args...); \
} \
}; \
extern DynLoad__##__name __name
#endif
...
...
paddle/fluid/platform/enforce.h
浏览文件 @
b78394ea
...
...
@@ -216,7 +216,7 @@ inline typename std::enable_if<sizeof...(Args) != 0, void>::type throw_on_error(
#endif
}
#if !defined(__APPLE__)
and
!defined(_WIN32)
#if !defined(__APPLE__)
&&
!defined(_WIN32)
template
<
typename
...
Args
>
inline
typename
std
::
enable_if
<
sizeof
...(
Args
)
!=
0
,
void
>::
type
throw_on_error
(
ncclResult_t
stat
,
const
Args
&
...
args
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录