dev-libs/ncnn: fix build with avx512

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2025-02-24 16:52:46 -05:00
parent 0d918a1667
commit db59e5df68
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
Quick fix for build with -march that enables avx512f.
This is not where ncnn would include this though, it seems to have
tendency to put headers not where they're used by in every files
before including this.
--- a/src/layer/x86/gemm_int8.h
+++ b/src/layer/x86/gemm_int8.h
@@ -13,4 +13,8 @@
// specific language governing permissions and limitations under the License.
+#if __AVX512F__
+#include "avx512_mathfun.h"
+#endif
+
#if NCNN_RUNTIME_CPU && NCNN_AVX512VNNI && __AVX512F__ && !__AVX512VNNI__
void pack_A_tile_int8_avx512vnni(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk);

View File

@@ -41,6 +41,10 @@ BDEPEND="
DOCS=( README.md docs/. )
PATCHES=(
"${FILESDIR}"/${P}-avx512.patch
)
pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}