[Libre-soc-dev] cray-style vector of 40 years setting VL=0 at runtime

Jacob Lifshay programmerjake at gmail.com
Tue Oct 4 17:04:00 BST 2022


On Tue, Oct 4, 2022, 05:48 lkcl <luke.leighton at gmail.com> wrote:

> summary so far, almost complete:
> https://libre-soc.org/openpower/sv/svp64/discussion/
>

looks mostly good.

it would also be useful to have an example where setvl is used to
dynamically set vl where it could be zero and then need to use
unconditional scalar/subvector ops.

maybe extract the example from svp64 utf-8 validation?

i just realized packed SIMD isn't such a good motivation because if we know
VL=4, sv.add/subvl=2 r12, r14, r16 already just executes exactly one
subvector with 2 elements as is needed for emulating 128-bit packed SIMD.

this therefore leaves two issues to decide:
>
> 1) is the cost in hardware of actually having to decode the
> instruction Suffix *and* the EXTRA2/3 *and* Fail-First mode
> *and* skipping SV.Branch instructions in order to Auto-set
> VL=1 okay?
>
> that's a hell of a lot of gates right at a critical "Issue" juncture,
> which would otherwise just require checking for any changes
> to SVSTATE.
>
> given that Fail-First *already* has to be searched for due to its
> interaction with SVSTATE.VL, given that setvl etc. has to be
> searched for, perhaps it is not relatively high
>

imho given that register numbers have to be decoded in the issue pipeline
to set the dependency matrixes correctly anyway (or register renaming for
more traditional OoO microarchitectures, or register dependencies for
stalling on in-order microarchitectures), it shouldn't be that huge of a
problem.

>
> 2) is losing the ability to test all *relevant* bits of a predicate mask
> worth it?


> this is a big unknown, i honestly have no idea as to how useful
> this previously undiscovered behaviour would be.
>
> thoughts please.


imho if fail-first is illegal in scalar mode, the fail-first bits could
instead be reused only for scalar mode to instead be please-give-me-full-vl
mode (with a better name). this retains basically all relevant behavior
since afaict fail-first wasn't that useful for scalar mode even without
VL=1 overrides.

what do you think?

Jacob


More information about the Libre-soc-dev mailing list