From 3fd8a0d39314f07b896eaccc200cfb907d05c9c8 Mon Sep 17 00:00:00 2001 From: vedithal-amd Date: Thu, 11 Dec 2025 14:33:43 -0500 Subject: [PATCH] [rocprofiler-compute] Remove hip dependency during analysis (#2276) * Remove hip dependency during analysis * dont dynamic import when roofline skipped --- .../rocprofiler-compute/src/rocprof_compute_soc/soc_base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/rocprofiler-compute/src/rocprof_compute_soc/soc_base.py b/projects/rocprofiler-compute/src/rocprof_compute_soc/soc_base.py index e3b7ede821..40bc5c9be7 100644 --- a/projects/rocprofiler-compute/src/rocprof_compute_soc/soc_base.py +++ b/projects/rocprofiler-compute/src/rocprof_compute_soc/soc_base.py @@ -36,7 +36,6 @@ import yaml import config from roofline import Roofline -from utils import benchmark from utils.amdsmi_interface import amdsmi_ctx, get_gpu_model, get_mem_max_clock from utils.logger import ( console_debug, @@ -651,7 +650,6 @@ class OmniSoC_Base: def post_profiling(self) -> None: """Perform any SoC-specific post profiling activities.""" console_debug("profiling", f"perform SoC post processing for {self.__arch}") - # Roofline can be skipped via --no-roof # Roofline not supported on MI 100 # If --filter-blocks is provided, roofline block (block 4) should be mentioned @@ -666,6 +664,9 @@ class OmniSoC_Base: ): console_log("roofline", "Skipping roofline") else: + # Dynamic import to isolate hip dependency during profile time only + from utils import benchmark + pmc_path = Path(self.get_args().path) / "pmc_perf.csv" if not pmc_path.is_file(): console_warning(