From: Lynne <dev@lynne.ee> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 1/3] riscv: add CPU flags for the RISC-V Vector extension Date: Sun, 4 Sep 2022 08:39:36 +0200 (CEST) Message-ID: <NB6DSv1--3-2@lynne.ee> (raw) In-Reply-To: <4736989.GXAFRqVoOG@basile.remlab.net> Sep 4, 2022, 07:41 by remi@remlab.net: > Le sunnuntaina 4. syyskuuta 2022, 0.38.32 EEST Lynne a écrit : > >> I need to know the length in C, not assembly. >> > > There may be some corner cases where that makes sense, but typically it > doesn't. Even if you're dealing in fixed-size macro blocks, you should leverage > the larger vectors to unroll and process multiple macro blocks in parallel. > Some aspects of a split-radix FFT work better if you know how much you could fit into a register upfront. In particular, doing the tail, which consists of 2 equal length transforms. On AVX we interleave the coefficients from 2x4pt transforms during lookups since we can do them simultaneously and save on shuffles. Doing them individually wouldn't be as efficient. Since interleaving is done during the permute step, we have to know from C how much to interleave. Of course if you switched away from a split-radix algorithm (X+X/2+X/2), you could have a very simple 100-line FFT if you had arbitrarily long vectors (or the pretense of such), but if you didn't have the hardware to back that up, the penalty for using a suboptimal algorithm wouldn't be worth it. > And besides, how do you want to get the value if not with assembler? This is > currently not found in ELF HWCAP and probably never will be. > Sucks, knowing how wide the units are is as important as knowing how much L1 cache you have for me. > I disagree. There are currently no means to negotiate a vector length with the > OS, so that seems highly premature. And even if there was such a mechanism, > it's simply much faster to call VSETVL in an inline assembler macro where > needed than to compute the whole set of CPU flags. > Guess that's what I'll have to do.In due time anyway, who knows how many years it'll be until a cheap enough device appears with vector support that doesn't merely do what SVE2 devices did by reusing old NEON unit designs. _______________________________________________ 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".
next prev parent reply other threads:[~2022-09-04 6:39 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-03 19:01 [FFmpeg-devel] [PATCHv1 0/3] Float DSP for RISC-V Vector extension - part I Rémi Denis-Courmont 2022-09-03 19:01 ` [FFmpeg-devel] [PATCH 1/3] riscv: add CPU flags for the RISC-V Vector extension remi 2022-09-03 19:05 ` Rémi Denis-Courmont 2022-09-03 19:20 ` Lynne 2022-09-03 19:59 ` Rémi Denis-Courmont 2022-09-03 21:38 ` Lynne 2022-09-04 5:41 ` Rémi Denis-Courmont 2022-09-04 6:39 ` Lynne [this message] 2022-09-04 8:27 ` Rémi Denis-Courmont 2022-09-03 19:01 ` [FFmpeg-devel] [PATCH 2/3] riscv: initial common header for assembler macros remi 2022-09-03 19:01 ` [FFmpeg-devel] [PATCH 3/3] riscv: add float vector-scalar multiplication remi 2022-09-03 19:11 ` Lynne 2022-09-03 19:34 ` Rémi Denis-Courmont 2022-09-03 19:48 ` Lynne 2022-09-03 20:01 ` Rémi Denis-Courmont
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=NB6DSv1--3-2@lynne.ee \ --to=dev@lynne.ee \ --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