vernamlab / cuhe Goto Github PK
View Code? Open in Web Editor NEWCUDA Homomorphic Encryption Library
License: MIT License
CUDA Homomorphic Encryption Library
License: MIT License
When i make, it occurs:
chang@chang-MS-7C60:/home/gggggyw/libtarfile/cuHE/cuhe$ sudo make
[ 4%] Building NVCC (Device) object CMakeFiles/cuHE.dir/cuHE_generated_Utils.cu.o
gcc-9.4.0: No such file or directory
CMake Error at cuHE_generated_Utils.cu.o.cmake:220 (message):
Error generating
/home/gggggyw/libtarfile/cuHE/cuhe/CMakeFiles/cuHE.dir//./cuHE_generated_Utils.cu.o
make[2]: *** [CMakeFiles/cuHE.dir/build.make:107: CMakeFiles/cuHE.dir/cuHE_generated_Utils.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/cuHE.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
and the cmake result is as follows:
chang@chang-MS-7C60:/home/gggggyw/libtarfile/cuHE/cuhe$ sudo cmake -DGCC_CUDA_VERSION:STRING=gcc-9.4.0 ./
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found NTL: /usr/local/lib/libntl.a
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr (found version "10.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gggggyw/libtarfile/cuHE/cuhe
Configuring stage 1 in host-x86_64-unknown-linux-gnu/gcc
configure: creating cache ./config.cache
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking LIBRARY_PATH variable... contains current directory
configure: error:
*** LIBRARY_PATH shouldn't contain the current directory when
*** building gcc. Please change the environment variable
*** and run configure again.
make[2]: *** [configure-stage1-gcc] Error 1
make[2]: Leaving directory `/home/gcc-4.9.3'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/gcc-4.9.3'
make: *** [all] Error 2
The command '/bin/sh -c make' returned a non-zero code: 2
./simple_DHS
cudaSafeCall() failed at /home/xionganbin/cuHE/cuhe/Base.cu:81 : invalid texture reference
how could I solve it?
I am using CUDA -10.1
'Makefile's should work for both Mac OS X and Ubuntu.
It happens that an exception is thrown, probably during KeyGen of DHS, apparently randomly.
Dear all,
I've got the following error while building cuhe:
coep@coep2-Precision-T1700:~/DHS/cuHE-master/cuhe$ make VERBOSE=1
/usr/bin/cmake -H/home/coep/DHS/cuHE-master/cuhe -B/home/coep/DHS/cuHE-master/cuhe --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/coep/DHS/cuHE-master/cuhe/CMakeFiles /home/coep/DHS/cuHE-master/cuhe/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory /home/coep/DHS/cuHE-master/cuhe' make -f CMakeFiles/cuHE.dir/build.make CMakeFiles/cuHE.dir/depend make[2]: Entering directory
/home/coep/DHS/cuHE-master/cuhe'
cd /home/coep/DHS/cuHE-master/cuhe && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/coep/DHS/cuHE-master/cuhe /home/coep/DHS/cuHE-master/cuhe /home/coep/DHS/cuHE-master/cuhe /home/coep/DHS/cuHE-master/cuhe /home/coep/DHS/cuHE-master/cuhe/CMakeFiles/cuHE.dir/DependInfo.cmake --color=
make[2]: Leaving directory /home/coep/DHS/cuHE-master/cuhe' make -f CMakeFiles/cuHE.dir/build.make CMakeFiles/cuHE.dir/build make[2]: Entering directory
/home/coep/DHS/cuHE-master/cuhe'
make[2]: Nothing to be done for CMakeFiles/cuHE.dir/build'. make[2]: Leaving directory
/home/coep/DHS/cuHE-master/cuhe'
/usr/bin/cmake -E cmake_progress_report /home/coep/DHS/cuHE-master/cuhe/CMakeFiles 1 2 3 4 5 6 7
[ 33%] Built target cuHE
make -f CMakeFiles/cuHEShared.dir/build.make CMakeFiles/cuHEShared.dir/depend
make[2]: Entering directory /home/coep/DHS/cuHE-master/cuhe' cd /home/coep/DHS/cuHE-master/cuhe && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/coep/DHS/cuHE-master/cuhe /home/coep/DHS/cuHE-master/cuhe /home/coep/DHS/cuHE-master/cuhe /home/coep/DHS/cuHE-master/cuhe /home/coep/DHS/cuHE-master/cuhe/CMakeFiles/cuHEShared.dir/DependInfo.cmake --color= make[2]: Leaving directory
/home/coep/DHS/cuHE-master/cuhe'
make -f CMakeFiles/cuHEShared.dir/build.make CMakeFiles/cuHEShared.dir/build
make[2]: Entering directory `/home/coep/DHS/cuHE-master/cuhe'
Linking CXX shared library libcuHEShared.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/cuHEShared.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -fopenmp -m64 -O3 -ffast-math -Wall -shared -Wl,-soname,libcuHEShared.so -o libcuHEShared.so CMakeFiles/cuHEShared.dir/./cuHEShared_generated_Parameters.cu.o CMakeFiles/cuHEShared.dir/./cuHEShared_generated_DeviceManager.cu.o CMakeFiles/cuHEShared.dir/./cuHEShared_generated_Base.cu.o CMakeFiles/cuHEShared.dir/./cuHEShared_generated_CuHE.cu.o CMakeFiles/cuHEShared.dir/./cuHEShared_generated_Operations.cu.o CMakeFiles/cuHEShared.dir/./cuHEShared_generated_Relinearization.cu.o CMakeFiles/cuHEShared.dir/./cuHEShared_generated_Utils.cu.o /usr/local/cuda-7.5/lib64/libcudart.so /usr/local/lib/libntl.a -Wl,-rpath,/usr/local/cuda-7.5/lib64
/usr/bin/ld: /usr/local/lib/libntl.a(ZZ.o): relocation R_X86_64_32S against .bss' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libntl.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[2]: *** [libcuHEShared.so] Error 1 make[2]: Leaving directory
/home/coep/DHS/cuHE-master/cuhe'
make[1]: *** [CMakeFiles/cuHEShared.dir/all] Error 2
make[1]: Leaving directory `/home/coep/DHS/cuHE-master/cuhe'
make: *** [all] Error 2
Can anybody please help me out?
Thanks in advance!!!
I'm trying to check this awesome work!
Unfortunately now the problem is that I cannot compile Base.cu due to:
Base.cu(253): error: calling a __device__ function("_add_modP") from a __host__ __device__ function("_ntt4") is not allowed
and following.
I've checked and I can compile but not execute the dir developing in the ntt branch.
any hint?
Trying to run examples and tests fail on initCuHE with:
double free or corruption (!prev):
Error message:
terminate called after throwing an instance of 'NTL::ArithmeticErrorObject'
what(): ZZ_pX: division by zero
Aborted (core dumped)
CuHE.h
DHS.h
README.md
sample_DHS.cu
I am getting an error when I do make. It appears to be looking for a directory gcc-X.Y where X.Y is the gcc version number.
If I cmake without any arguments it looks for a directory gcc-4.9.
If I specify
cmake -DGPU_ARCH:STRING=50 -DGCC_CUDA_VERSION:STRING=gcc-7.4.0 ./
(gcc 7.4.0 is what I have in my system)
It complains about not finding gcc-7.4.0
Can this library be used to implement SEAL or HElib over GPU? If not, what's the technical limitation?
I'm trying to have an add example of DHS,
reading the Prince branch let me think that change:
https://github.com/vernamlab/cuHE/blob/master/examples/DHS/simple_DHS.cu#L25
cAnd
in cXor
and
https://github.com/vernamlab/cuHE/blob/master/examples/DHS/simple_DHS.cu#L39
*
in +
should do the job, but unfortunately this doesn't work,
any hint on it?
Thanks in advance for the support!
Dear cuHE maintainers,
Greetings from me! I have a question about crt code:
__global__ void crt(uint32 *dst, uint32 *src, int pnum, int w32, int mlen,
int clen) {
......
for (int i=0; i<w32; i++)
in[bdimx*i+tidx] = src[bidx*bdimx*w32+bdimx*i+tidx];
__syncthreads();
......
}
I just wonder why we don't use the following one:
__global__ void crt(uint32 *dst, uint32 *src, int pnum, int w32, int mlen,
int clen) {
......
for (int i=0; i<w32; i++)
in[tidx*w32+i] = src[idx*w32+i];
......
}
Since the above every for-loop can guarantee every thread can get a complete coefficient, there is no need to synchronize the threads. Shouldn't it be more efficient? Thanks very much!
Best Regards
Nan Xiao
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.