Article View: comp.arch
Article #929Re: vector length CSR?
From: Stephen Fuld
Date: Tue, 24 Nov 2026 20:12
Date: Tue, 24 Nov 2026 20:12
63 lines
4490 bytes
4490 bytes
On 11/9/2026 9:08 AM, Stephen Fuld wrote: I issued the following "challenge". > I can't speak to the hardware complexity of the implementation. Perhaps > that is a limiting factor. But barring that, and the mental effort > required to "reorient" your thinking, I don't see why any new clean > sheet design would use SIMD instructions. Perhaps someone can explain > why it should. The results were, at least to me, quite enlightening. I think it might be useful to summarize these responses. I group the types of problems that people thought SIMD was better at than VVM into three areas. The first group is exemplified by Anton bringing up the types of problems where memory values are reused in the vector registers. He gave matrix multiplication as an example. Terje presented an algorithm which others indicated was competitive with the SIMD method. Note that I am not ruling out that there may be other problems that fit into this group but aren't amenable to the kind of solution Terje presented. So I count that as worst case, a "tie". But so far, not a compelling argument for SIMD. The second group is "reductions" of various types. Mostly, this came down to the question of whether the operation on the given data type could be parallelized or "reassociated". I think we have come down to the following: For operations on unsigned integers, or on signed integers with certain compile options, and operations such as MAX, VVM has the advantage as it can parallelize them and, perhaps with some additional design work by Mitch, combine the partial results at the end, including handling sizes that are not a integer multiple of the amount of parallelization. This seems like a big win for VVM. For operations on signed integers where preserving possible internal overflows, etc. are required VVM can't parallelize them (signified by specifying 1 in the number of lanes field in the VEC instruction). But there is still a more modest advantage for VVM in that reading the data from memory doesn't "scrub" the cache, and the loop termination test is a single instruction. For operations on floating point, with some "not yet filed" stuff, VVM has the advantage in that the operation can be parallelized without loss of precision. So overall, for this second group, I see no argument for SIMD. The third group, and one we really haven't discussed in this thread beyond Thomas' first mention is wide permutations. I wasn't familiar with the relevant capabilities in AVX512, so I had to do a little research. While My 66000 has a permute instruction, and perhaps if preceded by a Double instruction modifier can be wider, I don't see how it can compete with the 512 byte wide permutation in three cycles provided by AVX512, nor the capability to do byte wide permutes where the source isn't required to be a 8 bit boundary. So if these kinds of operations are used often, then SIMD may be a requirement. Of course, I welcome comments, additions, subtractions (!), etc. -- - Stephen Fuld (e-mail address disguised to prevent spam)
Technical Details
Message-ID:
<11e4r47$3582p$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11cpqih$acf5$1@dont-email.me> <sgu0flpndaqltpdbft40fghmi7vk78q2hs@4ax.com> <11cq2v7$dh5b$1@dont-email.me> <8jk1fl182pskj3fsmp4ju6qf420pgl0htg@4ax.com> <11csull$1ef6e$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Stephen Fuld <sfuld@alumni.cmu.edu.invalid> Newsgroups: comp.arch Subject: Re: vector length CSR? Date: Tue, 24 Nov 2026 12:12:53 -0800 Organization: A noiseless patient Spider Lines: 63 Message-ID: <11e4r47$3582p$1@dont-email.me> References: <11cpqih$acf5$1@dont-email.me> <sgu0flpndaqltpdbft40fghmi7vk78q2hs@4ax.com> <11cq2v7$dh5b$1@dont-email.me> <8jk1fl182pskj3fsmp4ju6qf420pgl0htg@4ax.com> <11csull$1ef6e$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 24 Nov 2026 20:12:56 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3317849"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DdF/LaYZSJleEgsb0yfSlG9RnLD6Brn4="; posting-host="7c846c2150cdc7ac4dbca359ea9b8163" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:98tawFB/ktLUImRI2TXwppsea5o= sha256:1MVcYrtQllSdzSaoSxxRcpBFU5S3pn7JiktiO5LKpec= sha1:pDcLYRiv8gBAz8CBozRIZEANClE= sha256:O8VrJHEWborNyvKXNHnIX1bTMk+dnnpjsanlj48+VqY= In-Reply-To: <11csull$1ef6e$1@dont-email.me> Content-Language: en-US