提交 29c924e4 编写于 作者: J jingqinghe

update

上级 2a9a9568
......@@ -71,17 +71,17 @@ include_directories(${PADDLE_INCLUDE})
include_directories(${PADDLE_INCLUDE}/third_party)
add_subdirectory(privc3)
add_subdirectory(paddle_encrypted/mpc_protocol)
add_subdirectory(paddle_encrypted/operators)
add_subdirectory(paddle_encrypted/data_utils)
add_subdirectory(core/privc3)
add_subdirectory(core/paddlefl_mpc/mpc_protocol)
add_subdirectory(core/paddlefl_mpc/operators)
add_subdirectory(core/paddlefl_mpc/data_utils)
if (WITH_TESTING)
add_subdirectory(testing)
add_subdirectory(core/testing)
endif()
if (WITH_PSI)
add_subdirectory(psi)
add_subdirectory(core/psi)
endif()
add_library(fluid_framework SHARED IMPORTED GLOBAL)
......@@ -99,7 +99,7 @@ target_link_libraries(paddle_enc hiredis)
set(CMAKE_SKIP_INSTALL_RPATH TRUE)
set(PADDLE_ENCRYPTED_LIB_PATH "${CMAKE_SOURCE_DIR}/python/paddle_encrypted/libs")
set(PADDLE_ENCRYPTED_LIB_PATH "${CMAKE_SOURCE_DIR}/python/paddle_fl/mpc/libs")
install(DIRECTORY "${THIRD_PARTY_PATH}/install/gloo/lib/"
DESTINATION ${PADDLE_ENCRYPTED_LIB_PATH}/third_party)
......
......@@ -21,7 +21,7 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "paddle_encrypted/mpc_protocol/aby3_operators.h"
#include "paddlefl_mpc/mpc_protocol/aby3_operators.h"
#include "privc3/fixedpoint_util.h"
#include "psi/psi_api.h"
......
......@@ -21,10 +21,10 @@
#include "context_holder.h"
#include "mpc_operators.h"
#include "paddle/fluid/framework/tensor.h"
#include "privc3/boolean_tensor.h"
#include "privc3/circuit_context.h"
#include "privc3/fixedpoint_tensor.h"
#include "privc3/paddle_tensor.h"
#include "core/privc3/boolean_tensor.h"
#include "core/privc3/circuit_context.h"
#include "core/privc3/fixedpoint_tensor.h"
#include "core/privc3/paddle_tensor.h"
namespace paddle {
namespace mpc {
......
......@@ -24,7 +24,7 @@
#include "mesh_network.h"
#include "mpc_operators.h"
#include "mpc_protocol.h"
#include "privc3/circuit_context.h"
#include "core/privc3/circuit_context.h"
namespace paddle {
namespace mpc {
......
......@@ -22,8 +22,8 @@
#pragma once
#include "paddle/fluid/framework/operator.h"
#include "privc3/circuit_context.h"
#include "privc3/paddle_tensor.h"
#include "core/privc3/circuit_context.h"
#include "core/privc3/paddle_tensor.h"
namespace paddle {
namespace mpc {
......
......@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "paddle_encrypted/mpc_protocol/mesh_network.h"
#include "core/paddlefl_mpc/mpc_protocol/mesh_network.h"
#include <thread>
......
......@@ -16,9 +16,9 @@
#pragma once
#include "gloo/rendezvous/hash_store.h"
#include "paddle_encrypted/mpc_protocol/mpc_config.h"
#include "paddle_encrypted/mpc_protocol/mpc_protocol.h"
#include "paddle_encrypted/mpc_protocol/mpc_protocol_factory.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_config.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_protocol.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_protocol_factory.h"
#include <memory>
#include <mutex>
......
......@@ -19,7 +19,7 @@
#include "aby3_protocol.h"
#include "mpc_protocol_factory.h"
#include "privc3/circuit_context.h"
#include "core/privc3/circuit_context.h"
#include "gtest/gtest.h"
namespace paddle {
......
......@@ -21,7 +21,7 @@
#include "gloo/rendezvous/hash_store.h"
#include "mpc_config.h"
#include "mpc_operators.h"
#include "privc3/circuit_context.h"
#include "core/privc3/circuit_context.h"
namespace paddle {
namespace mpc {
......
......@@ -17,7 +17,7 @@
#include "aby3_protocol.h"
#include "mpc_config.h"
#include "mpc_protocol_factory.h"
#include "privc3/circuit_context.h"
#include "core/privc3/circuit_context.h"
#include "gtest/gtest.h"
namespace paddle {
......
......@@ -14,7 +14,7 @@
#pragma once
#include "mpc_op.h"
#include "paddle_encrypted/mpc_protocol/mpc_instance.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_instance.h"
#include <math.h>
#include <type_traits>
......
......@@ -18,7 +18,7 @@
#pragma once
#include "mpc_op.h"
#include "paddle/fluid/platform/transform.h"
#include "paddle_encrypted/mpc_protocol/mpc_instance.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_instance.h"
namespace paddle {
namespace operators {
......
......@@ -17,7 +17,7 @@
#pragma once
#include "mpc_op.h"
#include "paddle_encrypted/mpc_protocol/mpc_instance.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_instance.h"
namespace paddle {
namespace operators {
......
......@@ -15,8 +15,8 @@
// Description:
#include "paddle/fluid/framework/op_registry.h"
#include "paddle_encrypted/mpc_protocol/mpc_config.h"
#include "paddle_encrypted/mpc_protocol/mpc_instance.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_config.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_instance.h"
namespace paddle {
namespace operators {
......
......@@ -14,7 +14,7 @@
#pragma once
#include "mpc_op.h"
#include "paddle_encrypted/mpc_protocol/mpc_instance.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_instance.h"
namespace paddle {
namespace operators {
......
......@@ -17,9 +17,9 @@
#pragma once
#include "paddle/fluid/framework/operator.h"
#include "paddle_encrypted/mpc_protocol/context_holder.h"
#include "paddle_encrypted/mpc_protocol/mpc_instance.h"
#include "privc3/circuit_context.h"
#include "core/paddlefl_mpc/mpc_protocol/context_holder.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_instance.h"
#include "core/privc3/circuit_context.h"
namespace paddle {
namespace operators {
......
......@@ -14,7 +14,7 @@
#pragma once
#include "mpc_op.h"
#include "paddle_encrypted/mpc_protocol/mpc_instance.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_instance.h"
namespace paddle {
namespace operators {
......
......@@ -15,7 +15,7 @@
#pragma once
#include "mpc_op.h"
#include "paddle/fluid/framework/eigen.h"
#include "paddle_encrypted/mpc_protocol/mpc_instance.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_instance.h"
namespace paddle {
namespace operators {
......
......@@ -13,7 +13,7 @@
// limitations under the License.
#pragma once
#include "mpc_op.h"
#include "paddle_encrypted/mpc_protocol/mpc_instance.h"
#include "core/paddlefl_mpc/mpc_protocol/mpc_instance.h"
namespace paddle {
namespace operators {
......
......@@ -18,7 +18,7 @@
#include <string>
#include <vector>
#include "paddle_encrypted/mpc_protocol/context_holder.h"
#include "core/paddlefl_mpc/mpc_protocol/context_holder.h"
#include "tensor_adapter.h"
namespace aby3 {
......
......@@ -27,7 +27,7 @@
#include "boolean_tensor.h"
#include "circuit_context.h"
#include "fixedpoint_tensor.h"
#include "paddle_encrypted/mpc_protocol/mesh_network.h"
#include "core/paddlefl_mpc/mpc_protocol/mesh_network.h"
#include "paddle_tensor.h"
namespace aby3 {
......
......@@ -17,7 +17,7 @@
#include <algorithm>
#include <memory>
#include "paddle_encrypted/mpc_protocol/abstract_network.h"
#include "core/paddlefl_mpc/mpc_protocol/abstract_network.h"
#include "prng_utils.h"
namespace aby3 {
......
......@@ -18,7 +18,7 @@
#include "boolean_tensor.h"
#include "circuit_context.h"
#include "paddle_encrypted/mpc_protocol/context_holder.h"
#include "core/paddlefl_mpc/mpc_protocol/context_holder.h"
#include "paddle_tensor.h"
namespace aby3 {
......
......@@ -20,8 +20,8 @@
#include "gtest/gtest.h"
#include "fixedpoint_tensor.h"
#include "paddle_encrypted/mpc_protocol/context_holder.h"
#include "paddle_encrypted/mpc_protocol/mesh_network.h"
#include "core/paddlefl_mpc/mpc_protocol/context_holder.h"
#include "core/paddlefl_mpc/mpc_protocol/mesh_network.h"
namespace aby3 {
......
# Copyright (c) 2020 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.
#!/bin/bash
#
# A tools to faciliate the parallel running of fluid_encrypted test scrips.
# A test script is EXPECTED to accepted arguments in the following format:
#
# SCRIPT_NAME $ROLE $SERVER $PORT
# ROLE: the role of the running party
# SERVER: the address of the party discovering service
# PORT: the port of the party discovering service
#
# This tool will try to fill the above three argument to the test script,
# so that totally three processes running the script will be started, to
# simulate run of three party in a standalone machine.
#
# Usage of this script:
#
# bash run_standalone.sh TEST_SCRIPT_NAME
#
# modify the following vars according to your environment
LD_LIB_PATH="path_to_needed_libs"
PYTHON="python"
REDIS_HOME="path_to_redis_bin"
SERVER="localhost"
PORT=9937
MPC_DATA_UTILS_MODULE_DIRPATH="mpc_data_utils_so_dirpath"
export PYTHONPATH=$MPC_DATA_UTILS_MODULE_DIRPATH:$PYTHONPATH
function usage() {
echo 'run_standalone.sh SCRIPT_NAME [ARG...]'
exit 0
}
if [ $# -lt 1 ]; then
usage
fi
SCRIPT=$1
if [ ! -f $SCRIPT ]; then
echo 'Could not find script of '$SCRIPT
exit 1
fi
REDIS_BIN=$REDIS_HOME/redis-cli
if [ ! -f $REDIS_BIN ]; then
echo 'Could not find redis cli in '$REDIS_HOME
exit 1
fi
# clear the redis cache
$REDIS_BIN -h $SERVER -p $PORT flushall
# kick off script with roles of 1 and 2, and redirect output to /dev/null
export LD_LIBRARY_PATH=$LD_LIB_PATH:$LD_LIBRARY_PATH
for role in {1..2}; do
$PYTHON $SCRIPT $role $SERVER $PORT 2>&1 >/dev/null &
done
# for party of role 0, run in a foreground mode and show the output
$PYTHON $SCRIPT 0 $SERVER $PORT
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册