Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
0b2aec14
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看板
提交
0b2aec14
编写于
4月 03, 2019
作者:
C
Chen Weihang
提交者:
Chen Weihang
4月 03, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Model data cryption link all lib (#16555)"
test=develop This reverts commit
c38c7c56
.
上级
1c526e1d
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
0 addition
and
210 deletion
+0
-210
CMakeLists.txt
CMakeLists.txt
+0
-2
cmake/configure.cmake
cmake/configure.cmake
+0
-4
cmake/external/wbaes.cmake
cmake/external/wbaes.cmake
+0
-71
cmake/generic.cmake
cmake/generic.cmake
+0
-8
cmake/inference_lib.cmake
cmake/inference_lib.cmake
+0
-8
paddle/fluid/platform/dynload/CMakeLists.txt
paddle/fluid/platform/dynload/CMakeLists.txt
+0
-3
paddle/fluid/platform/dynload/dynamic_loader.cc
paddle/fluid/platform/dynload/dynamic_loader.cc
+0
-12
paddle/fluid/platform/dynload/dynamic_loader.h
paddle/fluid/platform/dynload/dynamic_loader.h
+0
-1
paddle/fluid/platform/dynload/wbaes.cc
paddle/fluid/platform/dynload/wbaes.cc
+0
-34
paddle/fluid/platform/dynload/wbaes.h
paddle/fluid/platform/dynload/wbaes.h
+0
-63
python/setup.py.in
python/setup.py.in
+0
-4
未找到文件。
CMakeLists.txt
浏览文件 @
0b2aec14
...
...
@@ -75,7 +75,6 @@ option(WITH_INFERENCE_API_TEST "Test fluid inference high-level api interface"
option
(
WITH_SYSTEM_BLAS
"Use system blas library"
OFF
)
option
(
PY_VERSION
"Compile PaddlePaddle with python3 support"
${
PY_VERSION
}
)
option
(
WITH_FAST_MATH
"Make use of fast math library, might affect the precision to some extent"
ON
)
option
(
WITH_WBAES
"Compile PaddlePaddle with WBAES support"
ON
)
# PY_VERSION
if
(
NOT PY_VERSION
)
...
...
@@ -149,7 +148,6 @@ include(external/dlpack)
include
(
external/snappy
)
# download snappy
include
(
external/snappystream
)
# download snappystream
include
(
external/warpctc
)
# download, build, install warpctc
include
(
external/wbaes
)
# download wbaes
if
(
NOT WIN32
)
# there is no official support of nccl, cupti in windows
...
...
cmake/configure.cmake
浏览文件 @
0b2aec14
...
...
@@ -157,7 +157,3 @@ endif(WITH_BRPC_RDMA)
if
(
ON_INFER
)
add_definitions
(
-DPADDLE_ON_INFERENCE
)
endif
(
ON_INFER
)
if
(
WITH_WBAES
)
add_definitions
(
-DPADDLE_WITH_WBAES
)
endif
(
WITH_WBAES
)
cmake/external/wbaes.cmake
已删除
100644 → 0
浏览文件 @
1c526e1d
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
IF
(
NOT
${
WITH_WBAES
}
)
return
()
ENDIF
(
NOT
${
WITH_WBAES
}
)
INCLUDE
(
ExternalProject
)
SET
(
WBAES_DST_DIR
"wbaes"
)
SET
(
WBAES_INSTALL_ROOT
"
${
THIRD_PARTY_PATH
}
/install"
)
SET
(
WBAES_INSTALL_DIR
${
WBAES_INSTALL_ROOT
}
/
${
WBAES_DST_DIR
}
)
SET
(
WBAES_ROOT
${
WBAES_INSTALL_DIR
}
)
SET
(
WBAES_INC_DIR
${
WBAES_ROOT
}
/include
)
SET
(
WBAES_LIB_DIR
${
WBAES_ROOT
}
/lib
)
SET
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_RPATH
}
"
"
${
WBAES_ROOT
}
/lib"
)
SET
(
CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE
)
IF
(
APPLE
)
SET
(
WBAES_TAG
"v1.0.0"
CACHE STRING
""
FORCE
)
SET
(
WBAES_URL
"http://paddlepaddledeps.bj.bcebos.com/wbaes-sdk.mac.
${
WBAES_TAG
}
.tgz"
CACHE STRING
""
FORCE
)
SET
(
WBAES_LIB
${
WBAES_LIB_DIR
}
/libwbaes.dylib
)
SET
(
WBAES_SHARED_LIB
${
WBAES_LIB_DIR
}
/libwbaes.dylib
)
ELSEIF
(
WIN32
)
SET
(
WBAES_TAG
"v1.0.0"
CACHE STRING
""
FORCE
)
SET
(
WBAES_URL
"http://paddlepaddledeps.bj.bcebos.com/wbaes-sdk.windows-x64.
${
WBAES_TAG
}
.tgz"
CACHE STRING
""
FORCE
)
SET
(
WBAES_LIB
${
WBAES_LIB_DIR
}
/libwbaes.lib
)
SET
(
WBAES_SHARED_LIB
${
WBAES_LIB_DIR
}
/libwbaes.dll
)
ELSE
()
SET
(
WBAES_TAG
"v1.0.2"
CACHE STRING
""
FORCE
)
SET
(
WBAES_URL
"http://paddlepaddledeps.bj.bcebos.com/wbaes-sdk.linux-x86_64.
${
WBAES_TAG
}
.tgz"
CACHE STRING
""
FORCE
)
SET
(
WBAES_LIB
${
WBAES_LIB_DIR
}
/libwbaes.so
)
SET
(
WBAES_SHARED_LIB
${
WBAES_LIB_DIR
}
/libwbaes.so
)
ENDIF
()
SET
(
WBAES_PROJECT
"extern_wbaes"
)
MESSAGE
(
STATUS
"WBAES_URL:
${
WBAES_URL
}
, WBAES_LIB:
${
WBAES_LIB
}
"
)
SET
(
WBAES_SOURCE_DIR
"
${
THIRD_PARTY_PATH
}
/wbaes"
)
SET
(
WBAES_DOWNLOAD_DIR
"
${
WBAES_SOURCE_DIR
}
/src/
${
WBAES_PROJECT
}
"
)
ExternalProject_Add
(
${
WBAES_PROJECT
}
${
EXTERNAL_PROJECT_LOG_ARGS
}
PREFIX
${
WBAES_SOURCE_DIR
}
URL
${
WBAES_URL
}
DOWNLOAD_DIR
${
WBAES_DOWNLOAD_DIR
}
DOWNLOAD_NO_PROGRESS 1
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
INSTALL_COMMAND
""
${
CMAKE_COMMAND
}
-E copy_directory
${
WBAES_DOWNLOAD_DIR
}
/include
${
WBAES_INC_DIR
}
&&
${
CMAKE_COMMAND
}
-E copy_directory
${
WBAES_DOWNLOAD_DIR
}
/lib
${
WBAES_LIB_DIR
}
)
INCLUDE_DIRECTORIES
(
${
WBAES_INC_DIR
}
)
ADD_LIBRARY
(
wbaes SHARED IMPORTED GLOBAL
)
SET_PROPERTY
(
TARGET wbaes PROPERTY IMPORTED_LOCATION
${
WBAES_LIB
}
)
SET_PROPERTY
(
TARGET wbaes PROPERTY IMPORTED_NO_SONAME 1
)
ADD_DEPENDENCIES
(
wbaes
${
WBAES_PROJECT
}
)
cmake/generic.cmake
浏览文件 @
0b2aec14
...
...
@@ -264,14 +264,6 @@ function(cc_library TARGET_NAME)
list
(
REMOVE_ITEM cc_library_DEPS warpctc
)
add_dependencies
(
${
TARGET_NAME
}
warpctc
)
endif
()
# Only deps libwbaes.so, not link
if
(
"
${
cc_library_DEPS
}
;"
MATCHES
"wbaes;"
)
list
(
REMOVE_ITEM cc_library_DEPS wbaes
)
if
(
NOT
"
${
TARGET_NAME
}
"
MATCHES
"dynload_wbaes"
)
list
(
APPEND cc_library_DEPS dynload_wbaes
)
endif
()
add_dependencies
(
${
TARGET_NAME
}
wbaes
)
endif
()
# Only deps libmklml.so, not link
if
(
"
${
cc_library_DEPS
}
;"
MATCHES
"mklml;"
)
list
(
REMOVE_ITEM cc_library_DEPS mklml
)
...
...
cmake/inference_lib.cmake
浏览文件 @
0b2aec14
...
...
@@ -170,14 +170,6 @@ copy(snappystream_lib
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
DEPS snappystream
)
if
(
WITH_WBAES
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/wbaes"
)
copy
(
wbaes_lib
SRCS
${
WBAES_INC_DIR
}
${
WBAES_LIB
}
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
DEPS wbaes
)
endif
()
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/zlib"
)
copy
(
zlib_lib
SRCS
${
ZLIB_INCLUDE_DIR
}
${
ZLIB_LIBRARIES
}
...
...
paddle/fluid/platform/dynload/CMakeLists.txt
浏览文件 @
0b2aec14
...
...
@@ -17,9 +17,6 @@ if (CUPTI_FOUND)
endif
(
CUPTI_FOUND
)
nv_library
(
dynload_cuda SRCS
${
CUDA_SRCS
}
DEPS dynamic_loader
)
cc_library
(
dynload_warpctc SRCS warpctc.cc DEPS dynamic_loader warpctc
)
if
(
WITH_WBAES
)
cc_library
(
dynload_wbaes SRCS wbaes.cc DEPS dynamic_loader wbaes
)
endif
()
if
(
WITH_MKLML
)
cc_library
(
dynload_mklml SRCS mklml.cc DEPS dynamic_loader mklml
)
endif
()
...
...
paddle/fluid/platform/dynload/dynamic_loader.cc
浏览文件 @
0b2aec14
...
...
@@ -48,8 +48,6 @@ DEFINE_string(
DEFINE_string
(
mklml_dir
,
""
,
"Specify path for loading libmklml_intel.so."
);
DEFINE_string
(
wbaes_dir
,
""
,
"Specify path for loading libwbaes.so."
);
namespace
paddle
{
namespace
platform
{
namespace
dynload
{
...
...
@@ -248,16 +246,6 @@ void* GetMKLMLDsoHandle() {
#endif
}
void
*
GetWBAESDsoHandle
()
{
#if defined(__APPLE__) || defined(__OSX__)
return
GetDsoHandleFromSearchPath
(
FLAGS_wbaes_dir
,
"libwbaes.dylib"
);
#elif defined(_WIN32)
return
GetDsoHandleFromSearchPath
(
FLAGS_wbaes_dir
,
"libwbaes.dll"
);
#else
return
GetDsoHandleFromSearchPath
(
FLAGS_wbaes_dir
,
"libwbaes.so"
);
#endif
}
}
// namespace dynload
}
// namespace platform
}
// namespace paddle
paddle/fluid/platform/dynload/dynamic_loader.h
浏览文件 @
0b2aec14
...
...
@@ -32,7 +32,6 @@ void* GetWarpCTCDsoHandle();
void
*
GetNCCLDsoHandle
();
void
*
GetTensorRtDsoHandle
();
void
*
GetMKLMLDsoHandle
();
void
*
GetWBAESDsoHandle
();
}
// namespace dynload
}
// namespace platform
...
...
paddle/fluid/platform/dynload/wbaes.cc
已删除
100644 → 0
浏览文件 @
1c526e1d
/* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef PADDLE_WITH_WBAES
#include "paddle/fluid/platform/dynload/wbaes.h"
namespace
paddle
{
namespace
platform
{
namespace
dynload
{
std
::
once_flag
wbaes_dso_flag
;
void
*
wbaes_dso_handle
=
nullptr
;
#define DEFINE_WRAP(__name) DynLoad__##__name __name
WBAES_ROUTINE_EACH
(
DEFINE_WRAP
);
}
// namespace dynload
}
// namespace platform
}
// namespace paddle
#endif
paddle/fluid/platform/dynload/wbaes.h
已删除
100644 → 0
浏览文件 @
1c526e1d
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#pragma once
#ifdef PADDLE_WITH_WBAES
#include <WBAESLib.h>
#include <mutex> // NOLINT
#include "paddle/fluid/platform/dynload/dynamic_loader.h"
#include "paddle/fluid/platform/port.h"
namespace
paddle
{
namespace
platform
{
namespace
dynload
{
extern
std
::
once_flag
wbaes_dso_flag
;
extern
void
*
wbaes_dso_handle
;
/**
* The following macro definition can generate structs
* (for each function) to dynamic load wbaes routine
* via operator overloading.
*/
#define DYNAMIC_LOAD_WBAES_WRAP(__name) \
struct DynLoad__##__name { \
template <typename... Args> \
auto operator()(Args... args) -> DECLARE_TYPE(__name, args...) { \
using wbaesFunc = decltype(&::__name); \
std::call_once(wbaes_dso_flag, []() { \
wbaes_dso_handle = paddle::platform::dynload::GetWBAESDsoHandle(); \
}); \
static void *p_##__name = dlsym(wbaes_dso_handle, #__name); \
return reinterpret_cast<wbaesFunc>(p_##__name)(args...); \
} \
}; \
extern DynLoad__##__name __name
#define DECLARE_DYNAMIC_LOAD_WBAES_WRAP(__name) DYNAMIC_LOAD_WBAES_WRAP(__name)
#define WBAES_ROUTINE_EACH(__macro) __macro(GSECF);
WBAES_ROUTINE_EACH
(
DECLARE_DYNAMIC_LOAD_WBAES_WRAP
);
#undef DYNAMIC_LOAD_WBAES_WRAP
}
// namespace dynload
}
// namespace platform
}
// namespace paddle
#endif
python/setup.py.in
浏览文件 @
0b2aec14
...
...
@@ -157,10 +157,6 @@ package_data['paddle.libs']= []
package_data['paddle.libs']=[('libwarpctc' if os.name != 'nt' else 'warpctc') + ext_name]
shutil.copy('${WARPCTC_LIBRARIES}', libs_path)
if '${WITH_WBAES}' == 'ON':
package_data['paddle.libs'] += ['libwbaes' + ext_name]
shutil.copy('${WBAES_SHARED_LIB}', libs_path)
if '${WITH_MKL}' == 'ON':
shutil.copy('${MKLML_SHARED_LIB}', libs_path)
shutil.copy('${MKLML_SHARED_IOMP_LIB}', libs_path)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录