From e5d1f07d91dcb3e1a5a67f64b45b24fed3a91ad5 Mon Sep 17 00:00:00 2001 From: Caleb Biggers Date: Tue, 2 Dec 2025 11:58:47 -0800 Subject: [PATCH 1/2] Added DMR to platform config file --- scripts/config/platform_config.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/config/platform_config.json b/scripts/config/platform_config.json index aa84d1b7..b429c7e2 100644 --- a/scripts/config/platform_config.json +++ b/scripts/config/platform_config.json @@ -232,5 +232,14 @@ "CoreType":"E-core", "IsHybrid":true, "DefaultLevel":2 + }, + { + "Name": "Diamond Rapids", + "ShortName": "DMR", + "FileName": "DiamondRapids", + "Core": "PantherCove", + "CoreType": "P-core", + "IsHybrid": false, + "DefaultLevel": 2 } ] \ No newline at end of file From dc7e493de4968a823a5b9468fbebcbbe652054ef Mon Sep 17 00:00:00 2001 From: Caleb Biggers Date: Tue, 2 Dec 2025 11:59:28 -0800 Subject: [PATCH 2/2] Updated perf converter error handling Added output when an input file contains no metrics --- scripts/perf_format_converter.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/perf_format_converter.py b/scripts/perf_format_converter.py index 77aef1f5..a977f611 100644 --- a/scripts/perf_format_converter.py +++ b/scripts/perf_format_converter.py @@ -7,6 +7,7 @@ # # perf_format_converter.py # -i (--finput) (optional) +# -t (--tma) (optional) # # ASSUMES: That the script is being run in the scripts folder of the repo and that all files # are JSON format @@ -64,7 +65,7 @@ def apply_extra_properties(self, platform): INPUT_DIR_PATH = Path("./inputs/") OUTPUT_DIR_PATH = Path("./outputs/") -# Fields to always display event if empty +# Fields to always display even if empty PERSISTENT_FIELDS = ["MetricGroup", "BriefDescription"] # Operators @@ -124,6 +125,7 @@ def convert_file(file_path: Path, output_tma: bool): # Convert the dictionary to list of Perf format metric objects perf_metrics = format_converter.convert_to_perf_metrics(platform, output_tma) if not perf_metrics: + print(f"[ERROR] - Could not convert metrics or file is empty: <{str(file_path.name)}> Skipping...") return # Get the output file @@ -145,7 +147,7 @@ def get_args(): # Arguments parser.add_argument("-i", "--finput", type=Path, help="Path of input json file", required=False) - parser.add_argument("-t", "--tma", type=bool, + parser.add_argument("-t", "--tma", type=bool, default=False, help="Output TMA metrics [true/false]", required=False) # Get arguments