Fix SPI block counter limit (#780)

* Fix SPI counter collection limit

* Update counter collection limits from aqlprofile

* Remove special handling for MI 350 SPI pipe counters

[ROCm/rocprofiler-compute commit: 6e1bbb5efb]
Dieser Commit ist enthalten in:
vedithal-amd
2025-06-27 14:07:56 -04:00
committet von GitHub
Ursprung 2ffaf5b453
Commit 86e243201e
3 geänderte Dateien mit 9 neuen und 49 gelöschten Zeilen
@@ -50,9 +50,7 @@ from utils.utils import (
capture_subprocess_output,
convert_metric_id_to_panel_idx,
detect_rocprof,
get_base_spi_pipe_counter,
get_submodules,
is_spi_pipe_counter,
is_tcc_channel_counter,
using_v3,
)
@@ -669,14 +667,6 @@ class OmniSoC_Base:
if output_file:
output_file.add(ctr)
continue
# Store all pipes for SPI pipe counters in the same file
if is_spi_pipe_counter(ctr):
output_file = spi_pipe_counter_file_map.get(
get_base_spi_pipe_counter(ctr)
)
if output_file:
output_file.add(ctr)
continue
# Add counter to first file that has room
added = False
for i in range(len(output_files)):
@@ -685,11 +675,6 @@ class OmniSoC_Base:
# Store all channels for a TCC channel counter in the same file
if is_tcc_channel_counter(ctr):
tcc_channel_counter_file_map[ctr.split("[")[0]] = output_files[i]
# Store all pipes for SPI pipe counters in the same file
if is_spi_pipe_counter(ctr):
spi_pipe_counter_file_map[get_base_spi_pipe_counter(ctr)] = (
output_files[i]
)
break
# All files are full, create a new file
@@ -902,18 +887,8 @@ class LimitedSet:
if e.split("[")[0] in {element.split("[")[0] for element in self.elements}:
self.elements.append(e)
return True
# Store all pipes for SPI pipe counters in the same file
if is_spi_pipe_counter(e) and get_base_spi_pipe_counter(e) in {
get_base_spi_pipe_counter(element) for element in self.elements
}:
self.elements.append(e)
return True
if self.avail > 0:
# SPI pipe counters take space of 2 counters
if is_spi_pipe_counter(e):
self.avail -= 2
else:
self.avail -= 1
self.avail -= 1
self.elements.append(e)
return True
return False
@@ -9,7 +9,7 @@
# MI GPUs
# |-- series: the specific MI series; mi50, mi100, mi200, mi300
# |-- architecture: currently, only mi300 gpus hold different architectures
# |-- perfmon_config
# |-- perfmon_config, copy from ROCm/aqlprofile from gfxip/gfx9/gfx9_block_info.h
# |-- gpu model
# |-- chip_ids: chip id is specific to the environment the gpu is being used on
# | -- physical
@@ -32,7 +32,7 @@ mi_gpu_spec:
TCC: 4
CPC: 2
CPF: 2
SPI: 2
SPI: 6
GRBM: 2
GDS: 4
models:
@@ -50,7 +50,7 @@ mi_gpu_spec:
TCC: 4
CPC: 2
CPF: 2
SPI: 2
SPI: 6
GRBM: 2
GDS: 4
models:
@@ -69,7 +69,7 @@ mi_gpu_spec:
TCC: 4
CPC: 2
CPF: 2
SPI: 2
SPI: 6
GRBM: 2
GDS: 4
models:
@@ -94,7 +94,7 @@ mi_gpu_spec:
TCC: 4
CPC: 2
CPF: 2
SPI: 2
SPI: 6
GRBM: 2
GDS: 4
models:
@@ -124,7 +124,7 @@ mi_gpu_spec:
TCC: 4
CPC: 2
CPF: 2
SPI: 2
SPI: 6
GRBM: 2
GDS: 4
models:
@@ -159,7 +159,7 @@ mi_gpu_spec:
TCC: 4
CPC: 2
CPF: 2
SPI: 2
SPI: 6
GRBM: 2
GDS: 4
models:
@@ -294,7 +294,7 @@ mi_gpu_spec:
TCC: 4
CPC: 2
CPF: 2
SPI: 2
SPI: 6
GRBM: 2
GDS: 4
TCC_channels: 16
@@ -157,21 +157,6 @@ def extract_counter_info_extra_config_input_yaml(
return None
def is_spi_pipe_counter(counter):
for pattern in spi_pipe_counter_regexs:
if re.match(pattern, counter):
return True
return False
def get_base_spi_pipe_counter(counter):
for pattern in spi_pipe_counter_regexs:
match = re.match(pattern, counter)
if match:
return match.group(1)
return ""
def using_v1():
return "ROCPROF" in os.environ.keys() and os.environ["ROCPROF"].endswith("rocprof")