Skip to content

Commit d4934c3

Browse files
Merge pull request #353 from intel/DMR-converter-update
Converter script update
2 parents 59599cb + dc7e493 commit d4934c3

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

scripts/config/platform_config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,5 +232,14 @@
232232
"CoreType":"E-core",
233233
"IsHybrid":true,
234234
"DefaultLevel":2
235+
},
236+
{
237+
"Name": "Diamond Rapids",
238+
"ShortName": "DMR",
239+
"FileName": "DiamondRapids",
240+
"Core": "PantherCove",
241+
"CoreType": "P-core",
242+
"IsHybrid": false,
243+
"DefaultLevel": 2
235244
}
236245
]

scripts/perf_format_converter.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#
88
# perf_format_converter.py
99
# -i (--finput) <Path to Input File> (optional)
10+
# -t (--tma) <Enable TMA conversion> (optional)
1011
#
1112
# ASSUMES: That the script is being run in the scripts folder of the repo and that all files
1213
# are JSON format
@@ -64,7 +65,7 @@ def apply_extra_properties(self, platform):
6465
INPUT_DIR_PATH = Path("./inputs/")
6566
OUTPUT_DIR_PATH = Path("./outputs/")
6667

67-
# Fields to always display event if empty
68+
# Fields to always display even if empty
6869
PERSISTENT_FIELDS = ["MetricGroup", "BriefDescription"]
6970

7071
# Operators
@@ -124,6 +125,7 @@ def convert_file(file_path: Path, output_tma: bool):
124125
# Convert the dictionary to list of Perf format metric objects
125126
perf_metrics = format_converter.convert_to_perf_metrics(platform, output_tma)
126127
if not perf_metrics:
128+
print(f"[ERROR] - Could not convert metrics or file is empty: <{str(file_path.name)}> Skipping...")
127129
return
128130

129131
# Get the output file
@@ -145,7 +147,7 @@ def get_args():
145147
# Arguments
146148
parser.add_argument("-i", "--finput", type=Path,
147149
help="Path of input json file", required=False)
148-
parser.add_argument("-t", "--tma", type=bool,
150+
parser.add_argument("-t", "--tma", type=bool, default=False,
149151
help="Output TMA metrics [true/false]", required=False)
150152

151153
# Get arguments

0 commit comments

Comments
 (0)