Implementation notes: amd64, hydra8, crypto_kem/titaniumccamed

Computer: hydra8
Microarchitecture: amd64; Ivy Bridge+AES (306a9)
Architecture: amd64
CPU ID: GenuineIntel-000306a9-bfebfbff
SUPERCOP version: 20240625
Operation: crypto_kem
Primitive: titaniumccamed
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
517947266510 0 36231242 884 1760T:optclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
518217689901 0 36256578 884 1760T:optclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
523768465085 0 36230874 884 1760T:optclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
544433145620 0 36208868 876 1760T:optclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
556390568149 0 64233451 828 1824T:optgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
564201944779 0 36208410 884 1760T:optclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
572896248151 0 64212515 828 1824T:optgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
625760147822 0 64211811 828 1824T:optgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
46882327436786 0 64201019 828 1824T:refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
47096701646967 0 36212114 884 1760T:refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
47134259778462 0 36245562 884 1760T:refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
47150190858151 0 36223914 884 1760T:refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
47377904751287 0 64216587 828 1824T:refgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
47768435136930 0 36199996 876 1760T:refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
48891659636364 0 36199962 884 1760T:refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
59443640337022 0 64200835 828 1824T:refgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625
177569757935518 0 64198195 820 1792T:refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024063020240625

Compiler output


encrypt.c: encrypt.c:65: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:80: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:81: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:82: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:83: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:84: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:63: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:63:8: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
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:                         v = _mm256_loadu_si256((__m256i *)(s + 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_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:65:8: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:66: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:66:4: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:78: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:78:8: error: AVX vector return 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:                         v = _mm256_loadu_si256((__m256i *)(e[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_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:65:29: note: called from here
encrypt.c:    65 |                         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:65:29: note: called from here
encrypt.c:    65 |                         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_titaniumccamed.a(encrypt.o): in function `crypto_encrypt_keypair':
try.c: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/encrypt.c:55: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/encrypt.c:63: undefined reference to `barrett_4q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccamed.a(encrypt.o): in function `crypto_encrypt':
try.c: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/encrypt.c:140: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/encrypt.c:150: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccamed.a(encrypt.o): in function `crypto_encrypt_open':
try.c: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/encrypt.c:194: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccamed.a(ntt.o): in function `ntt_butterfly_1280_2048':
try.c: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/ntt.c:350: undefined reference to `barrett_16q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccamed.a(ntt.o): in function `ntt_butterfly_2048_768':
try.c: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/ntt.c:374: undefined reference to `barrett_16q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccamed.a(ntt.o): in function `ntt_butterfly_512_1792':
try.c: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/ntt.c:387: undefined reference to `barrett_4q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccamed.a(ntt.o): in function `ntt_butterfly_1280_1792':
try.c: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/ntt.c:407: undefined reference to `barrett_16q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccamed.a(ntt.o): in function `ntt_butterfly_1792_1792_inv':
try.c: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/ntt.c:429: undefined reference to `barrett_16q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccamed.a(ntt.o): in function `ntt_butterfly_768_768_inv':
try.c: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/ntt.c:447: undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccamed.a(ntt.o): in function `ntt_butterfly_512_768':
try.c: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/ntt.c:460: undefined reference to `barrett_4q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccamed.a(ntt.o): in function `ntt_butterfly_768_256':
try.c: .../supercop-data/hydra8/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccamed/opt/work/ntt.c:468: undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccamed.a(ntt.o): in function `ntt_butterfly_1792_2048':
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)