Re: [PATCH] Fix CPU feature detection for fma3, avx512 and avx512icl
Zuxy Meng <[email protected]> Sun, 12 Nov 2023 17:22:06 -0800
| Newsgroups | gmane.comp.video.mplayer.devel |
|---|---|
| Message-ID | <CA+LKdESRDiKb8vP3mtpBD0A0DJ9f_+nyLG0+vZ7yYaG0Z0t19A@mail.gmail.com> |
On Sun, Nov 12, 2023 at 1:59 AM Reimar Döffinger <[email protected]> wrote: > > Hi! > > > On 11 Nov 2023, at 02:01, Zuxy Meng <[email protected]> wrote: > > > > On Fri, Nov 10, 2023 at 5:18 AM Reimar Döffinger > > <[email protected]> wrote: > [...] > >>>> but it has since become very wordy. Can we simplify it to check only > >>>> one cpuinfo word for each feature based on > >>>> https://en.wikipedia.org/wiki/AVX-512#CPUs_with_AVX-512? For example, > >>>> check avx512dq for baseline and avx512_vnni for avx512icl. ffmpeg will > >>>> do its own run time check anyway. > >> > >> Is there a point in checking for that? MPlayer has no AVX code, and not > >> sure there's much point adding any, and FFmpeg always does runtime detection, > >> so we only need to check assembler support and can ignore the cpuid stuff. > > > > Make sense. Let's simplify it. cpuid check can still be helpful if one > > doesn't even want to compile any AVX512 code > > I expect the savings would be so little no-one will care. > But I guess in theory you are right. > The patch seems ok to me, though I've not carefully reviewed/tested. Thanks! Applied. > > >>> Unfortunately it breaks build because yasm doesn’t support these fancy new > >>> instructions. Let me craft another patch to migrate us to nasm first. > >> > >> We already support nasm, but sure, can flip the default to it. > > > > Thanks! I didn't know that. I'm happy about passing '--yasm=nasm' for now. > > I think it would make sense to change the default... > It actually used to be the default along time ago until FFmpeg > started requiring yasm features. Seems it has flipped again... Yes it happened several years ago. But yasm went out of maintenance even before that. Anyway committed a patch to change the default to nasm. -- Zuxy Beauty is truth, While truth is beauty. PGP KeyID: E8555ED6 _______________________________________________ MPlayer-dev-eng mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng