[Libre-soc-isa] [Bug 1183] add /mrr mode (reverse mode) to Data-Dependent Fail-First CR_ops
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Thu Oct 12 20:54:44 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=1183
--- Comment #4 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #3)
> imo SNZ is quite low priority for simple and mapreduce modes since all it
> can do is set the output to 1,
no: it inverts the *predicate* bit, otherwise set to zero,
so that it is TRUE rather than false.
again i reiterate: see sv.bc
> it has no effect like in fail-first.
this is not true.
> I think higher priority is supporting zz=0
your opinion here is invalid as you have misunderstood SNZ.
> Another thing I realized while working on divmod, it would be really handy
> if stuff with a scalar destination would run through all elements instead of
> stopping at the first, I didn't check if we do that.
that's exactly what /mr does. jacob this has been in the spec for
well over 18 months, possibly as long as 2 years. i am a little
alarmed that you are suggesting things that have been in the spec
that long.
although i will need to evaluate below to check...
> This is useful for not
> overwriting all the CRs that you could be storing some other variable in.
>
> e.g.:
> sv.cmpi/ff=lt 0, 1, *10, 5
> is:
> i = 0
> while i < VL:
> CR0 = cmpd(gpr[10 + i], 5)
> if CR0.lt:
> break
> i += 1
> VL = i
yep that's ddffirst with mapreduce.
> note how only CR0 is ever written and yet the whole vector loop is run
that will - should - be sv.cmpi/ff=lt/mr
(this is another good unit test to have, will
add it to the list)
/mr simply switches off the normal "terminate at first scalar"
(which with no predication is the first element).
mr can be *used* for reduction because a scalar may be used as
src and dest and therefore as an accumulator. but it has many
more uses.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Libre-SOC-ISA
mailing list