Skip to content

Commit

Permalink
only record lib size reduced
Browse files Browse the repository at this point in the history
Addresses #647.
  • Loading branch information
PeiMu committed Mar 10, 2023
1 parent f883499 commit 3807003
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 3 deletions.
46 changes: 46 additions & 0 deletions analysis/statistics/bf08bfca7fa0ff83bcc9101f9e7e116754375288.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

changeset: 1447:bf08bfca7fa0ff83bcc9101f9e7e116754375288
char kNewtonVersion[] = "0.3-alpha-1447 (bf08bfca7fa0ff83bcc9101f9e7e116754375288) (build 03-09-2023-20:[email protected]_64)";
\n./src/noisy/noisy-linux-EN -O0 applications/noisy/helloWorld.n -s
\n./src/newton/newton-linux-EN -v 0 -eP applications/newton/invariants/ViolinWithTemperatureDependence-pigroups.nt

Informational Report:
---------------------
Invariant "ViolinWithTemperatureDependenceForPiGroups" has 2 unique kernels, each with 2 column(s)...

Kernel 0 is a valid kernel:

1 1
-0.5 -0
1 0
0.5 0
0 -1
-0 -1


The ordering of parameters is: P1 P0 P3 P2 P4 P5

Pi group 0, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^( 0) P5^(-0)

Pi group 0, Pi 1 is: P0^(-0) P1^( 1) P2^( 0) P3^( 0) P4^(-1) P5^(-1)


Kernel 1 is a valid kernel:

1 0
-0.5 1
1 -2
0.5 -1
-0 -2
0 -2


The ordering of parameters is: P1 P0 P3 P2 P4 P5

Pi group 1, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^(-0) P5^( 0)

Pi group 1, Pi 1 is: P0^( 1) P1^( 0) P2^(-1) P3^(-2) P4^(-2) P5^(-2)




13 changes: 10 additions & 3 deletions applications/newton/llvm-ir/performance_test/auto_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ int main(int argc, char** argv) {
}
}

int inst_speedup, time_speedup;
int inst_speedup, time_speedup, ir_reduce, lib_size_reduce;
if (ori_perf_data.ms_time_consumption.empty()) {
assert(opt_perf_data.ms_time_consumption.empty() && "erase mis-match!");
inst_speedup = 0;
Expand All @@ -406,8 +406,15 @@ int main(int argc, char** argv) {
time_speedup = round((ori_perf_data.time_consumption_avg - opt_perf_data.time_consumption_avg)
* 100 / opt_perf_data.time_consumption_avg);
}
int ir_reduce = round((ori_perf_data.ir_lines - opt_perf_data.ir_lines) * 100 / opt_perf_data.ir_lines);
int lib_size_reduce = round((ori_perf_data.library_size - opt_perf_data.library_size) * 100 / opt_perf_data.library_size);

if (ori_perf_data.ir_lines > opt_perf_data.ir_lines) {
ir_reduce = round((ori_perf_data.ir_lines - opt_perf_data.ir_lines) * 100 / opt_perf_data.ir_lines);
lib_size_reduce = round((ori_perf_data.library_size - opt_perf_data.library_size) * 100 / opt_perf_data.library_size);
} else {
// assert(false && "Need to check why this case increase size!!!!!!");
ir_reduce = 0;
lib_size_reduce = 0;
}
ofs << "speed up after optimization\t" << param_str << "\t" << inst_speedup << "%\t" << time_speedup << "%\t"
<< ir_reduce << "%\t" << lib_size_reduce << "%" << std::endl;
std::cout << test_cases[case_id] << ": speed up after optimization\t" << param_str << "\t" << inst_speedup << "%\t" << time_speedup << "%\t"
Expand Down

0 comments on commit 3807003

Please sign in to comment.