Skip to content

Commit cabc4ee

Browse files
authored
Auto quantization (#2)
* sync issue-633 * Issue-637---improve-test-framework. * rewrite test framework with tic-tok * Issue-637---improve-test-framework. * clone a dummy function for functions that are generated before * Issue-637---improve-test-framework. * remove the children functions if the parent function has been deleted * Issue-637---improve-test-framework. * remove from callerMap when the function is deleted; always keep the 'important' function to the bottomer pos than 'dummy' or 'new' one * Issue-637---improve-test-framework. * remove unused functions * Issue-637---improve-test-framework. * the range of GEP can be negative; the range of SHR cannot be negative * Issue-637---improve-test-framework. * the range of GEP can be negative; the range of SHR cannot be negative * Issue-637---improve-test-framework. * use a flag to control * Issue-637---improve-test-framework. * fix bug of issue-639 * Issue-637---improve-test-framework. * reset bmx055yAcceleration * Issue-637---improve-test-framework. * fix the result error of sincosf, but the performance become worse. Check issue 641 * Issue-637---improve-test-framework. * reconstruct auto_test, and collect timer info * Issue-637---improve-test-framework. * get the function results * Issue-637---improve-test-framework. * add timer collection and correctness check to the test framework * Issue-637---improve-test-framework. * reformat code * Issue-637---improve-test-framework. * sync issue-637 Addresses #642. * ignore this case if it slow down Addresses #642. * fix commnets * Issue-637---improve-test-framework. * fix bugs with type conversion and range of sub Addresses #642. * fix bug of range of sqrt Addresses #642. * remove caller tree Addresses #642. * fix bug of result error in sincosf test case Addresses #642. * call global_DEC after overload function Addresses #642. * reinterpret cast double to integer value when meeting shift operand; use llvm API to swap operands of cmp inst Addresses #642. * fix the bug of shift operator Addresses #642. * add unit test of shift operand Addresses #642. * change one set of param Addresses #642. * fix bugs of cfg simp Addresses #642. * fix bug of shl Addresses #642. * shl should be positive Addresses #642. * update the ponter operand after function call Addresses #642. * I think the first operand of shl should be unsigned Addresses #642. * merge issue-628 manually Addresses #644. * upload memory alignment manually Addresses #644. * only shrink int type to promise correctness Addresses #644. * if one value shrink from high signed type to low unsigned type, like to , we should update the related sign flag Addresses #644. * ignore sign operand Addresses #644. * only overload function after cfg Addresses #647. * check if subProgram is nullptr Addresses #647. * update inst sign flag for signed instructions Addresses #647. * only record lib size reduced Addresses #647. * it can be bool type Addresses #647. * we shouldn't remove srcInst, as it may be used in the latter instructions Addresses #647. * perf test of madgwick localy Addresses #647. * upload input date for madgwick Addresses #647. * add return check in auto test Addresses #647. * break down performance Addresses #647. * it may run out of memory if iterate 10 times, so change to 5 Addresses #647. * we should use bash -c in system call Addresses #647. * mistake change of the last commit Addresses #647. * match castInst before shrinkage Addresses #647. * first version of kalman locally Addresses #647. * remove kalman local test; reset the modification of pedometer Addresses #647. * add nullptr check Addresses #647. * skip matching the destination type of GEP when its operand is a aggregate type Addresses #647. * const substitution skip the pointer Addresses #647. * update the overall perf in the script Addresses #647. * update get_break_down Addresses #647. * upload break down result Addresses #647. * update break down script Addresses #647. * use 0-200 Addresses #647. * set args Addresses #647. * remove log file Addresses #647. * lhs of shl can be negative Addresses #649. * fix sign bit Addresses #649. * remove INT1 type compression Addresses #649. * to simplify the problem, only keep signed types Addresses #649. * use macro to control unsigned shrink Addresses #649. * reset bmx055 nt file Addresses #647. * test with/without bitwise/modulo op Addresses #647. * add Os option Addresses #647. * fix macro define Addresses #647. * Issue 651 - Implementation of auto-quantization (#652) * merge issue-647 Addresses #651. * add and correct accuracy in nt file Addresses #651. * correct test.nt Addresses #651. * upload Madgwick FP code Addresses #651. * compile Madgwick with different configs Addresses #651. * add some test config Addresses #651. * fix compile error of different version of Madgwick Addresses #651. * add SOFT_FLOAT config and show compile message Addresses #651. * builtin_assume test with Madgwick Addresses #653. * modify plot script for real sensor ranges Addresses #653. * set enableOverload and enableBuiltinAssume as options Addresses #653. * add enableOverload and enableBuiltinAssume config in markdown and makefile Addresses #653. * update Makefile by passing options in command line Addresses #653. * use DEBUG macro in e_exp.c Addresses #653. * add debug macro to some micro-benchmarks Addresses #653. * fix bugs of softfloat micro benchmarks Addresses #653. * add lowerBound and upperBound macro Addresses #653. * upload builtin_assume test shell Addresses #653. * enable overload Addresses #653. * compile e_j0 and e_y0 with sin/cos ieee implementation Addresses #653. * fix figure format Addresses #653. * should remove redundant function first, then clean callerMap Addresses #653. * add plot bitwise figure script Addresses #653. * modify plot bitwise figure script Addresses #653. * fix madgwick params config Addresses #653. * check accuracy Addresses #653. * comment printf and type explicit fix Addresses #653. * considering time consumption, we use a simple version of mulfix Addresses #653. * use >> instead of multiply Addresses #653. * only revert the quantized values before and after the type cast block Addresses #653. * explicit quantize Addresses #653. * basic structure of auto-quantization Addresses #653. * implement alloca, call, store, etc Addresses #653. * implement fmul/fdiv with constant operand Addresses #653. * implement fneg Addresses #653. * implement fixmul Addresses #653. * fix alloca, call, bitcast and simplify constant Addresses #653. * single-func quantization Addresses #653.
1 parent a0b581d commit cabc4ee

File tree

80 files changed

+4888
-359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+4888
-359
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
changeset: 1484:037939ff02bddec74329ea92860048df64f63d75
3+
char kNewtonVersion[] = "0.3-alpha-1484 (037939ff02bddec74329ea92860048df64f63d75) (build 05-07-2023-13:[email protected]_64)";
4+
\n./src/noisy/noisy-linux-EN -O0 applications/noisy/helloWorld.n -s
5+
\n./src/newton/newton-linux-EN -v 0 -eP applications/newton/invariants/ViolinWithTemperatureDependence-pigroups.nt
6+
7+
Informational Report:
8+
---------------------
9+
Invariant "ViolinWithTemperatureDependenceForPiGroups" has 2 unique kernels, each with 2 column(s)...
10+
11+
Kernel 0 is a valid kernel:
12+
13+
1 1
14+
-0.5 -0
15+
1 0
16+
0.5 0
17+
0 -1
18+
-0 -1
19+
20+
21+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
22+
23+
Pi group 0, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^( 0) P5^(-0)
24+
25+
Pi group 0, Pi 1 is: P0^(-0) P1^( 1) P2^( 0) P3^( 0) P4^(-1) P5^(-1)
26+
27+
28+
Kernel 1 is a valid kernel:
29+
30+
1 0
31+
-0.5 1
32+
1 -2
33+
0.5 -1
34+
-0 -2
35+
0 -2
36+
37+
38+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
39+
40+
Pi group 1, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^(-0) P5^( 0)
41+
42+
Pi group 1, Pi 1 is: P0^( 1) P1^( 0) P2^(-1) P3^(-2) P4^(-2) P5^(-2)
43+
44+
45+
46+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
changeset: 1499:0e97c5693eba0399a0b980aa080ca2382e025ac3
3+
char kNewtonVersion[] = "0.3-alpha-1499 (0e97c5693eba0399a0b980aa080ca2382e025ac3) (build 06-06-2023-19:[email protected]_64)";
4+
\n./src/noisy/noisy-linux-EN -O0 applications/noisy/helloWorld.n -s
5+
\n./src/newton/newton-linux-EN -v 0 -eP applications/newton/invariants/ViolinWithTemperatureDependence-pigroups.nt
6+
7+
Informational Report:
8+
---------------------
9+
Invariant "ViolinWithTemperatureDependenceForPiGroups" has 2 unique kernels, each with 2 column(s)...
10+
11+
Kernel 0 is a valid kernel:
12+
13+
1 1
14+
-0.5 -0
15+
1 0
16+
0.5 0
17+
0 -1
18+
-0 -1
19+
20+
21+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
22+
23+
Pi group 0, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^( 0) P5^(-0)
24+
25+
Pi group 0, Pi 1 is: P0^(-0) P1^( 1) P2^( 0) P3^( 0) P4^(-1) P5^(-1)
26+
27+
28+
Kernel 1 is a valid kernel:
29+
30+
1 0
31+
-0.5 1
32+
1 -2
33+
0.5 -1
34+
-0 -2
35+
0 -2
36+
37+
38+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
39+
40+
Pi group 1, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^(-0) P5^( 0)
41+
42+
Pi group 1, Pi 1 is: P0^( 1) P1^( 0) P2^(-1) P3^(-2) P4^(-2) P5^(-2)
43+
44+
45+
46+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
changeset: 1489:0ea368e57710f6424cb888cebaff3fbd0e319897
3+
char kNewtonVersion[] = "0.3-alpha-1489 (0ea368e57710f6424cb888cebaff3fbd0e319897) (build 05-15-2023-18:[email protected]_64)";
4+
\n./src/noisy/noisy-linux-EN -O0 applications/noisy/helloWorld.n -s
5+
\n./src/newton/newton-linux-EN -v 0 -eP applications/newton/invariants/ViolinWithTemperatureDependence-pigroups.nt
6+
7+
Informational Report:
8+
---------------------
9+
Invariant "ViolinWithTemperatureDependenceForPiGroups" has 2 unique kernels, each with 2 column(s)...
10+
11+
Kernel 0 is a valid kernel:
12+
13+
1 1
14+
-0.5 -0
15+
1 0
16+
0.5 0
17+
0 -1
18+
-0 -1
19+
20+
21+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
22+
23+
Pi group 0, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^( 0) P5^(-0)
24+
25+
Pi group 0, Pi 1 is: P0^(-0) P1^( 1) P2^( 0) P3^( 0) P4^(-1) P5^(-1)
26+
27+
28+
Kernel 1 is a valid kernel:
29+
30+
1 0
31+
-0.5 1
32+
1 -2
33+
0.5 -1
34+
-0 -2
35+
0 -2
36+
37+
38+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
39+
40+
Pi group 1, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^(-0) P5^( 0)
41+
42+
Pi group 1, Pi 1 is: P0^( 1) P1^( 0) P2^(-1) P3^(-2) P4^(-2) P5^(-2)
43+
44+
45+
46+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
changeset: 1501:1991dd2af3a26c4a43535ed0171dd1ea373609d1
3+
char kNewtonVersion[] = "0.3-alpha-1501 (1991dd2af3a26c4a43535ed0171dd1ea373609d1) (build 06-07-2023-13:[email protected]_64)";
4+
\n./src/noisy/noisy-linux-EN -O0 applications/noisy/helloWorld.n -s
5+
\n./src/newton/newton-linux-EN -v 0 -eP applications/newton/invariants/ViolinWithTemperatureDependence-pigroups.nt
6+
7+
Informational Report:
8+
---------------------
9+
Invariant "ViolinWithTemperatureDependenceForPiGroups" has 2 unique kernels, each with 2 column(s)...
10+
11+
Kernel 0 is a valid kernel:
12+
13+
1 1
14+
-0.5 -0
15+
1 0
16+
0.5 0
17+
0 -1
18+
-0 -1
19+
20+
21+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
22+
23+
Pi group 0, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^( 0) P5^(-0)
24+
25+
Pi group 0, Pi 1 is: P0^(-0) P1^( 1) P2^( 0) P3^( 0) P4^(-1) P5^(-1)
26+
27+
28+
Kernel 1 is a valid kernel:
29+
30+
1 0
31+
-0.5 1
32+
1 -2
33+
0.5 -1
34+
-0 -2
35+
0 -2
36+
37+
38+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
39+
40+
Pi group 1, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^(-0) P5^( 0)
41+
42+
Pi group 1, Pi 1 is: P0^( 1) P1^( 0) P2^(-1) P3^(-2) P4^(-2) P5^(-2)
43+
44+
45+
46+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
changeset: 1481:1b9cd1f4be586422deeb7650e112634a8b818569
3+
char kNewtonVersion[] = "0.3-alpha-1481 (1b9cd1f4be586422deeb7650e112634a8b818569) (build 05-01-2023-20:[email protected]_64)";
4+
\n./src/noisy/noisy-linux-EN -O0 applications/noisy/helloWorld.n -s
5+
\n./src/newton/newton-linux-EN -v 0 -eP applications/newton/invariants/ViolinWithTemperatureDependence-pigroups.nt
6+
7+
Informational Report:
8+
---------------------
9+
Invariant "ViolinWithTemperatureDependenceForPiGroups" has 2 unique kernels, each with 2 column(s)...
10+
11+
Kernel 0 is a valid kernel:
12+
13+
1 1
14+
-0.5 -0
15+
1 0
16+
0.5 0
17+
0 -1
18+
-0 -1
19+
20+
21+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
22+
23+
Pi group 0, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^( 0) P5^(-0)
24+
25+
Pi group 0, Pi 1 is: P0^(-0) P1^( 1) P2^( 0) P3^( 0) P4^(-1) P5^(-1)
26+
27+
28+
Kernel 1 is a valid kernel:
29+
30+
1 0
31+
-0.5 1
32+
1 -2
33+
0.5 -1
34+
-0 -2
35+
0 -2
36+
37+
38+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
39+
40+
Pi group 1, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^(-0) P5^( 0)
41+
42+
Pi group 1, Pi 1 is: P0^( 1) P1^( 0) P2^(-1) P3^(-2) P4^(-2) P5^(-2)
43+
44+
45+
46+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
changeset: 1504:1f6ae86b5d7aad826042279c0d63ad1adca38ceb
3+
char kNewtonVersion[] = "0.3-alpha-1504 (1f6ae86b5d7aad826042279c0d63ad1adca38ceb) (build 06-07-2023-21:[email protected]_64)";
4+
\n./src/noisy/noisy-linux-EN -O0 applications/noisy/helloWorld.n -s
5+
\n./src/newton/newton-linux-EN -v 0 -eP applications/newton/invariants/ViolinWithTemperatureDependence-pigroups.nt
6+
7+
Informational Report:
8+
---------------------
9+
Invariant "ViolinWithTemperatureDependenceForPiGroups" has 2 unique kernels, each with 2 column(s)...
10+
11+
Kernel 0 is a valid kernel:
12+
13+
1 1
14+
-0.5 -0
15+
1 0
16+
0.5 0
17+
0 -1
18+
-0 -1
19+
20+
21+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
22+
23+
Pi group 0, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^( 0) P5^(-0)
24+
25+
Pi group 0, Pi 1 is: P0^(-0) P1^( 1) P2^( 0) P3^( 0) P4^(-1) P5^(-1)
26+
27+
28+
Kernel 1 is a valid kernel:
29+
30+
1 0
31+
-0.5 1
32+
1 -2
33+
0.5 -1
34+
-0 -2
35+
0 -2
36+
37+
38+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
39+
40+
Pi group 1, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^(-0) P5^( 0)
41+
42+
Pi group 1, Pi 1 is: P0^( 1) P1^( 0) P2^(-1) P3^(-2) P4^(-2) P5^(-2)
43+
44+
45+
46+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
changeset: 1482:2eda94ba67b6488d50f1ed827b16af60321719d2
3+
char kNewtonVersion[] = "0.3-alpha-1482 (2eda94ba67b6488d50f1ed827b16af60321719d2) (build 05-12-2023-17:[email protected]_64)";
4+
\n./src/noisy/noisy-linux-EN -O0 applications/noisy/helloWorld.n -s
5+
\n./src/newton/newton-linux-EN -v 0 -eP applications/newton/invariants/ViolinWithTemperatureDependence-pigroups.nt
6+
7+
Informational Report:
8+
---------------------
9+
Invariant "ViolinWithTemperatureDependenceForPiGroups" has 2 unique kernels, each with 2 column(s)...
10+
11+
Kernel 0 is a valid kernel:
12+
13+
1 1
14+
-0.5 -0
15+
1 0
16+
0.5 0
17+
0 -1
18+
-0 -1
19+
20+
21+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
22+
23+
Pi group 0, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^( 0) P5^(-0)
24+
25+
Pi group 0, Pi 1 is: P0^(-0) P1^( 1) P2^( 0) P3^( 0) P4^(-1) P5^(-1)
26+
27+
28+
Kernel 1 is a valid kernel:
29+
30+
1 0
31+
-0.5 1
32+
1 -2
33+
0.5 -1
34+
-0 -2
35+
0 -2
36+
37+
38+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
39+
40+
Pi group 1, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^(-0) P5^( 0)
41+
42+
Pi group 1, Pi 1 is: P0^( 1) P1^( 0) P2^(-1) P3^(-2) P4^(-2) P5^(-2)
43+
44+
45+
46+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
changeset: 1492:3eb50fb2fc3123aa810f455f00c9f1c545f75477
3+
char kNewtonVersion[] = "0.3-alpha-1492 (3eb50fb2fc3123aa810f455f00c9f1c545f75477) (build 05-17-2023-16:[email protected]_64)";
4+
\n./src/noisy/noisy-linux-EN -O0 applications/noisy/helloWorld.n -s
5+
\n./src/newton/newton-linux-EN -v 0 -eP applications/newton/invariants/ViolinWithTemperatureDependence-pigroups.nt
6+
7+
Informational Report:
8+
---------------------
9+
Invariant "ViolinWithTemperatureDependenceForPiGroups" has 2 unique kernels, each with 2 column(s)...
10+
11+
Kernel 0 is a valid kernel:
12+
13+
1 1
14+
-0.5 -0
15+
1 0
16+
0.5 0
17+
0 -1
18+
-0 -1
19+
20+
21+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
22+
23+
Pi group 0, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^( 0) P5^(-0)
24+
25+
Pi group 0, Pi 1 is: P0^(-0) P1^( 1) P2^( 0) P3^( 0) P4^(-1) P5^(-1)
26+
27+
28+
Kernel 1 is a valid kernel:
29+
30+
1 0
31+
-0.5 1
32+
1 -2
33+
0.5 -1
34+
-0 -2
35+
0 -2
36+
37+
38+
The ordering of parameters is: P1 P0 P3 P2 P4 P5
39+
40+
Pi group 1, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^(-0) P5^( 0)
41+
42+
Pi group 1, Pi 1 is: P0^( 1) P1^( 0) P2^(-1) P3^(-2) P4^(-2) P5^(-2)
43+
44+
45+
46+

0 commit comments

Comments
 (0)