diff --git a/configure.ac b/configure.ac index 8f2774eb12..7cd6031ded 100644 --- a/configure.ac +++ b/configure.ac @@ -737,7 +737,7 @@ Please report at ]) ;; meteorlake) gcc_cflags_arch="-march=meteorlake" - param_path="x86_64/skylake" + param_path="x86_64/meteorlake" ;; knightslanding) gcc_cflags_arch="-march=knl" diff --git a/src/mpn_extras/x86_64/broadwell/flint-mparam.h b/src/mpn_extras/x86_64/broadwell/flint-mparam.h index b89ac92799..c1abca50d4 100644 --- a/src/mpn_extras/x86_64/broadwell/flint-mparam.h +++ b/src/mpn_extras/x86_64/broadwell/flint-mparam.h @@ -31,7 +31,6 @@ #define FFT_N_NUM 23 #define FFT_MULMOD_2EXPP1_CUTOFF 128 -/* TODO: check this tuning */ #define FLINT_PREINVERT_LIMB_USE_NATIVE 0 #define FLINT_MULMOD_SHOUP_THRESHOLD 14 diff --git a/src/mpn_extras/x86_64/meteorlake/flint-mparam.h b/src/mpn_extras/x86_64/meteorlake/flint-mparam.h new file mode 100644 index 0000000000..52fb69f0dc --- /dev/null +++ b/src/mpn_extras/x86_64/meteorlake/flint-mparam.h @@ -0,0 +1,38 @@ +/* + Copyright (C) 2025 Vincent Neiger + + This file is part of FLINT. + + FLINT is free software: you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License (LGPL) as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. See . +*/ + +/* parameters found for Intel(R) Core(TM) Ultra 7 165H */ + +#ifndef FLINT_MPARAM_H +#define FLINT_MPARAM_H + +/* TODO these were taken directly from skylake flint-mparam.h ----> */ +#define FLINT_FFT_SMALL_MUL_THRESHOLD 1540 +#define FLINT_FFT_SMALL_SQR_THRESHOLD 3080 + +#define FLINT_FFT_MUL_THRESHOLD 32000 +#define FLINT_FFT_SQR_THRESHOLD 32000 +/* <---- these were taken directly from skylake flint-mparam.h */ + +#define FFT_TAB \ + { { 4, 4 }, { 4, 3 }, { 3, 2 }, { 2, 2 }, { 2, 1 } } + +#define MULMOD_TAB \ + { 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1 } + +#define FFT_N_NUM 19 +#define FFT_MULMOD_2EXPP1_CUTOFF 128 + +#define FLINT_PREINVERT_LIMB_USE_NATIVE 1 + +#define FLINT_MULMOD_SHOUP_THRESHOLD 0 + +#endif diff --git a/src/mpn_extras/x86_64/skylake/flint-mparam.h b/src/mpn_extras/x86_64/skylake/flint-mparam.h index 7aac782c97..399a5659fc 100644 --- a/src/mpn_extras/x86_64/skylake/flint-mparam.h +++ b/src/mpn_extras/x86_64/skylake/flint-mparam.h @@ -27,7 +27,6 @@ #define FFT_N_NUM 19 #define FFT_MULMOD_2EXPP1_CUTOFF 128 -/* TODO: check this tuning */ #define FLINT_PREINVERT_LIMB_USE_NATIVE 0 /* verified on Xeon(R) Gold 6244 (cascade lake) */