Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Rémi Denis-Courmont" <remi@remlab.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [FFmpeg-devel, v2] gcc: Relaxing auto-vectorization limitation.
Date: Fri, 30 May 2025 10:36:09 +0300
Message-ID: <A2BC0480-7556-4A11-9683-F439A39DCD01@remlab.net> (raw)
In-Reply-To: <20250529160224.GB29660@pb2>



Le 29 mai 2025 19:02:24 GMT+03:00, Michael Niedermayer <michael@niedermayer.cc> a écrit :
>can gcc or clang not build code like our runtime cpudetect ?

You can, on some versions and some architectures, select the target CPU per function, but you can't select multiple targets, nor have the compiler automatically select "relevant" targets (i.e. those that it can optimise differently).

>i mean build functions for each major type and detect cpu once
>and switch accordingly ?

GCC supports resolving a symbol at runtime, but it requires support from the run-time linker (of course), which is not portable. I'm not sure if anything other than GNU/libc actually supports it.

And it requires a lot of boilerplate (less than FFmpeg's approach but still).

>I cannot be the first person thinking of that

No, indeed - auto vectorisation has been a thing for twenty years. But, either nobody has cared to fund that runtime detection bit, or compiler developers somehow block that work on some technical basis. My uninformed guess is the former.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2025-05-30  7:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-29  7:03 Jiawei
2025-05-29  8:37 ` Zhao Zhili
2025-05-29 10:20   ` Jiawei
2025-05-29 10:53     ` Zhao Zhili
2025-05-29 13:35     ` Frank Plowman
2025-05-29 16:02   ` Michael Niedermayer
2025-05-29 17:26     ` Andreas Rheinhardt
2025-05-29 19:06       ` Michael Niedermayer
2025-05-30  7:36     ` Rémi Denis-Courmont [this message]
2025-06-12  9:05   ` Martin Storsjö

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A2BC0480-7556-4A11-9683-F439A39DCD01@remlab.net \
    --to=remi@remlab.net \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git