[FFmpeg-devel] [PATCH] configure: set IceLake-AVX512 as the minimum baseline

Ronald S. Bultje rsbultje at gmail.com
Tue Aug 17 18:25:25 EEST 2021


Hi,

On Tue, Aug 17, 2021 at 2:33 AM Hendrik Leppkes <h.leppkes at gmail.com> wrote:

> On Tue, Aug 17, 2021 at 8:30 AM Wu Jianhua <jianhua.wu at intel.com> wrote:
> > Based on IceLake-AVX512 and newer architecture, a broad
> > range of the subsets of AVX512 could be supported.
>
[..]

> > -        enabled avx512 && check_x86asm avx512_external "vmovdqa32
> [eax]{k1}{z}, zmm0"
> > +        # Only IceLake and newer architectures could enable AVX512
> > +        #
> F/CD/BW/DQ/VL/VNNI/IFMA/VBMI/VBMI2/VPOPCNTDQ/BITALG/GFNI/VAES/VPCLMULQDQ
> > +        enabled avx512 && check_x86asm avx512_external "vpdpwssds
> zmm31{k1}{z}, zmm29, zmm28"
> >          enabled avx2   && check_x86asm avx2_external   "vextracti128
> xmm0, ymm0, 0"
> >          enabled xop    && check_x86asm xop_external    "vpmacsdd xmm0,
> xmm1, xmm2, xmm3"
> >          enabled fma4   && check_x86asm fma4_external   "vfmaddps ymm0,
> ymm1, ymm2, ymm3"
>
> Note that you are just checking the functionality of the assembler
> here, not having a runtime impact.
> What you would likely want is to update avutil/x86/cpu.c as well to
> only enable the AVX512 flag on those CPUs.
>

[After IRC discussion] you want runtime checks for the
variants/combinations-of-subsets that we want to support. Right now, avx512
means skylake, so you may want to rename that flag to "avx512skl", and add
a new runtime flag + check for the icelake subset called "avx512icl". Then
in your implementations, you use the appropriate flag, and code components
can individually choose to use skylake- and/or icelake-optimized ax512
functions.

Ronald


More information about the ffmpeg-devel mailing list