From 22635ec467f80f2e4da8d26c2015c900dc283cbb Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Thu, 14 Dec 2023 21:01:42 +0800 Subject: [PATCH] Improve throughput display --- code/measure-3A6000.csv | 64 ++++++++++++++++++++--------------------- main.py | 12 ++++---- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/code/measure-3A6000.csv b/code/measure-3A6000.csv index 950bc4fc..67a25348 100644 --- a/code/measure-3A6000.csv +++ b/code/measure-3A6000.csv @@ -99,14 +99,14 @@ vclz_b,2.00,3.98,0.25 vclz_d,2.00,3.98,0.25 vclz_h,2.00,3.97,0.25 vclz_w,2.00,3.98,0.25 -vdiv_b,28.96/31.96,0.06,15.48 -vdiv_bu,28.96/32.96,0.06,16.48 +vdiv_b,28.96/31.96,0.06,15.50 +vdiv_bu,28.96/32.96,0.06,16.50 vdiv_d,7.99,0.25,4.00 vdiv_du,7.99,0.25,3.99 -vdiv_h,16.98,0.12,8.49 +vdiv_h,16.98,0.12,8.50 vdiv_hu,16.98/21.97,0.11,8.99 -vdiv_w,10.99,0.18,5.49 -vdiv_wu,10.99,0.18,5.49 +vdiv_w,10.99,0.18,5.50 +vdiv_wu,10.99,0.18,5.50 vext2xv_d_b,3.00,4.00,0.25 vext2xv_d_h,3.00,4.00,0.25 vext2xv_d_w,3.00,4.00,0.25 @@ -187,8 +187,8 @@ vfcvth_d_s,3.00,2.00,0.50 vfcvth_s_h,3.00,2.00,0.50 vfcvtl_d_s,3.00,2.00,0.50 vfcvtl_s_h,3.00,2.00,0.50 -vfdiv_d,7.99/21.47,0.25,3.99 -vfdiv_s,10.99,0.18,5.49 +vfdiv_d,7.99/21.50,0.25,3.99 +vfdiv_s,10.99,0.18,5.50 vffint_d_l,3.99,4.00,0.25 vffint_d_lu,3.99,4.00,0.25 vffint_s_l,4.99,2.00,0.50 @@ -217,7 +217,7 @@ vfnmadd_s,4.99,2.00,0.50 vfnmsub_d,4.99,2.00,0.50 vfnmsub_s,4.99,2.00,0.50 vfrecip_d,7.99,0.25,3.99 -vfrecip_s,10.99,0.18,5.49 +vfrecip_s,10.99,0.18,5.50 vfrint_d,3.99,2.00,0.50 vfrint_s,3.99,2.00,0.50 vfrintrm_d,3.99,2.00,0.50 @@ -228,13 +228,13 @@ vfrintrp_d,3.99,2.00,0.50 vfrintrp_s,3.99,2.00,0.50 vfrintrz_d,3.99,2.00,0.50 vfrintrz_s,3.99,2.00,0.50 -vfrsqrt_d,14.98,0.04,26.47 +vfrsqrt_d,14.98,0.04,26.50 vfrsqrt_s,16.98,0.05,18.98 vfrstp_b,2.00,2.00,0.50 vfrstp_h,2.00,2.00,0.50 vfrstpi_b,2.00,2.00,0.50 vfrstpi_h,2.00,2.00,0.50 -vfsqrt_d,35.95,0.06,17.48 +vfsqrt_d,35.95,0.06,17.50 vfsqrt_s,10.99,0.08,11.98 vfsub_d,3.00,4.00,0.25 vfsub_s,3.00,4.00,0.25 @@ -355,14 +355,14 @@ vmini_h,1.00,4.00,0.25 vmini_hu,1.00,4.00,0.26 vmini_w,1.00,4.00,0.25 vmini_wu,1.00,3.98,0.25 -vmod_b,28.96/34.95,0.06,15.48 -vmod_bu,28.96/36.95,0.06,17.48 +vmod_b,28.96/34.95,0.06,15.50 +vmod_bu,28.96/36.95,0.06,17.50 vmod_d,7.99/9.99,0.25,3.99 vmod_du,7.99/9.99,0.25,3.99 -vmod_h,16.98/20.97,0.12,8.49 -vmod_hu,16.98/20.97,0.11,9.49 -vmod_w,10.99/12.98,0.18,5.49 -vmod_wu,10.99/12.98,0.18,5.49 +vmod_h,16.98/21.00,0.12,8.50 +vmod_hu,16.98/21.00,0.11,9.50 +vmod_w,10.99/12.98,0.18,5.50 +vmod_wu,10.99/12.98,0.18,5.50 vmskgez_b,1.00,3.98,0.25 vmskltz_b,1.00,3.98,0.25 vmskltz_d,1.00,3.98,0.25 @@ -814,14 +814,14 @@ xvclz_b,2.00,4.00,0.25 xvclz_d,2.00,4.00,0.25 xvclz_h,2.00,4.00,0.25 xvclz_w,2.00,4.00,0.25 -xvdiv_b,28.96/31.96,0.06,15.48 -xvdiv_bu,28.96/32.96,0.06,16.48 +xvdiv_b,28.96/31.96,0.06,15.50 +xvdiv_bu,28.96/32.96,0.06,16.50 xvdiv_d,7.99,0.25,3.99 xvdiv_du,7.99,0.25,3.99 -xvdiv_h,16.98,0.12,8.49 +xvdiv_h,16.98,0.12,8.50 xvdiv_hu,16.98/21.97,0.11,8.99 -xvdiv_w,10.99,0.18,5.49 -xvdiv_wu,10.99,0.18,5.49 +xvdiv_w,10.99,0.18,5.50 +xvdiv_wu,10.99,0.18,5.50 xvexth_d_w,1.00,4.00,0.25 xvexth_du_wu,1.00,4.00,0.25 xvexth_h_b,1.00,4.00,0.25 @@ -890,8 +890,8 @@ xvfcvth_d_s,3.00,2.00,0.50 xvfcvth_s_h,3.00,2.00,0.50 xvfcvtl_d_s,3.00,2.00,0.50 xvfcvtl_s_h,3.00,2.00,0.50 -xvfdiv_d,7.99/21.47,0.25,3.99 -xvfdiv_s,10.99,0.18,5.49 +xvfdiv_d,7.99/21.50,0.25,3.99 +xvfdiv_s,10.99,0.18,5.50 xvffint_d_l,3.99,4.00,0.25 xvffint_d_lu,3.99,4.00,0.25 xvffint_s_l,4.99,2.00,0.50 @@ -920,7 +920,7 @@ xvfnmadd_s,4.99,2.00,0.50 xvfnmsub_d,4.99,2.00,0.50 xvfnmsub_s,4.99,2.00,0.50 xvfrecip_d,22.97,0.25,3.99 -xvfrecip_s,26.96,0.18,5.49 +xvfrecip_s,26.96,0.18,5.50 xvfrint_d,3.99,2.00,0.50 xvfrint_s,3.99,2.00,0.50 xvfrintrm_d,4.00,2.00,0.50 @@ -931,13 +931,13 @@ xvfrintrp_d,3.99,2.00,0.50 xvfrintrp_s,3.99,2.00,0.50 xvfrintrz_d,3.99,2.00,0.50 xvfrintrz_s,3.99,2.00,0.50 -xvfrsqrt_d,14.98,0.04,26.47 +xvfrsqrt_d,14.98,0.04,26.50 xvfrsqrt_s,24.97,0.05,18.98 xvfrstp_b,2.00,2.00,0.50 xvfrstp_h,2.00,2.00,0.50 xvfrstpi_b,2.00,2.00,0.50 xvfrstpi_h,2.00,2.00,0.50 -xvfsqrt_d,35.95,0.06,17.48 +xvfsqrt_d,35.95,0.06,17.50 xvfsqrt_s,14.98,0.08,11.98 xvfsub_d,3.00,4.00,0.25 xvfsub_s,3.00,4.00,0.25 @@ -1059,14 +1059,14 @@ xvmini_h,1.00,4.00,0.25 xvmini_hu,1.00,4.00,0.25 xvmini_w,1.00,4.00,0.25 xvmini_wu,1.00,4.00,0.25 -xvmod_b,28.96/40.95,0.06,15.48 -xvmod_bu,28.96/36.95,0.06,17.48 +xvmod_b,28.96/40.95,0.06,15.50 +xvmod_bu,28.96/36.95,0.06,17.50 xvmod_d,7.99/9.99,0.25,3.99 xvmod_du,7.99/9.99,0.25,3.99 -xvmod_h,16.98/20.97,0.12,8.49 -xvmod_hu,16.98/24.97,0.11,9.49 -xvmod_w,10.99/12.98,0.18,5.49 -xvmod_wu,10.99/12.98,0.18,5.49 +xvmod_h,16.98/20.97,0.12,8.50 +xvmod_hu,16.98/24.97,0.11,9.50 +xvmod_w,10.99/12.98,0.18,5.50 +xvmod_wu,10.99/12.98,0.18,5.50 xvmskgez_b,1.00,4.00,0.25 xvmskltz_b,1.00,4.00,0.25 xvmskltz_d,1.00,4.00,0.25 diff --git a/main.py b/main.py index a405319c..b3703f1e 100644 --- a/main.py +++ b/main.py @@ -32,15 +32,17 @@ if abs(throughput_cpi - round(throughput_cpi)) < 0.03: throughput_cpi = round(throughput_cpi) - # TODO: handle small cpi better by 1/ipc - throughput_ipc = float(row["throughput(ipc)"]) - if abs(throughput_ipc - round(throughput_ipc)) < 0.03: - throughput_ipc = round(throughput_ipc) + # handle small cpi better by 1/ipc + if throughput_cpi < 1.0: + throughput_ipc = float(row["throughput(ipc)"]) + if abs(throughput_ipc - round(throughput_ipc)) < 0.03: + throughput_ipc = round(throughput_ipc) + + throughput_cpi = f"{throughput_cpi}(1/{throughput_ipc})" measure[cpu][row["name"]] = { "latency": ", ".join(map(str, latency)), "throughput(cpi)": throughput_cpi, - "throughput(ipc)": throughput_ipc, }