Article View: comp.arch
Article #588Re: vector length CSR?
From: Robert Finch
Date: Sun, 08 Nov 2026 15:03
Date: Sun, 08 Nov 2026 15:03
88 lines
4765 bytes
4765 bytes
On 2026-11-08 9:02 a.m., George Neuner wrote: > On Sun, 8 Nov 2026 07:39:44 -0500, Robert Finch <robfi680@gmail.com> > wrote: > >> I tried asking the web-browser this and it returned a bunch of links to >> introduction to vectors. >> >> Am I right in thinking that the vector length and element size are >> basically stable throughout an application? > > Certainly not. > Ugh. > Element width may remain stable across many operations, but you can > expect that different widths may be needed at different times. > > Vector lengths, however, often change frequently. > > >> If so, they can be stored in a config register. > > If you are referring to a separate (Cray style) vector processor, or > to a streaming unit, the width and length would be in setup registers > in any case. > > >> Otherwise, if they need to be changeable on a dynamic >> basis they would have to be processed like a GPR with renaming etc. >> Updating a CSR is rather slow as updates do not take place until commit >> time. > > You can't change the setup while the vector unit is operating anyway. > However, there is no reason changes can't be queued to happen as soon > as the unit is finished. > > >> ATM the config is just wired directly into the micro-op translate stage >> which would have really poor performance if things need to be modified >> on the fly. > > "On the fly" meaning what? You can't change the setup /while/ the > vector unit is in operation. > > Needing to frequently change element widths and/or vector lengths is > the domain of the short-vector SIMD many chips now have. > > >> I looked at the RISCV vector extension model and they have it just as a >> CSR. Makes me think that is an acceptable solution. > > It is for the case where the vector unit is separate and asynchronous. I did not realize that was the use case for RISCV. Brain dump design issues. Qupls is not going to have a separate asynchronous vector unit. Vectors are supported using the GPR register file by hiding the issuing of multiple instructions behind the scenes and relying on parallelism in the OoO design. How vectors are supported in Qupls may need re-thinking. The vector length is being used to set the number of 64-bit registers needed to represent a vector at the micro-op encoding stage, before the register file is read. That cannot be done ff the length has to change frequently. Using a fixed number of registers might be better. For frequent changes the config would end up being passed around as another operand to vector instructions. Making the core larger = slower. It is a toss-up I think. Using a fixed number of registers will occupy more execution units, mean more micro-ops will be fetched and dispatched and slow things down. On the other hand waiting 20 cycles or so for the length changes to percolate through the pipeline is not fast either. May have both static length settings and dynamic length settings then. Using the static setting to set a maximum before the app is running and using dynamic lengths while executing code. Static length would set the number of micro-ops needed per vector instruction. Dynamic length would set the vector masking. Maybe too complex to understand, having two different length settings. Vector masking could be used to control the vector length dynamically. Rather than change the vector length, change the masking.
Technical Details
Message-ID:
<11cq2v7$dh5b$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11cpqih$acf5$1@dont-email.me> <sgu0flpndaqltpdbft40fghmi7vk78q2hs@4ax.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Robert Finch <robfi680@gmail.com> Newsgroups: comp.arch Subject: Re: vector length CSR? Date: Sun, 8 Nov 2026 10:03:01 -0500 Organization: A noiseless patient Spider Lines: 88 Message-ID: <11cq2v7$dh5b$1@dont-email.me> References: <11cpqih$acf5$1@dont-email.me> <sgu0flpndaqltpdbft40fghmi7vk78q2hs@4ax.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 08 Nov 2026 15:03:04 +0000 (UTC) Injection-Info: dont-email.me; logging-data="443563"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lb1uEyPJ7UV6AEE/fWIC+uu2b2ETs8qs="; posting-host="8056d61dab7af1222809f624b61edb2f" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:vwpv4TV7/+roUNejgmKdB4TscUY= sha256:tQpGN7FJK/zE5pUIOAI9ClCZ+sBMqQ3v7iL715vmk0o= sha1:lQIjcPkAOZqr3Qvc6yLTAF9swA0= sha256:X7Zk8XuZ1ApOYRUAeeecM83bEjeCFIBPrhX37Cp9Bs8= In-Reply-To: <sgu0flpndaqltpdbft40fghmi7vk78q2hs@4ax.com> Content-Language: en-US