[libre-riscv-dev] [isa-dev] Re: Vector Operations Extension (cross, dot, length, lerp, slerp)

Luke Kenneth Casson Leighton lkcl at lkcl.net
Tue Oct 8 05:43:07 BST 2019


On Tue, Oct 8, 2019 at 2:46 AM Hendrik Boom <hendrik at topoi.pooq.com> wrote:
>
> On Sun, Oct 06, 2019 at 10:36:37PM -0700, Jacob Lifshay wrote:
> > On Sat, Oct 5, 2019 at 2:39 AM lkcl <luke.leighton at gmail.com> wrote:
> > >
> > > http://bugs.libre-riscv.org/show_bug.cgi?id=142
> > > (Tracking this extension here)
> > >
> > > Found a paper which describes vector normalisation in terms of dotproduct, scalar recipsqrt and then scalar-vector fmul.
> >
> > Yeah, that's the standard procedure.
> >
> > > With VLENGTH being also expressible as dotproduct followed by scalar sqrt, is it reasonable to have both normalisation as well as VLENGTH as macro op fused sequences?
>
> Vector length would presumably involve dotting a vector with itself.
> The potential advantage I see is that the dot product might be tempted
> to read that vector twice; whereas the length would only read it once.
> If some other mechanism eliminates the duplicate read, they would be
> pretty well equivalent.

good point - appreciated as something to keep an eye on.  the same
underlying hardware would be used on a micro-coded vlength however the
copy of the arguments, read once, would be sent to that hardware,
rather than read twice.

l.



More information about the libre-riscv-dev mailing list