diff --git a/CMakeLists.txt b/CMakeLists.txt index 592b12833b..d4469a9216 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -360,9 +360,7 @@ install( PATTERN "rooflines*" EXCLUDE) # src/utils/rooflines file(GLOB rooflinebins src/utils/rooflines/roofline-*) -install( - PROGRAMS ${rooflinebins} - DESTINATION ${CMAKE_INSTALL_BINDIR}/utils/rooflines) +install(PROGRAMS ${rooflinebins} DESTINATION ${CMAKE_INSTALL_BINDIR}/utils/rooflines) # src/omniperf_soc install( DIRECTORY src/omniperf_soc diff --git a/src/omniperf_profile/profiler_base.py b/src/omniperf_profile/profiler_base.py index 5853a83a42..447cb49b60 100644 --- a/src/omniperf_profile/profiler_base.py +++ b/src/omniperf_profile/profiler_base.py @@ -400,7 +400,7 @@ class OmniProfiler_Base: skip_roof=self.__args.no_roof, roof_only=self.__args.roof_only, mspec=self._soc._mspec, - soc=self._soc + soc=self._soc, ) diff --git a/src/omniperf_soc/soc_gfx940.py b/src/omniperf_soc/soc_gfx940.py index cfc58b8fd8..11e369c981 100644 --- a/src/omniperf_soc/soc_gfx940.py +++ b/src/omniperf_soc/soc_gfx940.py @@ -67,7 +67,7 @@ class gfx940_soc(OmniSoC_Base): "TCC_channels": 32, } ) - #self.roofline_obj = Roofline(args, self._mspec) + # self.roofline_obj = Roofline(args, self._mspec) # Set arch specific specs self._mspec._l2_banks = 16 diff --git a/src/omniperf_soc/soc_gfx941.py b/src/omniperf_soc/soc_gfx941.py index 7027e451a4..d4fcc999c5 100644 --- a/src/omniperf_soc/soc_gfx941.py +++ b/src/omniperf_soc/soc_gfx941.py @@ -67,7 +67,7 @@ class gfx941_soc(OmniSoC_Base): "TCC_channels": 32, } ) - #self.roofline_obj = Roofline(args, self._mspec) + # self.roofline_obj = Roofline(args, self._mspec) # Set arch specific specs self._mspec._l2_banks = 16 diff --git a/src/omniperf_soc/soc_gfx942.py b/src/omniperf_soc/soc_gfx942.py index 20a714e656..596bcd5b20 100644 --- a/src/omniperf_soc/soc_gfx942.py +++ b/src/omniperf_soc/soc_gfx942.py @@ -67,7 +67,7 @@ class gfx942_soc(OmniSoC_Base): "TCC_channels": 32, } ) - #self.roofline_obj = Roofline(args, self._mspec) + # self.roofline_obj = Roofline(args, self._mspec) # Set arch specific specs self._mspec._l2_banks = 16 diff --git a/src/roofline.py b/src/roofline.py index 34c735aec1..0c2f6f0678 100644 --- a/src/roofline.py +++ b/src/roofline.py @@ -376,8 +376,10 @@ class Roofline: sysinfo_path = os.path.join(self.__args.path, "sysinfo.csv") if not os.path.isfile(sysinfo_path): logging.info("[roofline] sysinfo.csv not found. Generating...") + class Dummy_SoC: roofline_obj = True + gen_sysinfo( workload_name=self.__args.name, workload_dir=self.__workload_dir, @@ -386,7 +388,7 @@ class Roofline: skip_roof=self.__args.no_roof, roof_only=self.__args.roof_only, mspec=self.__mspec, - soc=Dummy_SoC + soc=Dummy_SoC, ) @abstractmethod diff --git a/src/utils/roofline_calc.py b/src/utils/roofline_calc.py index 1998b11f80..cadf0db08c 100644 --- a/src/utils/roofline_calc.py +++ b/src/utils/roofline_calc.py @@ -195,21 +195,11 @@ def calc_ai(sort_type, ret_df): df = df.sort_values(by=["Kernel_Name"]) df = df.reset_index(drop=True) - total_flops = ( - valu_flops - ) = ( - mfma_flops_bf16 - ) = ( - mfma_flops_f16 - ) = ( - mfma_iops_i8 - ) = ( + total_flops = valu_flops = mfma_flops_bf16 = mfma_flops_f16 = mfma_iops_i8 = ( mfma_flops_f32 - ) = ( - mfma_flops_f64 - ) = ( - lds_data - ) = L1cache_data = L2cache_data = hbm_data = calls = totalDuration = avgDuration = 0.0 + ) = mfma_flops_f64 = lds_data = L1cache_data = L2cache_data = hbm_data = calls = ( + totalDuration + ) = avgDuration = 0.0 kernelName = "" @@ -390,23 +380,11 @@ def calc_ai(sort_type, ret_df): kernelName, idx, calls ) ) - total_flops = ( - valu_flops - ) = ( - mfma_flops_bf16 - ) = ( - mfma_flops_f16 - ) = ( - mfma_iops_i8 - ) = ( + total_flops = valu_flops = mfma_flops_bf16 = mfma_flops_f16 = mfma_iops_i8 = ( mfma_flops_f32 - ) = ( - mfma_flops_f64 - ) = ( - lds_data - ) = ( - L1cache_data - ) = L2cache_data = hbm_data = calls = totalDuration = avgDuration = 0.0 + ) = mfma_flops_f64 = lds_data = L1cache_data = L2cache_data = hbm_data = ( + calls + ) = totalDuration = avgDuration = 0.0 if sort_type == "dispatches": myList.append( @@ -428,23 +406,11 @@ def calc_ai(sort_type, ret_df): avgDuration, ) ) - total_flops = ( - valu_flops - ) = ( - mfma_flops_bf16 - ) = ( - mfma_flops_f16 - ) = ( - mfma_iops_i8 - ) = ( + total_flops = valu_flops = mfma_flops_bf16 = mfma_flops_f16 = mfma_iops_i8 = ( mfma_flops_f32 - ) = ( - mfma_flops_f64 - ) = ( - lds_data - ) = ( - L1cache_data - ) = L2cache_data = hbm_data = calls = totalDuration = avgDuration = 0.0 + ) = mfma_flops_f64 = lds_data = L1cache_data = L2cache_data = hbm_data = ( + calls + ) = totalDuration = avgDuration = 0.0 myList.sort(key=lambda x: x.totalDuration, reverse=True)