Skip to content

Commit b39283c

Browse files
committedDec 14, 2016
Doc fixes
1 parent 8c9e551 commit b39283c

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed
 

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ reference implementations anyway, you can override the error by specifying
6262

6363
Details of what it takes to make an efficient port of gemmlowp, namely writing a
6464
suitable GEMM kernel and accompanying packing code, are explained in this file:
65-
[doc/kernels.md](doc/kernels.md).
65+
[doc/kernel.md](doc/kernel.md).
6666

6767
## Public interfaces
6868

‎doc/low-precision.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,14 @@ be interpreted during the matrix computation: - lhs_offset - rhs_offset -
6363
result_offset - result_mult_int - result_shift
6464

6565
In that legacy paradigm, the mathematical expression to be computed is the
66-
result of the following steps: 1. Cast lhs entries from uint8 to int32 and add
67-
lhs_offset to each of them. 2. Cast rhs entries from uint8 to int32 and add
68-
rhs_offset to each of them. 3. Compute the int32 matrix product of the resulting
69-
lhs times rhs. 4. Add result_offset to each entry of the result. 5. Multiply
70-
each entry of the result by the following fraction, and round to the nearest
71-
integer:
66+
result of the following steps:
67+
68+
1. Cast lhs entries from uint8 to int32 and add lhs_offset to each of them.
69+
2. Cast rhs entries from uint8 to int32 and add rhs_offset to each of them.
70+
3. Compute the int32 matrix product of the resulting lhs times rhs.
71+
4. Add result_offset to each entry of the result.
72+
5. Multiply each entry of the result by the following fraction, and round to
73+
the nearest integer:
7274

7375
```
7476
result_mult_int

‎doc/quantization_example.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class MatrixWithStorage {
155155
public:
156156
MatrixWithStorage(int rows, int cols)
157157
: storage(rows * cols), matrix_map(storage.data(), rows, cols) {}
158-
void MakeRandomStorage() {
158+
void MakeRandom() {
159159
static std::mt19937 random_engine;
160160
std::uniform_real_distribution<float> distribution(-1, 1);
161161
for (auto& x : storage) {
@@ -252,9 +252,9 @@ int main() {
252252
<< "and compute their product.\n"
253253
<< std::endl;
254254
MatrixWithStorage<float, kOrder> float_lhs(rows, depth);
255-
float_lhs.MakeRandomStorage();
255+
float_lhs.MakeRandom();
256256
MatrixWithStorage<float, kOrder> float_rhs(depth, cols);
257-
float_rhs.MakeRandomStorage();
257+
float_rhs.MakeRandom();
258258
MatrixWithStorage<float, kOrder> reference_float_result(rows, cols);
259259
auto reference_float_result_map = reference_float_result.Map();
260260
FloatMatrixMultiplication(float_lhs.ConstMap(), float_rhs.ConstMap(),

0 commit comments

Comments
 (0)
Please sign in to comment.