Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
29843e61
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
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看板
提交
29843e61
编写于
5月 26, 2020
作者:
Y
yangqingyou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add cmake option flag DWITH_CRYPTO, test=develop
上级
aabb0651
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
27 addition
and
10 deletion
+27
-10
CMakeLists.txt
CMakeLists.txt
+1
-0
cmake/third_party.cmake
cmake/third_party.cmake
+5
-2
paddle/fluid/framework/io/CMakeLists.txt
paddle/fluid/framework/io/CMakeLists.txt
+3
-1
paddle/fluid/framework/io/crypto/CMakeLists.txt
paddle/fluid/framework/io/crypto/CMakeLists.txt
+3
-3
paddle/fluid/framework/io/crypto/aes_cipher.cc
paddle/fluid/framework/io/crypto/aes_cipher.cc
+3
-0
paddle/fluid/framework/io/crypto/aes_cipher.h
paddle/fluid/framework/io/crypto/aes_cipher.h
+11
-4
paddle/fluid/framework/io/crypto/aes_cipher_test.cc
paddle/fluid/framework/io/crypto/aes_cipher_test.cc
+1
-0
未找到文件。
CMakeLists.txt
浏览文件 @
29843e61
...
...
@@ -88,6 +88,7 @@ option(WITH_DGC "Use DGC(Deep Gradient Compression) or not" ${WITH_DISTRIBUTE}
option
(
SANITIZER_TYPE
"Choose the type of sanitizer, options are: Address, Leak, Memory, Thread, Undefined"
OFF
)
option
(
WITH_LITE
"Compile Paddle Fluid with Lite Engine"
OFF
)
option
(
WITH_NCCL
"Compile PaddlePaddle with NCCL support"
ON
)
option
(
WITH_CRYPTO
"Compile PaddlePaddle with paddle_crypto lib"
ON
)
# PY_VERSION
if
(
NOT PY_VERSION
)
...
...
cmake/third_party.cmake
浏览文件 @
29843e61
...
...
@@ -205,10 +205,9 @@ include(external/threadpool)# download threadpool
include
(
external/dlpack
)
# download dlpack
include
(
external/xxhash
)
# download, build, install xxhash
include
(
external/warpctc
)
# download, build, install warpctc
include
(
external/cryptopp
)
# download, build, install cryptopp
list
(
APPEND third_party_deps extern_eigen3 extern_gflags extern_glog extern_boost extern_xxhash
)
list
(
APPEND third_party_deps extern_zlib extern_dlpack extern_warpctc extern_threadpool
extern_cryptopp
)
list
(
APPEND third_party_deps extern_zlib extern_dlpack extern_warpctc extern_threadpool
)
# download file
set
(
CUDAERROR_URL
"http://paddlepaddledeps.bj.bcebos.com/cudaErrorMessage.tar.gz"
CACHE STRING
""
FORCE
)
...
...
@@ -306,4 +305,8 @@ if (WITH_LITE)
include
(
external/lite
)
endif
(
WITH_LITE
)
if
(
WITH_CRYPTO
)
include
(
external/cryptopp
)
# download, build, install cryptopp
endif
(
WITH_CRYPTO
)
add_custom_target
(
third_party ALL DEPENDS
${
third_party_deps
}
)
paddle/fluid/framework/io/CMakeLists.txt
浏览文件 @
29843e61
...
...
@@ -2,4 +2,6 @@ cc_library(fs SRCS fs.cc DEPS string_helper glog boost)
cc_library
(
shell SRCS shell.cc DEPS string_helper glog timer enforce
)
cc_test
(
test_fs SRCS test_fs.cc DEPS fs shell
)
add_subdirectory
(
crypto
)
if
(
WITH_CRYPTO
)
add_subdirectory
(
crypto
)
endif
(
WITH_CRYPTO
)
paddle/fluid/framework/io/crypto/CMakeLists.txt
浏览文件 @
29843e61
cc_library
(
paddle_c
iphers
SRCS cipher_utils.cc cipher.cc aes_cipher.cc DEPS cryptopp enforce
)
cc_test
(
aes_cipher_test SRCS aes_cipher_test.cc DEPS paddle_c
iphers
)
cc_test
(
cipher_utils_test SRCS cipher_utils_test.cc DEPS paddle_c
iphers
)
cc_library
(
paddle_c
rypto
SRCS cipher_utils.cc cipher.cc aes_cipher.cc DEPS cryptopp enforce
)
cc_test
(
aes_cipher_test SRCS aes_cipher_test.cc DEPS paddle_c
rypto
)
cc_test
(
cipher_utils_test SRCS cipher_utils_test.cc DEPS paddle_c
rypto
)
paddle/fluid/framework/io/crypto/aes_cipher.cc
浏览文件 @
29843e61
...
...
@@ -29,8 +29,11 @@
#include <cryptopp/aes.h>
#include <cryptopp/ccm.h>
#include <cryptopp/cryptlib.h>
#include <cryptopp/filters.h>
#include <cryptopp/gcm.h>
#include <cryptopp/modes.h>
#include <cryptopp/smartptr.h>
#include <set>
#include <string>
...
...
paddle/fluid/framework/io/crypto/aes_cipher.h
浏览文件 @
29843e61
...
...
@@ -27,14 +27,21 @@
#pragma once
#include <cryptopp/cryptlib.h>
#include <cryptopp/filters.h>
#include <cryptopp/smartptr.h>
#include <string>
#include "paddle/fluid/framework/io/crypto/cipher.h"
namespace
CryptoPP
{
class
StreamTransformationFilter
;
class
SymmetricCipher
;
class
AuthenticatedSymmetricCipher
;
class
AuthenticatedDecryptionFilter
;
class
AuthenticatedEncryptionFilter
;
template
<
class
CryptoppCipher
>
class
member_ptr
;
}
// namespace CryptoPP
namespace
paddle
{
namespace
framework
{
...
...
paddle/fluid/framework/io/crypto/aes_cipher_test.cc
浏览文件 @
29843e61
...
...
@@ -14,6 +14,7 @@ limitations under the License. */
#include "paddle/fluid/framework/io/crypto/aes_cipher.h"
#include <cryptopp/cryptlib.h>
#include <glog/logging.h>
#include <gtest/gtest.h>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录