From 181bdf9ca1b6f9683612ae8af5fac4aa1dbe607e Mon Sep 17 00:00:00 2001 From: vedithal-amd Date: Wed, 3 Sep 2025 11:09:12 -0400 Subject: [PATCH] [rocprofiler-compute] Fix MI100 tests (#832) * Fix MI100 tests * Handle missing roofline in db_analysis.py --- .../src/rocprof_compute_analyze/analysis_db.py | 16 +++++++++------- .../tests/test_profile_general.py | 7 ++++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/projects/rocprofiler-compute/src/rocprof_compute_analyze/analysis_db.py b/projects/rocprofiler-compute/src/rocprof_compute_analyze/analysis_db.py index 76cc7da7b4..413f0c3575 100644 --- a/projects/rocprofiler-compute/src/rocprof_compute_analyze/analysis_db.py +++ b/projects/rocprofiler-compute/src/rocprof_compute_analyze/analysis_db.py @@ -403,9 +403,9 @@ class db_analysis(OmniAnalyze_Base): for workload_path in self._runs.keys(): pmc_df = self._pmc_df_per_workload[workload_path].copy() sys_info = self._runs[workload_path].sys_info.iloc[0].to_dict() - for key, value in self._roofline_ceilings_per_workload[ - workload_path - ].items(): + for key, value in self._roofline_ceilings_per_workload.get( + workload_path, {} + ).items(): sys_info[f"{key}_empirical_peak"] = value # Calculate PER_XCD variables first @@ -571,10 +571,12 @@ class db_analysis(OmniAnalyze_Base): zip(roofline_data_df["Metric"], roofline_data_df["Value"]) ) roofline_data_expressions = { - "total_flops": roofline_data_expressions["Performance (GFLOPs)"], - "l1_cache_data": roofline_data_expressions["AI L1"], - "l2_cache_data": roofline_data_expressions["AI L2"], - "hbm_cache_data": roofline_data_expressions["AI HBM"], + "total_flops": roofline_data_expressions.get( + "Performance (GFLOPs)", "" + ), + "l1_cache_data": roofline_data_expressions.get("AI L1", ""), + "l2_cache_data": roofline_data_expressions.get("AI L2", ""), + "hbm_cache_data": roofline_data_expressions.get("AI HBM", ""), } roofline_df = pd.DataFrame([ diff --git a/projects/rocprofiler-compute/tests/test_profile_general.py b/projects/rocprofiler-compute/tests/test_profile_general.py index a26cfc810e..6a4d567711 100644 --- a/projects/rocprofiler-compute/tests/test_profile_general.py +++ b/projects/rocprofiler-compute/tests/test_profile_general.py @@ -78,8 +78,6 @@ ALL_CSVS_MI100 = sorted([ "SQC_ICACHE_INFLIGHT_LEVEL.csv", "SQ_IFETCH_LEVEL.csv", "SQ_INST_LEVEL_LDS.csv", - "SQ_INST_LEVEL_SMEM.csv", - "SQ_INST_LEVEL_VMEM.csv", "SQ_LEVEL_WAVES.csv", "pmc_perf.csv", "pmc_perf_0.csv", @@ -89,7 +87,6 @@ ALL_CSVS_MI100 = sorted([ "pmc_perf_4.csv", "pmc_perf_5.csv", "pmc_perf_6.csv", - "pmc_perf_7.csv", "sysinfo.csv", ]) @@ -752,6 +749,10 @@ def test_roof_file_validation(binary_handler_profile_rocprof_compute): @pytest.mark.misc def test_roof_rocpd(binary_handler_profile_rocprof_compute): + if soc == "MI100": + pytest.skip("Roofline not supported on MI100") + return + workload_dir = test_utils.get_output_dir() options = ["--device", "0", "--roof-only", "--format-rocprof-output", "rocpd"] binary_handler_profile_rocprof_compute(config, workload_dir, options, roof=True)