[Mesa-dev] [PATCH] radv-report: Show biggest improvements
Timothy Arceri
tarceri at itsqueeze.com
Thu Nov 22 00:52:35 UTC 2018
Being able to see improvements as well as regressions is useful
during the development of shader opts.
Ported from commit 8f0c7aca8683 in shader-db
---
radv-report.py | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/radv-report.py b/radv-report.py
index 6396db0..027c1aa 100755
--- a/radv-report.py
+++ b/radv-report.py
@@ -675,6 +675,36 @@ def print_tables(before_all_results, after_all_results):
if num > 0:
print
+ # biggest improvements
+ metrics = si_stats().metrics
+ for i in range(len(metrics)):
+ field = metrics[i][0]
+ num = 0
+ more_is_better = metrics[i][0] == 'maxwaves'
+
+ if more_is_better:
+ sort_key = lambda v: -v[1].diff.__dict__[field]
+ else:
+ sort_key = lambda v: v[1].diff.__dict__[field]
+
+ for name, stats in sorted(shaders.items(), key = sort_key):
+ if more_is_better:
+ if stats.diff.__dict__[field] <= 0:
+ continue
+ else:
+ if stats.diff.__dict__[field] >= 0:
+ continue
+
+ if num == 0:
+ print_yellow(" BIGGEST IMPROVEMENTS - {:49}".format(metrics[i][1]))
+ print_yellow(" Before After Delta Percentage")
+ stats.print_regression(name, field)
+ num += 1
+ if num == num_listed:
+ break
+ if num > 0:
+ print
+
# percentages
legend = "Shaders SGPRs VGPRs SpillSGPR SpillVGPR PrivVGPR Scratch CodeSize MaxWaves Waits"
print_yellow(" PERCENTAGE DELTAS " + legend)
--
2.19.1
More information about the mesa-dev
mailing list