Skip to content

Commit

Permalink
Fix for info metrics getting default group
Browse files Browse the repository at this point in the history
  • Loading branch information
calebbiggers committed Sep 16, 2024
1 parent 29a5031 commit c389e8b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
30 changes: 15 additions & 15 deletions scripts/config/platform_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,118 +5,118 @@
"FileName":"Haswell",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":false
"DefaultLevel":0
},
{
"Name":"Haswell Server",
"ShortName":"HSX",
"FileName":"HaswellX",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":false
"DefaultLevel":0
},
{
"Name":"Broadwell Client",
"ShortName":"BDW",
"FileName":"Broadwell",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":false
"DefaultLevel":0
},
{
"Name":"Broadwell Server",
"ShortName":"BDX",
"FileName":"BroadwellX",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":false
"DefaultLevel":0
},
{
"Name":"Skylake Client",
"ShortName":"SKL",
"FileName":"Skylake",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":false
"DefaultLevel":0
},
{
"Name":"Skylake Server",
"ShortName":"SKX",
"FileName":"SkylakeX",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":false
"DefaultLevel":0
},
{
"Name":"Cascade Lake Server",
"ShortName":"CLX",
"FileName":"CascadelakeX",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":false
"DefaultLevel":0
},
{
"Name":"Icelake Client",
"ShortName":"ICL",
"FileName":"Icelake",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":true
"DefaultLevel":1
},
{
"Name":"Icelake Server",
"ShortName":"ICX",
"FileName":"IcelakeX",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":true
"DefaultLevel":1
},
{
"Name":"Rocket Lake Client",
"ShortName":"RKL",
"FileName":"Rocketlake",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":true
"DefaultLevel":1
},
{
"Name":"Sapphire Rapids Server",
"ShortName":"SPR",
"FileName":"Sapphirerapids",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":true
"DefaultLevel":2
},
{
"Name":"Sapphire Rapids HBM",
"ShortName":"SPR-HBM",
"FileName":"SapphirerapidsHBM",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":true
"DefaultLevel":2
},
{
"Name":"Sapphire Rapids HBM Only",
"ShortName":"SPR-HBMO",
"FileName":"Sapphirerapids-HBMOnly",
"CoreType":"P-core",
"IsHybrid":false,
"HasDefaults":true
"DefaultLevel":2
},
{
"Name":"Sierra Forest Server",
"ShortName":"SRF",
"FileName":"SierraForest",
"CoreType":"E-core",
"IsHybrid":false,
"HasDefaults":false
"DefaultLevel":0
},
{
"Name":"Grand Ridge Micro Server",
"ShortName":"GRR",
"FileName":"GrandRidge",
"CoreType":"E-core",
"IsHybrid":false,
"HasDefaults":false
"DefaultLevel":0
}
]
11 changes: 5 additions & 6 deletions scripts/perf_format_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def get_public_description(self, metric):
description += f"Related metrics: {", ".join(related_metrics)}" + ". "

# Make sure description is more than one sentence
elif description.count(". ") == 1 and description.endswith(". "):
elif description.count(". ") == 1 and description.strip().endswith("."):
return None

return description.strip()
Expand Down Expand Up @@ -548,9 +548,8 @@ def get_groups(self, metric, platform):
new_groups.append("tma_" + metric["ParentCategory"].lower().replace(" ", "_") + "_group")

# Add default group for levels 1 & 2
if platform["HasDefaults"]:
if metric["Level"] <= 2:
new_groups.append("Default")
if metric["Level"] <= platform["DefaultLevel"] and "info" not in metric["MetricName"].lower():
new_groups.append("Default")

# Add count domain
if "CountDomain" in metric and metric["CountDomain"] != "":
Expand Down Expand Up @@ -596,8 +595,8 @@ def __init__(self, brief_description, metric_expr,
self.DefaultMetricgroupName = None

def apply_extra_properties(self, platform):
if platform["HasDefaults"]:
if self.MetricGroup:
if platform["DefaultLevel"] > 0:
if self.MetricGroup and "info" not in self.MetricName:
if "TopdownL1" in self.MetricGroup:
if "Default" in self.MetricGroup:
self.MetricGroupnoGroup = "TopdownL1;Default"
Expand Down

0 comments on commit c389e8b

Please sign in to comment.