Implementation notes: amd64, saber214, crypto_kem/titaniumccalite

Computer: saber214
Microarchitecture: amd64; Bulldozer (600f20)
Architecture: amd64
CPU ID: AuthenticAMD-00600f20-1789c3f5
SUPERCOP version: 20240625
Operation: crypto_kem
Primitive: titaniumccalite
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
582591281948 0 36193142 840 1600T:optclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
584693762080 0 36170878 840 1600T:optclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
624334776399 0 64186644 800 1664T:optgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
625512437777 0 36145512 832 1600T:optclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
641180355821 0 36166310 840 1600T:optclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
674240637574 0 36145718 840 1600T:optclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
699901441299 0 64150380 800 1664T:optgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
717669740585 0 64149292 800 1664T:optgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
53606605456263 0 36166742 840 1600T:refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
54758369030242 0 36137840 832 1600T:refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
549386431105863 0 36217406 840 1600T:refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
55167737342284 0 36151446 840 1600T:refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
56583328030036 0 36138118 840 1600T:refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
62446324657460 0 64167692 800 1664T:refgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
62459402430482 0 64139428 800 1664T:refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
72662005130761 0 64139316 800 1664T:refgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625
109008977129266 0 64136612 792 1632T:refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070820240625

Compiler output


encrypt.c: encrypt.c:66:8: error: always_inline function '_mm256_mul_epu32' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c:                         t = _mm256_mul_epu32(u, v);
encrypt.c:                             ^
encrypt.c: encrypt.c:81:8: error: always_inline function '_mm256_add_epi64' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c:                         t = _mm256_add_epi64(u, v);
encrypt.c:                             ^
encrypt.c: encrypt.c:82:9: error: always_inline function '_mm256_mul_epu32' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c:                         t1 = _mm256_mul_epu32(t, V_B4Q_B4Q_B4Q_B4Q);
encrypt.c:                              ^
encrypt.c: encrypt.c:83:9: error: always_inline function '_mm256_srli_epi64' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c:                         t1 = _mm256_srli_epi64(t1, BARRETT_BITSHIFT_4Q);
encrypt.c:                              ^
encrypt.c: encrypt.c:84:9: error: always_inline function '_mm256_mul_epu32' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c:                         t1 = _mm256_mul_epu32(t1, V_Q_Q_Q_Q);
encrypt.c:                              ^
encrypt.c: encrypt.c:85:8: error: always_inline function '_mm256_sub_epi64' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c:                         t = _mm256_sub_epi64(t, t1);
encrypt.c:                             ^
encrypt.c: 6 errors generated.

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
T:avx2clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:avx2clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:avx2clang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:avx2clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)

Compiler output


encrypt.c: encrypt.c:64:8: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx'
encrypt.c:                         u = _mm256_loadu_si256((__m256i *)(a[i] + j));
encrypt.c:                             ^
encrypt.c: encrypt.c:64:8: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:65:8: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx'
encrypt.c:                         v = _mm256_loadu_si256((__m256i *)(s + j));
encrypt.c:                             ^
encrypt.c: encrypt.c:65:8: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:66:8: error: always_inline function '_mm256_mul_epu32' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c:                         t = _mm256_mul_epu32(u, v);
encrypt.c:                             ^
encrypt.c: encrypt.c:66:8: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:67:4: error: always_inline function '_mm256_storeu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx'
encrypt.c:                         _mm256_storeu_si256((__m256i *)(a[i] + j), t);
encrypt.c:                         ^
encrypt.c: encrypt.c:67:4: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:79:8: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx'
encrypt.c:                         u = _mm256_loadu_si256((__m256i *)(a[i] + j));
encrypt.c:                             ^
encrypt.c: encrypt.c:79:8: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:80:8: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx'
encrypt.c:                         v = _mm256_loadu_si256((__m256i *)(e[i] + j));
encrypt.c:                             ^
encrypt.c: encrypt.c:80:8: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:81:8: error: always_inline function '_mm256_add_epi64' requires target feature 'avx2', but would be inlined into function 'crypto_encrypt_keypair' that is compiled without support for 'avx2'
encrypt.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:avx2clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)

Compiler output


encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
encrypt.c:                  from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
encrypt.c:                  from encrypt.c:18:
encrypt.c: encrypt.c: In function 'crypto_encrypt_keypair':
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:567:1: error: inlining failed in call to 'always_inline' '_mm256_mul_epu32': target specific option mismatch
encrypt.c:   567 | _mm256_mul_epu32 (__m256i __A, __m256i __B)
encrypt.c:       | ^~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:66:29: note: called from here
encrypt.c:    66 |                         t = _mm256_mul_epu32(u, v);
encrypt.c:       |                             ^~~~~~~~~~~~~~~~~~~~~~
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
encrypt.c:                  from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
encrypt.c:                  from encrypt.c:18:
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:567:1: error: inlining failed in call to 'always_inline' '_mm256_mul_epu32': target specific option mismatch
encrypt.c:   567 | _mm256_mul_epu32 (__m256i __A, __m256i __B)
encrypt.c:       | ^~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:66:29: note: called from here
encrypt.c:    66 |                         t = _mm256_mul_epu32(u, v);
encrypt.c:       |                             ^~~~~~~~~~~~~~~~~~~~~~
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
encrypt.c:                  from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
encrypt.c:                  from encrypt.c:18:
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:822:1: error: inlining failed in call to 'always_inline' '_mm256_sub_epi64': target specific option mismatch
encrypt.c:   822 | _mm256_sub_epi64 (__m256i __A, __m256i __B)
encrypt.c:       | ^~~~~~~~~~~~~~~~
encrypt.c: ...

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
T:avx2gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:avx2gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:avx2gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:avx2gcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)

Compiler output


try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(encrypt.o): in function `crypto_encrypt_keypair':
try.c: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/encrypt.c:56: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/encrypt.c:64: undefined reference to `barrett_4q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(encrypt.o): in function `crypto_encrypt':
try.c: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/encrypt.c:146: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/encrypt.c:156: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(encrypt.o): in function `crypto_encrypt_open':
try.c: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/encrypt.c:200: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_1024_1536':
try.c: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/ntt.c:342: undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_1536_768':
try.c: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/ntt.c:362: undefined reference to `barrett_16q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_512_1280':
try.c: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/ntt.c:375: undefined reference to `barrett_4q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_1024_1280':
try.c: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/ntt.c:392: undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_1280_1280_inv':
try.c: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/ntt.c:410: undefined reference to `barrett_16q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_768_768_inv':
try.c: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/ntt.c:426: undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_512_768':
try.c: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/ntt.c:439: undefined reference to `barrett_4q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_768_256':
try.c: .../supercop-data/saber214/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccalite/opt/work/ntt.c:447: undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccalite.a(ntt.o): in function `ntt_butterfly_1280_1536':
try.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:optgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)