]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
Add initial AVX512 support for dot product on Linux (#320)
authorCasey Primozic <redacted>
Tue, 21 Mar 2023 14:35:42 +0000 (07:35 -0700)
committerGitHub <redacted>
Tue, 21 Mar 2023 14:35:42 +0000 (15:35 +0100)
commit2e664f1ff413995506c9a54f3a8d5b8c64e37a91
tree0162d9c81e72e85d21a5806b35dbefc6587c105d
parent8cf9f34eddc124d4ab28f4d2fe8e99d574510bde
Add initial AVX512 support for dot product on Linux (#320)

 * Update Makefile to detect AVX512 support and add compiler flags if it's available
 * Based on existing AVX2 implementation, dot product on one 32-value block of 4-bit quantized ints at a time
 * Perform 8 bit -> 16 bit sign extension and multiply+add on 32 values at time instead of 16
 * Use built-in AVX512 horizontal reduce add to get sum at the end
 * Manual unrolling on inner dot product loop to reduce loop counter overhead
Makefile
ggml.c