diff --git a/70_report.pdf b/70_report.pdf new file mode 100644 index 0000000..1e81586 Binary files /dev/null and b/70_report.pdf differ diff --git a/README.md b/README.md index 45c2d1c..6397c34 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,10 @@ This repository contains the C++ simulation code and Python visualization code u --- +## Results + +The logs of our benchmarks are stored inside the [`measurements`](./measurements/) folder. However, the log files contain incorrect flop counts since our benchmarking code assumed the same baseline flop count for all versions. Thus, we manually recalculated the flop count for each version and created helper functions for the correct flop counts inside the [`flopcounts`](./flopcounts/) folder. **The final, correct results are stored inside [`analysis/results_x86.csv`](./analysis/results_x86.csv).** [`variant_inlining_8.cpp`](./variants/variant_inlining_8.cpp) is our best non-vectorized version, while [`variant_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_rsqrt_morersqrt_improved_moreilp.cpp`](./variants/variant_float_inlining_SoA_AVX512_polyexp_moreavx_ilp_2_rsqrt_morersqrt_improved_moreilp.cpp) is our best vectorized version. The measurements for the best non-vectorized version compiled with flags specifically disabling vectorization are stored at [`4.log`](./measurements/variant_inlining_8/x86/4.log), [`5.log`](./measurements/variant_inlining_8/x86/5.log), and [`6.log`](measurements/variant_inlining_8/x86/6.log). Additionally, the markdown files we have inside [`docs`](./docs/) are outdated and incomplete. Thus, **the final report [`70_report.pdf`](./70_report.pdf) should be used as the sole reference for all of our optimizations**. + ## Requirements The project uses a `Makefile` to simplify building, running, benchmarking, testing, and visualization. diff --git a/analysis/fig_tracks.svg b/analysis/fig_tracks.svg index 17ff873..a7c0317 100644 --- a/analysis/fig_tracks.svg +++ b/analysis/fig_tracks.svg @@ -6,7 +6,7 @@ - 2026-06-18T21:57:12.920540 + 2026-06-19T11:15:04.027171 image/svg+xml @@ -42,16 +42,16 @@ z +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - - + @@ -114,11 +114,11 @@ z +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -150,11 +150,11 @@ z +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -194,11 +194,11 @@ z +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -214,11 +214,11 @@ L 317.669606 108.063937 +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -249,11 +249,11 @@ z +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -268,11 +268,11 @@ L 482.672155 108.063937 +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -287,11 +287,11 @@ L 591.732909 108.063937 +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -306,117 +306,117 @@ L 674.234184 108.063937 - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -800,16 +800,16 @@ z +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - - + @@ -823,11 +823,11 @@ L -3.5 0 +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -841,11 +841,11 @@ L 705.461875 394.377271 +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -860,11 +860,11 @@ L 705.461875 337.114604 +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -879,11 +879,11 @@ L 705.461875 279.851937 +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -898,11 +898,11 @@ L 705.461875 222.589271 +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -917,11 +917,11 @@ L 705.461875 165.326604 +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #e9e9e9; stroke-width: 0.8; stroke-linecap: square"/> - + @@ -975,9 +975,9 @@ L 317.669606 436.923432 L 400.170881 437.129578 L 482.672155 437.427344 L 591.732909 438.458072 -" clip-path="url(#pebc89ec65d)" style="fill: none; stroke: #7a7a7a; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #7a7a7a; stroke-width: 1.8; stroke-linecap: square"/> - - - - - - - - - + + + + + + + + @@ -1008,9 +1008,9 @@ L 400.170881 400.664712 L 482.672155 400.057727 L 591.732909 399.656889 L 674.234184 401.443484 -" clip-path="url(#pebc89ec65d)" style="fill: none; stroke: #4f86d6; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #4f86d6; stroke-width: 1.8; stroke-linecap: square"/> - - - - - - - - - - + + + + + + + + + @@ -1042,9 +1042,9 @@ L 400.170881 420.397427 L 482.672155 420.259996 L 591.732909 416.29742 L 674.234184 417.041834 -" clip-path="url(#pebc89ec65d)" style="fill: none; stroke-dasharray: 6.66,2.88; stroke-dashoffset: 0; stroke: #9bbbe0; stroke-width: 1.8"/> +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke-dasharray: 6.66,2.88; stroke-dashoffset: 0; stroke: #9bbbe0; stroke-width: 1.8"/> - - - - - - - - - - + + + + + + + + + @@ -1076,9 +1076,9 @@ L 400.170881 383.806583 L 482.672155 383.588984 L 591.732909 383.566079 L 674.234184 383.531722 -" clip-path="url(#pebc89ec65d)" style="fill: none; stroke: #2f5d9e; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #2f5d9e; stroke-width: 1.8; stroke-linecap: square"/> - - - - - - - - - - + + + + + + + + + @@ -1110,9 +1110,9 @@ L 400.170881 353.056531 L 482.672155 352.289211 L 591.732909 352.644239 L 674.234184 351.728037 -" clip-path="url(#pebc89ec65d)" style="fill: none; stroke-dasharray: 6.66,2.88; stroke-dashoffset: 0; stroke: #e58aa6; stroke-width: 1.8"/> +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke-dasharray: 6.66,2.88; stroke-dashoffset: 0; stroke: #e58aa6; stroke-width: 1.8"/> - - - - - - - - - - + + + + + + + + + @@ -1144,9 +1144,9 @@ L 400.170881 316.694737 L 482.672155 315.881607 L 591.732909 315.904512 L 674.234184 315.961775 -" clip-path="url(#pebc89ec65d)" style="fill: none; stroke-dasharray: 6.66,2.88; stroke-dashoffset: 0; stroke: #d05a82; stroke-width: 1.8"/> +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke-dasharray: 6.66,2.88; stroke-dashoffset: 0; stroke: #d05a82; stroke-width: 1.8"/> - - - - - - - - - - + + + + + + + + + @@ -1178,9 +1178,9 @@ L 400.170881 228.785091 L 482.672155 221.936476 L 591.732909 220.940106 L 674.234184 219.428372 -" clip-path="url(#pebc89ec65d)" style="fill: none; stroke: #a71d5b; stroke-width: 2.4; stroke-linecap: square"/> +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #a71d5b; stroke-width: 2.4; stroke-linecap: square"/> - - - - - - - - - - + + + + + + + + + @@ -1212,9 +1212,9 @@ L 400.170881 208.61718 L 482.672155 210.140367 L 591.732909 210.873329 L 674.234184 210.758804 -" clip-path="url(#pebc89ec65d)" style="fill: none; stroke: #dc143c; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pd0f93302fb)" style="fill: none; stroke: #dc143c; stroke-width: 1.8; stroke-linecap: square"/> - - - - - - - - - - + + + + + + + + + - + - - + + - - + - + - - + + @@ -2622,7 +2583,7 @@ z - + diff --git a/analysis/plots.py b/analysis/plots.py index ad3b309..5a1c6ed 100644 --- a/analysis/plots.py +++ b/analysis/plots.py @@ -162,7 +162,7 @@ for v, lab, c, ls in tracks: xpos = None ends.append((x, y, lab, c, xpos, side)) -perf_bound_instruction_mix = 28.19 +perf_bound_instruction_mix = 29.33 for yv, t in [ (perf_bound_instruction_mix, f"Peak π based on instruction mix [{perf_bound_instruction_mix} flops/cycle]" diff --git a/analysis/results_x86.csv b/analysis/results_x86.csv index fc516ef..1b57e5e 100644 --- a/analysis/results_x86.csv +++ b/analysis/results_x86.csv @@ -268,13 +268,13 @@ variant_inlining_7_symmetry_2_ilp_2,500,200,3461000000,64112.0,269.92,2800723726 variant_inlining_7_symmetry_2_ilp_2,1000,200,13822000000,128112.0,539.45,11627472146.7,1.189 variant_inlining_7_symmetry_2_ilp_2,2000,200,55244000000,256112.0,1078.51,47722643580.0,1.158 variant_inlining_7_symmetry_2_ilp_2,5000,200,345110000000,640112.0,2695.7,316224530286.7,1.091 -variant_inlining_8,50,200,36750000,6512.0,28.22,25967831.7,1.415 -variant_inlining_8,100,200,145500000,12912.0,56.34,102344446.7,1.422 -variant_inlining_8,200,200,579000000,25712.0,112.59,412337820.0,1.404 -variant_inlining_8,500,200,3607500000,64112.0,281.34,2712489206.7,1.33 -variant_inlining_8,1000,200,14415000000,128112.0,562.59,10911941346.7,1.321 -variant_inlining_8,2000,200,57630000000,256112.0,1125.09,44617296533.3,1.292 -variant_inlining_8,5000,200,360075000000,640112.0,2812.59,302676303926.7,1.19 +variant_inlining_8,50,200,36750000,6512.0,28.22,25930980.8,1.417 +variant_inlining_8,100,200,145500000,12912.0,56.34,102418540.0,1.421 +variant_inlining_8,200,200,579000000,25712.0,112.59,412514933.3,1.404 +variant_inlining_8,500,200,3607500000,64112.0,281.34,2688542773.3,1.342 +variant_inlining_8,1000,200,14415000000,128112.0,562.59,10866744550.0,1.327 +variant_inlining_8,2000,200,57630000000,256112.0,1125.09,44404254580.0,1.298 +variant_inlining_8,5000,200,360075000000,640112.0,2812.59,301663825136.7,1.194 variant_inlining_8_SoA_AVX512_polyexp_fastinvsqrt,50,200,42720000,6512.0,32.8,8373508.8,5.102 variant_inlining_8_SoA_AVX512_polyexp_fastinvsqrt,100,200,155520000,12912.0,60.22,28637320.0,5.431 variant_inlining_8_SoA_AVX512_polyexp_fastinvsqrt,200,200,591360000,25712.0,115.0,104580140.0,5.655