File: less-than-8-bit-without-requantization.txt

package info (click to toggle)
gemmlowp 0.0~git20211220.e844ffd-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 5,752 kB
  • sloc: cpp: 113,898; ansic: 9,221; python: 3,251; sh: 79; objc: 55; makefile: 16
file content (15 lines) | stat: -rw-r--r-- 962 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
TODO: Discard the old requantization stuff, keep less-than-8-bit kernels, expose
them as a different contract whereby the user specifies that operands use less
than 8 bits.

Read: doc/less-than-8-bit.md

This is about going from "the present" to "the future" as described there.

Discard all requantization stuff.

Probably no need to worry about compatibility, this was little used.

Instead, add a new option, in the form of new "bit depth params", whereby the user can specify that operands use less than 8 bits (even though they are represented as std::uint8_t). For example, specifying 6 bits would mean that the contract is that the user guarantees that LHS matrix entries are in the [0, 63] interval.

Then make use of that to select kernels that take advantage of the lower bit depth. The existing less-than-8bit kernels would work as-is, only now no requantization would be needed anymore in the packing stage, and not rescaling in the unpacking stage.