Implementation notes: amd64, rumba7, crypto_sign/dilithium5

Computer: rumba7
Microarchitecture: amd64; Zen (800f11)
Architecture: amd64
CPU ID: AuthenticAMD-00800f11-178bfbff
SUPERCOP version: 20240107
Operation: crypto_sign
Primitive: dilithium5
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
2550723104218 64 0126915 924 1760avx2clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
256088368807 64 088861 916 1792avx2clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
257190681778 64 0104027 924 1760avx2clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
257414367724 64 087483 924 1728avx2clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
755618052710 0 075387 852 1760refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
767679738007 0 060323 852 1728refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
779136642807 0 064773 812 1792refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
820262821816 0 042637 812 1792refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
869888822048 0 041891 852 1728refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
874801338208 0 060483 852 1760refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
905154218729 0 039021 844 1792refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
909784520010 0 040173 812 1792refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
951520518953 0 038053 804 1760refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212

Compiler output

Implementation: avx2
Security model: constbranchindex
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
fips202x4.c: fips202x4.c:22:12: error: always_inline function '_mm256_setzero_si256' requires target feature 'avx', but would be inlined into function 'keccakx4_absorb_once' that is compiled without support for 'avx'
fips202x4.c: s[i] = _mm256_setzero_si256();
fips202x4.c: ^
fips202x4.c: fips202x4.c:22:12: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
fips202x4.c: fips202x4.c:24:9: error: always_inline function '_mm256_set_epi64x' requires target feature 'avx', but would be inlined into function 'keccakx4_absorb_once' that is compiled without support for 'avx'
fips202x4.c: idx = _mm256_set_epi64x((long long)in3, (long long)in2, (long long)in1, (long long)in0);
fips202x4.c: ^
fips202x4.c: fips202x4.c:24:9: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
fips202x4.c: fips202x4.c:27:11: error: '__builtin_ia32_gatherq_q256' needs target feature avx2
fips202x4.c: t = _mm256_i64gather_epi64((long long *)pos, idx, 1);
fips202x4.c: ^
fips202x4.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx2intrin.h:1140:13: note: expanded from macro '_mm256_i64gather_epi64'
fips202x4.c: ((__m256i)__builtin_ia32_gatherq_q256((__v4di)_mm256_undefined_si256(), \
fips202x4.c: ^
fips202x4.c: fips202x4.c:27:11: error: always_inline function '_mm256_undefined_si256' requires target feature 'avx', but would be inlined into function 'keccakx4_absorb_once' that is compiled without support for 'avx'
fips202x4.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx2intrin.h:1140:49: note: expanded from macro '_mm256_i64gather_epi64'
fips202x4.c: ((__m256i)__builtin_ia32_gatherq_q256((__v4di)_mm256_undefined_si256(), \
fips202x4.c: ^
fips202x4.c: fips202x4.c:27:11: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
fips202x4.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx2intrin.h:1140:49: note: expanded from macro '_mm256_i64gather_epi64'
fips202x4.c: ((__m256i)__builtin_ia32_gatherq_q256((__v4di)_mm256_undefined_si256(), \
fips202x4.c: ^
fips202x4.c: fips202x4.c:27:11: error: always_inline function '_mm256_set1_epi64x' requires target feature 'avx', but would be inlined into function 'keccakx4_absorb_once' that is compiled without support for 'avx'
fips202x4.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx2intrin.h:1143:49: note: expanded from macro '_mm256_i64gather_epi64'
fips202x4.c: (__v4di)_mm256_set1_epi64x(-1), (s)))
fips202x4.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE avx2

Compiler output

Implementation: avx2
Security model: constbranchindex
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
poly.c: poly.c: In function 'crypto_sign_dilithium5_avx2_constbranchindex_poly_uniform_eta_4x':
poly.c: <command-line>: warning: 'crypto_sign_dilithium5_avx2_constbranchindex_rej_eta_avx' reading 840 bytes from a region of size 768 [-Wstringop-overread]
poly.c: <command-line>: note: in definition of macro 'CRYPTO_NAMESPACE'
poly.c: rejsample.h:24:21: note: in expansion of macro 'DILITHIUM_NAMESPACE'
poly.c: 24 | #define rej_eta_avx DILITHIUM_NAMESPACE(rej_eta_avx)
poly.c: | ^~~~~~~~~~~~~~~~~~~
poly.c: poly.c:594:10: note: in expansion of macro 'rej_eta_avx'
poly.c: 594 | ctr0 = rej_eta_avx(a0->coeffs, buf[0].coeffs);
poly.c: | ^~~~~~~~~~~
poly.c: <command-line>: note: referencing argument 2 of type 'const uint8_t *' {aka 'const unsigned char *'}
poly.c: <command-line>: note: in definition of macro 'CRYPTO_NAMESPACE'
poly.c: rejsample.h:24:21: note: in expansion of macro 'DILITHIUM_NAMESPACE'
poly.c: 24 | #define rej_eta_avx DILITHIUM_NAMESPACE(rej_eta_avx)
poly.c: | ^~~~~~~~~~~~~~~~~~~
poly.c: poly.c:594:10: note: in expansion of macro 'rej_eta_avx'
poly.c: 594 | ctr0 = rej_eta_avx(a0->coeffs, buf[0].coeffs);
poly.c: | ^~~~~~~~~~~
poly.c: <command-line>: note: in a call to function 'crypto_sign_dilithium5_avx2_constbranchindex_rej_eta_avx'
poly.c: <command-line>: note: in definition of macro 'CRYPTO_NAMESPACE'
poly.c: rejsample.h:24:21: note: in expansion of macro 'DILITHIUM_NAMESPACE'
poly.c: 24 | #define rej_eta_avx DILITHIUM_NAMESPACE(rej_eta_avx)
poly.c: | ^~~~~~~~~~~~~~~~~~~
poly.c: rejsample.h:25:14: note: in expansion of macro 'rej_eta_avx'
poly.c: 25 | unsigned int rej_eta_avx(int32_t *r, const uint8_t buf[REJ_UNIFORM_BUFLEN]);
poly.c: | ^~~~~~~~~~~
poly.c: ...

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE avx2
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE avx2
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE avx2
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE avx2