Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
e2023409
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看板
未验证
提交
e2023409
编写于
3月 01, 2021
作者:
W
Wilber
提交者:
GitHub
3月 01, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix xpu compile and cipher symbol problem. (#31271)
上级
30858d89
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
25 addition
and
11 deletion
+25
-11
cmake/external/xpu.cmake
cmake/external/xpu.cmake
+2
-2
cmake/third_party.cmake
cmake/third_party.cmake
+1
-0
paddle/fluid/framework/io/crypto/cipher.cc
paddle/fluid/framework/io/crypto/cipher.cc
+0
-5
paddle/fluid/inference/api/CMakeLists.txt
paddle/fluid/inference/api/CMakeLists.txt
+7
-2
paddle/fluid/inference/api/api.cc
paddle/fluid/inference/api/api.cc
+6
-0
paddle/fluid/inference/api/api_tester.cc
paddle/fluid/inference/api/api_tester.cc
+5
-0
paddle/fluid/inference/api/demo_ci/CMakeLists.txt
paddle/fluid/inference/api/demo_ci/CMakeLists.txt
+4
-2
未找到文件。
cmake/external/xpu.cmake
浏览文件 @
e2023409
...
...
@@ -4,6 +4,8 @@ endif()
INCLUDE
(
ExternalProject
)
SET
(
XPU_PROJECT
"extern_xpu"
)
SET
(
XPU_API_LIB_NAME
"libxpuapi.so"
)
SET
(
XPU_RT_LIB_NAME
"libxpurt.so"
)
if
(
NOT XPU_SDK_ROOT
)
if
(
WITH_AARCH64
)
...
...
@@ -20,8 +22,6 @@ if(NOT XPU_SDK_ROOT)
SET
(
XPU_API_INC_DIR
"
${
THIRD_PARTY_PATH
}
/install/xpu/include"
)
SET
(
XPU_LIB_DIR
"
${
THIRD_PARTY_PATH
}
/install/xpu/lib"
)
SET
(
XPU_API_LIB_NAME
"libxpuapi.so"
)
SET
(
XPU_RT_LIB_NAME
"libxpurt.so"
)
SET
(
XPU_API_LIB
"
${
XPU_LIB_DIR
}
/
${
XPU_API_LIB_NAME
}
"
)
SET
(
XPU_RT_LIB
"
${
XPU_LIB_DIR
}
/
${
XPU_RT_LIB_NAME
}
"
)
...
...
cmake/third_party.cmake
浏览文件 @
e2023409
...
...
@@ -317,6 +317,7 @@ endif (WITH_LITE)
if
(
WITH_CRYPTO
)
include
(
external/cryptopp
)
# download, build, install cryptopp
add_definitions
(
-DPADDLE_WITH_CRYPTO
)
endif
(
WITH_CRYPTO
)
add_custom_target
(
third_party ALL DEPENDS
${
third_party_deps
}
)
paddle/fluid/framework/io/crypto/cipher.cc
浏览文件 @
e2023409
...
...
@@ -57,9 +57,4 @@ std::shared_ptr<Cipher> CipherFactory::CreateCipher(
}
}
// namespace framework
std
::
shared_ptr
<
framework
::
Cipher
>
MakeCipher
(
const
std
::
string
&
config_file
)
{
return
framework
::
CipherFactory
::
CreateCipher
(
config_file
);
}
}
// namespace paddle
paddle/fluid/inference/api/CMakeLists.txt
浏览文件 @
e2023409
...
...
@@ -30,8 +30,13 @@ endif()
cc_library
(
analysis_config SRCS analysis_config.cc DEPS
${
mkldnn_quantizer_cfg
}
lod_tensor paddle_pass_builder
)
cc_library
(
paddle_pass_builder SRCS paddle_pass_builder.cc
)
cc_library
(
paddle_inference_api SRCS api.cc api_impl.cc helper.cc DEPS lod_tensor scope reset_tensor_array
if
(
WITH_CRYPTO
)
cc_library
(
paddle_inference_api SRCS api.cc api_impl.cc helper.cc DEPS lod_tensor scope reset_tensor_array
analysis_config zero_copy_tensor trainer_desc_proto paddle_crypto
)
else
()
cc_library
(
paddle_inference_api SRCS api.cc api_impl.cc helper.cc DEPS lod_tensor scope reset_tensor_array
analysis_config zero_copy_tensor trainer_desc_proto
)
endif
()
if
(
WIN32
)
target_link_libraries
(
paddle_inference_api gflags
)
...
...
paddle/fluid/inference/api/api.cc
浏览文件 @
e2023409
...
...
@@ -146,4 +146,10 @@ std::string UpdateDllFlag(const char *name, const char *value) {
return
ret
;
}
#ifdef PADDLE_WITH_CRYPTO
std
::
shared_ptr
<
framework
::
Cipher
>
MakeCipher
(
const
std
::
string
&
config_file
)
{
return
framework
::
CipherFactory
::
CreateCipher
(
config_file
);
}
#endif
}
// namespace paddle
paddle/fluid/inference/api/api_tester.cc
浏览文件 @
e2023409
...
...
@@ -94,4 +94,9 @@ TEST(paddle_inference_api, AnalysisConfigCopyCtor) {
CHECK_NE
(
ps
,
delete_pass
);
}
}
#ifdef PADDLE_WITH_CRYPTO
TEST
(
paddle_inference_api
,
crypto
)
{
paddle
::
MakeCipher
(
""
);
}
#endif
}
// namespace paddle
paddle/fluid/inference/api/demo_ci/CMakeLists.txt
浏览文件 @
e2023409
...
...
@@ -36,11 +36,13 @@ include_directories("${PADDLE_LIB_THIRD_PARTY_PATH}protobuf/include")
include_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
glog/include"
)
include_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
gflags/include"
)
include_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
xxhash/include"
)
include_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
cryptopp/include"
)
link_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
protobuf/lib"
)
link_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
glog/lib"
)
link_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
gflags/lib"
)
link_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
xxhash/lib"
)
link_directories
(
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
cryptopp/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/paddle/lib"
)
if
(
WIN32
)
...
...
@@ -145,12 +147,12 @@ if (NOT WIN32)
set
(
EXTERNAL_LIB
"-lrt -ldl -lpthread"
)
set
(
DEPS
${
DEPS
}
${
MATH_LIB
}
${
MKLDNN_LIB
}
glog gflags protobuf
xxhash
glog gflags protobuf
xxhash cryptopp
${
EXTERNAL_LIB
}
)
else
()
set
(
DEPS
${
DEPS
}
${
MATH_LIB
}
${
MKLDNN_LIB
}
glog gflags_static libprotobuf
xxhash
${
EXTERNAL_LIB
}
)
glog gflags_static libprotobuf
xxhash cryptopp-static
${
EXTERNAL_LIB
}
)
set
(
DEPS
${
DEPS
}
shlwapi.lib
)
endif
(
NOT WIN32
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录