Closed Pro7ech closed 3 months ago
These logs are only printed in debug mode. We shall remove them in future.
And the output vectors of q120_ntt_bb_avx2 and q120_intt_bb_avx2 for zero inputs are non-zero. It turns out that they are not reduced modulo their respective Q1, Q2, Q3, Q4 primes and can be in the range [0, 2^{63}-1], which is not documented in q120_ntt.h.
The q120 is in draft mode currently, so no much comments. This should change once we fully support q120 backend. NTT/INTT does only the strictly necessary reduction so that the 4 i64 do not overflow. It's up to the calling party to do the reduction as a function of whether this is needed.
@ssmiler Is the q120 therefore currently by default in debug mode?
Not that I'm aware of. Last time I've compiled in release mode no ntt logs were shown. What compiler are you using?
I'm on wsl with Ubuntu 22.04. This is the output of $ cmake ..
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Compiling spqlios-fft version: 1.0.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Found gtest: I=/usr/include L=/usr/lib/x86_64-linux-gnu/libgtest.a,/usr/lib/x86_64-linux-gnu/libgtest_main.a
-- Found benchmark: I=/usr/local/include L=/usr/local/lib/libbenchmark.a
-- CANNOT FIND valgrind header: VALGRIND_DIR-NOTFOUND
-- /usr/lib/x86_64-linux-gnu/libgtest.a;/usr/lib/x86_64-linux-gnu/libgtest_main.a;pthread
-- Configuring done (1.8s)
-- Generating done (0.3s)
-- Build files have been written to: [...]/spqlios/build
There is no information about a release/debug mode in the readme, it states that calling cmake
and then make
will compile the shared library in optimized mode.
You're right. The default mode is debug. I've open a pr #26 to fix it.
Should this issue be closed since #26 has been merged?
Yes, you can close it. Thx
I'm trying to call
spqlios-arithmetic
from Go. I was able to reproduce the simple-fft example. However, when trying to do the same withq120_ntt.h
, I run into the following issues:Calling
q120_new_ntt_bb_precomp
q120_new_intt_bb_precomp
q120_ntt_bb_avx2
q120_intt_bb_avx2
prints in the command line:
And the output vectors of
q120_ntt_bb_avx2
andq120_intt_bb_avx2
for zero inputs are non-zero. It turns out that they are not reduced modulo their respectiveQ1
,Q2
,Q3
,Q4
primes and can be in the range [0, 2^{63}-1], which is not documented in q120_ntt.h.