Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
coolalex776
Paddle
提交
29843e61
P
Paddle
项目概览
coolalex776
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
0
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录