mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-09 13:37:58 -05:00
Optimized matrix multiplication; data type for quantization.
This commit is contained in:
20
Scripts/build.sh
Executable file
20
Scripts/build.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
function build
|
||||
{
|
||||
echo ARCH = $1 >> CONFIG.mine
|
||||
echo GDEBUG = >> CONFIG.mine
|
||||
make clean
|
||||
rm -R static
|
||||
mkdir static
|
||||
make -j 12 static-hm
|
||||
mkdir bin
|
||||
dest=bin/`uname`-$2
|
||||
rm -R $dest
|
||||
mv static $dest
|
||||
strip $dest/*
|
||||
}
|
||||
|
||||
build '' amd64
|
||||
build '-msse4.1 -maes -mpclmul' aes
|
||||
build '-msse4.1 -maes -mpclmul -mavx -mavx2 -mbmi2' avx2
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "Math/gf2n.h"
|
||||
#include "Processor/Buffer.h"
|
||||
#include "Tools/Buffer.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "Math/gfp.h"
|
||||
#include "Processor/Buffer.h"
|
||||
#include "Tools/Buffer.h"
|
||||
#include "Tools/ezOptionParser.h"
|
||||
#include "Math/Setup.h"
|
||||
|
||||
|
||||
@@ -54,4 +54,4 @@ SPDZROOT=${SPDZROOT:-.}
|
||||
|
||||
#. Scripts/setup.sh
|
||||
|
||||
mkdir logs
|
||||
mkdir logs 2> /dev/null
|
||||
|
||||
@@ -32,6 +32,3 @@ $HERE/setup-ssl.sh ${players}
|
||||
|
||||
$SPDZROOT/Fake-Offline.x ${players} -lgp ${bits} -lg2 ${g} --default ${default}
|
||||
|
||||
for i in $(seq 0 $[players-1]) ; do
|
||||
dd if=/dev/zero of=Player-Data/Private-Input-$i bs=10000 count=1
|
||||
done
|
||||
|
||||
@@ -10,4 +10,6 @@ for i in `seq 0 $[n-1]`; do
|
||||
openssl req -newkey rsa -nodes -x509 -out Player-Data/P$i.pem -keyout Player-Data/P$i.key -subj "/CN=P$i"
|
||||
done
|
||||
|
||||
# brew-installed OpenSSL on MacOS
|
||||
PATH=$PATH:/usr/local/opt/openssl/bin/
|
||||
c_rehash Player-Data
|
||||
|
||||
35
Scripts/tldr.sh
Executable file
35
Scripts/tldr.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test `uname` = "Linux"; then
|
||||
flags='cat /proc/cpuinfo'
|
||||
elif test `uname` = Darwin; then
|
||||
if ! type brew; then
|
||||
echo Do you want me to install Homebrew?
|
||||
echo Press RETURN to continue or any other key to abort
|
||||
read ans
|
||||
if test "$ans"; then
|
||||
echo Aborting
|
||||
exit 1
|
||||
else
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
fi
|
||||
fi
|
||||
make tldr
|
||||
else
|
||||
echo OS unknown
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "$flags"; then
|
||||
if $flags | grep -q avx2; then
|
||||
cpu=avx2
|
||||
elif $flags | grep -q aes; then
|
||||
cpu=aes
|
||||
else
|
||||
cpu=amd64
|
||||
fi
|
||||
|
||||
cp -av bin/`uname`-$cpu/* .
|
||||
fi
|
||||
|
||||
Scripts/setup-ssl.sh
|
||||
Reference in New Issue
Block a user