[Zvdot4a8i] Extension for vector dot product (4-element, 8-bit integer) Version 0.1#2576
[Zvdot4a8i] Extension for vector dot product (4-element, 8-bit integer) Version 0.1#2576nibrunieAtSi5 wants to merge 11 commits intoriscv:mainfrom
Conversation
Importing the work done by Ken Docker and others in service of https://riscv.atlassian.net/browse/RVS-1971 from https://github.com/riscv/riscv-dot-product into the official riscv-isa-manual repo. Changelog: * Concatenating all asciidoc file into a single chapter * Modifying chapter/section/sub-section levels to match the RISC-V ISA manual hierarchy. * Importing encoding png pictures and svg diagram (encodings will need to be inlined)
aswaterman
left a comment
There was a problem hiding this comment.
At least superficially this looks good. I think it's time to push it to the next stage in the process.
src/vector-dot.adoc
Outdated
| ==== vdota4.[vv,vx] | ||
|
|
||
| Synopsis:: | ||
| Vector 8-bit Signed-Signed Dot Product |
There was a problem hiding this comment.
Should this mention that 4 elements are accmulated together? That would be more important if more SEWs become supported.
There was a problem hiding this comment.
Should this say SEW/4-bit to match the vdota4u synopsis?
There was a problem hiding this comment.
Good idea, I think we could actually get rid of the SEW/4 mentions in the Title and Synopsys (the appear) later and focus on the fact that those are 4-element Dot Product Accumulates
src/vector-dot.adoc
Outdated
| whereas each `SEW`-bit element of `vd` is interpreted as a single `SEW`-bit signed integer. | ||
| For each pair of elements taken consecutively from `vs1` and `vs2`, | ||
| the associated sub-element lists are multiplied componentwise, | ||
| widening (with sign-extension) to `SEW` bits. |
There was a problem hiding this comment.
Should this sentence be updated to say that vs1 is zero extended and vs2 is signed extended. Currently, the stence is identical to vdota4.
There was a problem hiding this comment.
I believe we always perform sign extension on the products (since this is signed-unsigned, the products are signed and must be sign extended).
The difference with respect to vdot4a is actually on the signedness of the product operands, so if we need to make a change it would be on the previous sentence (or mention that the products are signed values).
There was a problem hiding this comment.
Ok. Re-reading that sentence it is just talking about widening the products before adding them together. It's not stated that the products are SEW/2 bits wide.
Co-authored-by: Craig Topper <craig.topper@sifive.com> Signed-off-by: Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com>
|
A question about naming, is there a specific reason tha we don't use |
|
I would parse the name as "4-input dot product, with accumulation, of 8-bit integers". It's not that it's inconsistent with the matrix extensions; it's that the fixed-input dot-product instructions have a different naming scheme than the matrix extensions for legitimate reasons. I would argue that for a dot product with a fixed number of inputs, including that number in the name is more important. (The accumulator being 32 bits is implied by the fact that this is a non-widening instruction, so the output elements are the same size as the input elements, i.e. 4x8.) |
|
Is there a version number be we can use in toolchains? The 0.0.1 version in the existing spec for Zvqdotq has been giving us trouble in the toolchain riscv/riscv-dot-product#11 |
Signed-off-by: Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com>
I have added an implicit version number 6b0d5ef This bumps it up from the original 0.0.1 (@aswaterman that the renaming mandated such a change anyway) |
It seems the 4D term was confusing so we are renaming the extension to Zvodt4a8i Vector 4-element Dot Product of packed 8-bit Integers
The renaming PR is here: riscv/riscv-isa-manual#2576
The renaming PR is here: riscv/riscv-isa-manual#2576 Note that this also update the version number.
The renaming PR is here: riscv/riscv-isa-manual#2576 Note that this also update the version number.
Co-authored-by: Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com> Signed-off-by: Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com>
Specification of a new vector ISA extension for constant size (4D) vector dot product of integers (for now limited to 8-bit values).
This PR imports changes made by @kdockser and others in https://github.com/riscv/riscv-dot-product from the standalone repo to riscv-isa-manual. It also implements ARC's feedback.