f9aa7be97c
* Add MI 350 hardware information
* Refactor MI GPU YAML file and corresponding interface
* Add SoC file for gfx950 architecture
* Add analysis report configs for MI 350 containing existing metrics
* Add placeholder None valued metrics for previous architectures to make
baseline comparison work
* Enable testing on MI 350
* Analysis config metric changes
- SPI changes
- Update metric formula for default SPI pipe counter
- Use efficiently collected pipe wise SPI counters
- Add SPI Wave Occupancy
- Add Scheduler-Pipe Wave Utilization
- Update formula for VGPR Writes
- Add Scheduler-Pipe FIFO Full Rate
- CPC changes
- Add CPC SYNC FIFO Full Rate
- Add CPC CANE Stall Rate
- Add CPC ADC Utilization
- SQ changes
- Add VALU co-issue efficiency
- Add F6F4 datatype metrics
- Update formula for total FLOPs by adding F6F4 counters
- Add LDS STORE / LOAD / ATOMIC metrics
- Add LDS STORE / LOAD / ATOMIC bandwidth
- Add LDS FIFO and TA ADDR / CMD / DATA FIFO full rates
* Collect TCP_TCP_LATENCY_sum only for gfx950 (MI 350)
* Do not inject SQ_ACCUM_PREV_HIRES unnecesarily
* Do not hardcode memory and shader clock speeds
* Write num_hbm_channels to sysinfo.csv instead of hbm_bw while profiling
* Move generate sysinfo.csv to pre processing step of profiling
* Add warnings to use --specs-correction for missing sysinfo.csv values during analysis phase
* Update CHANGELOG
* Analysis phase warning to use --specs-correction when needed
106 lines
3.9 KiB
Python
106 lines
3.9 KiB
Python
##############################################################################bl
|
|
# MIT License
|
|
#
|
|
# Copyright (c) 2021 - 2025 Advanced Micro Devices, Inc. All Rights Reserved.
|
|
#
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
# in the Software without restriction, including without limitation the rights
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
# furnished to do so, subject to the following conditions:
|
|
#
|
|
# The above copyright notice and this permission notice shall be included in all
|
|
# copies or substantial portions of the Software.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
# SOFTWARE.
|
|
##############################################################################el
|
|
|
|
from pathlib import Path
|
|
|
|
import config
|
|
from rocprof_compute_soc.soc_base import OmniSoC_Base
|
|
from roofline import Roofline
|
|
from utils.logger import console_error, console_log, demarcate
|
|
from utils.utils import mibench
|
|
|
|
|
|
class gfx942_soc(OmniSoC_Base):
|
|
def __init__(self, args, mspec):
|
|
super().__init__(args, mspec)
|
|
self.set_arch("gfx942")
|
|
if hasattr(self.get_args(), "roof_only") and self.get_args().roof_only:
|
|
self.set_perfmon_dir(
|
|
str(
|
|
Path(str(config.rocprof_compute_home)).joinpath(
|
|
"rocprof_compute_soc",
|
|
"profile_configs",
|
|
"gfx940",
|
|
"roofline",
|
|
)
|
|
)
|
|
)
|
|
self.set_compatible_profilers(["rocprofv1", "rocprofv2", "rocprofv3"])
|
|
# Per IP block max number of simultaneous counters. GFX IP Blocks
|
|
self.set_perfmon_config(
|
|
{
|
|
"SQ": 8,
|
|
"TA": 2,
|
|
"TD": 2,
|
|
"TCP": 4,
|
|
"TCC": 4,
|
|
"CPC": 2,
|
|
"CPF": 2,
|
|
"SPI": 2,
|
|
"GRBM": 2,
|
|
"GDS": 4,
|
|
}
|
|
)
|
|
self.roofline_obj = Roofline(args, self._mspec)
|
|
|
|
# Set arch specific specs
|
|
self._mspec._l2_banks = 16
|
|
self._mspec.lds_banks_per_cu = 32
|
|
self._mspec.pipes_per_gpu = 4
|
|
|
|
# -----------------------
|
|
# Required child methods
|
|
# -----------------------
|
|
@demarcate
|
|
def profiling_setup(self):
|
|
"""Perform any SoC-specific setup prior to profiling."""
|
|
super().profiling_setup()
|
|
# Performance counter filtering
|
|
self.perfmon_filter(self.get_args().roof_only)
|
|
|
|
@demarcate
|
|
def post_profiling(self):
|
|
"""Perform any SoC-specific post profiling activities."""
|
|
super().post_profiling()
|
|
|
|
if not self.get_args().no_roof:
|
|
console_log(
|
|
"roofline", "Checking for roofline.csv in " + str(self.get_args().path)
|
|
)
|
|
if not Path(self.get_args().path).joinpath("roofline.csv").is_file():
|
|
mibench(self.get_args(), self._mspec)
|
|
self.roofline_obj.post_processing()
|
|
else:
|
|
console_log("roofline", "Skipping roofline")
|
|
|
|
@demarcate
|
|
def analysis_setup(self, roofline_parameters=None):
|
|
"""Perform any SoC-specific setup prior to analysis."""
|
|
super().analysis_setup()
|
|
# configure roofline for analysis
|
|
if roofline_parameters:
|
|
self.roofline_obj = Roofline(
|
|
self.get_args(), self._mspec, roofline_parameters
|
|
)
|