🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #597

Re: vector length CSR?

#597
From: EricP
Date: Sun, 08 Nov 2026 20:40
93 lines
5310 bytes
On 2026-Nov-08 10:03, Robert Finch wrote:
> 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.


I've been looking at some docs on a RV-Vector unit called Saturn
that sounds similar to what you describe - mapping dynamic
vector length and width onto available hardware.

While browsing arxiv the paper on the scheduler that caught my eye as it
sounded similar to Mitch's VVM and I have been backtracking on the topic.
But I haven't read them closely yet so I could be way off.

Anyway here are some PDF links:

The Saturn Microarchitecture Manual, 2024
https://www2.eecs.berkeley.edu/Pubs/TechRpts/2024/EECS-2024-215.html

Design Techniques for Specialized Short-Vector Machines, 2025
https://escholarship.org/uc/item/1tv3m0vb

Instruction Scheduling in the Saturn Vector Unit, 2024
https://arxiv.org/abs/2412.00997


Technical Details
Message-ID: <775IS.5476$Ii3.650@fx18.iad>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!news-out.netnews.com!s1-2.netnews.com!peer05.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.iad.POSTED!not-for-mail
References: <11cpqih$acf5$1@dont-email.me> <sgu0flpndaqltpdbft40fghmi7vk78q2hs@4ax.com> <11cq2v7$dh5b$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!news-out.netnews.com!s1-2.netnews.com!peer05.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: vector length CSR?
Newsgroups: comp.arch
References: <11cpqih$acf5$1@dont-email.me> <sgu0flpndaqltpdbft40fghmi7vk78q2hs@4ax.com> <11cq2v7$dh5b$1@dont-email.me>
Content-Language: en-CA
From: EricP <ThatWouldBeTelling@thevillage.com>
In-Reply-To: <11cq2v7$dh5b$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 93
Message-ID: <775IS.5476$Ii3.650@fx18.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Sun, 08 Nov 2026 20:40:35 UTC
Date: Sun, 8 Nov 2026 15:40:34 -0500
X-Received-Bytes: 4990