Open seniorjoinu opened 5 years ago
What videocard and platform (CUDA/OpenCL) do you use?
Could you run the tests for the package? You'll have to clone the repo, install py.test
and run
py.test -v -m "not perf"
(the last option skips performance tests which take a lot of time)
I'm using OpenCL with Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
. OpenCL runtime was installed from here: https://github.com/intel/compute-runtime/releases/tag/19.15.12831
Here's complete pytest output: https://pastebin.com/eEC2HDnH
So, from the logs it seems that:
transform_type="NTT"
leads to errors, while transform_type="FFT"
works fine (from test_transform_type
)test_transform_correctness
tests passed)test_tgsw_transformed_external_mul
), which is tested for transform_type="NTT"
Therefore, for a workaround you can use transform_type="FFT"
as a keyword to NuFHEParameters
, Context.make_secret_key()
or Context.make_key_pair
.
As for the reasons for the error, it's hard to say without debugging on a machine with this specific device and drivers. Based on my previous experience with OpenCL implementations, I would guess it's the driver compiling some code construct incorrectly. Most of OpenCL drivers I've seen are surprisingly buggy, the only exception being (ironically) the nVidia one.
The way to debug it would be to take the kernel producing incorrect results (the one from TGswTransformedExternalMul
in this case) and progressively simplify it, checking if the bug is still there (by comparing it with the reference code simplified accordingly).
I will leave this open in case I manage to get my hands on a Xeon.
Thank you. I'm able to pass gate_nand.py
now.
Problem
Usage example test doesn't pass
Steps to reproduce
python examples/gate_nand.py
Environment
nuFHE 0.0.2 python 3.6 ubuntu 18.04
Details
I've also printed out some variables when
size = 4