summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2023-06-13 21:07:18 +0300
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2023-06-14 10:00:50 +0300
commit788c53bc6ade3d2dbcb52380b553e7e13699ba00 (patch)
tree1e22de205ba796721c8269489e56e5d82d48c04a
parent9bf8e5f894ccf658823b68619e078372407f8ba1 (diff)
report-fossil: add a parameter to discard stats
This adds a property to indicate that a statistic change makes all other statistics uncomparable. This is quite useful on Intel where shaders are compiled in different variants and a SIMD8 compute shader cannot be compared to a SIMD16 variant. All that should be visible is the change of SIMD width. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
-rwxr-xr-xreport-fossil.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/report-fossil.py b/report-fossil.py
index 7572ef1..4a2016b 100755
--- a/report-fossil.py
+++ b/report-fossil.py
@@ -74,6 +74,7 @@ class Statistic(typing.Generic[T]):
display_name : str = attr.ib()
more_is_better : bool = attr.ib(False)
is_hash : bool = attr.ib(False)
+ change_discard_others : bool = attr.ib(False)
statistics = [
@@ -126,7 +127,7 @@ statistics = [
Statistic(internal_name='read_stalls', csv_names=['Read Stalls'], display_name='Read Stalls'),
# Anv statistics
- Statistic(internal_name='subgroup_size', csv_names=['Subgroup size'], display_name='Subgroup size', more_is_better=True),
+ Statistic(internal_name='subgroup_size', csv_names=['Subgroup size'], display_name='Subgroup size', more_is_better=True, change_discard_others=True),
Statistic(internal_name='send_count', csv_names=['SEND Count'], display_name='Send messages'),
Statistic(internal_name='loop_count', csv_names=['Loop Count'], display_name='Loop count'),
Statistic(internal_name='cycle_count', csv_names=['Cycle Count'], display_name='Cycle count'),
@@ -311,10 +312,31 @@ class Report(ReportProtocol):
def include(self, name: str, d0: Result, d1: Result) -> None:
self.num_shaders += 1
+ # Figure out whether a given statistic change means we need to
+ # ignore all others.
+ discard_all_but = None
+ for stat in statistics:
+ m = stat.internal_name
+ d0_m: typing.Optional[int] = getattr(d0, m)
+ if d0_m is None:
+ continue
+ d1_m: typing.Optional[int] = getattr(d1, m)
+ if d1_m is None:
+ continue
+
+ if d0_m != d1_m and stat.change_discard_others:
+ discard_all_but = stat.internal_name
+ break
+
affected = False
stats: typing.List[typing.Tuple[Diff, int, int]] = []
for stat in statistics:
m = stat.internal_name
+
+ # Should this statistic be ignored?
+ if discard_all_but is not None and m != discard_all_but:
+ continue
+
d0_m: typing.Optional[int] = getattr(d0, m)
if d0_m is None:
continue