[rocprofiler-compute] Fixes for roofline when used with iteration multiplexing (#2635)

*Added iteration_multiplex_impute_counters on pmc data- GUI dataframe did not implement this in the build_layout method previously
*Created a Workload() in profile mode post-processing for roofline html standalone plot to be generated- this will be removed once roofline plot is moved to analyze phase in future release
*Added iteration_multiplexing run parameter to roofline object init so that we can accurately parse dataframe if the option was used during profiling- this helps us to avoid reading nan values in certain dispatches that did not get imputed in calc_ai_profile
*Cleanup for unused legacy code, adjusted method parameters to assist in moving roofline plotting to analyze mode in future release
*Update iteration multiplexing data imputation algorithm to impute counters for ungrouped dispatches at the end based on the previous group. This however won't work if there are no dispatches that can be grouped (i.e. number of dispatches < number of counter buckets)

---------

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
Co-authored-by: Vignesh Edithal <Vignesh.Edithal@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
cfallows-amd
2026-01-23 11:10:46 -05:00
committed by GitHub
parent fc4422d73b
commit 62dd4d114d
7 changed files with 123 additions and 67 deletions
@@ -75,6 +75,8 @@ config["COUNTER_LOGGING"] = False
config["METRIC_COMPARE"] = False
config["METRIC_LOGGING"] = False
arch_config = {}
num_kernels = 3
num_devices = 1
@@ -1326,6 +1328,7 @@ def test_roofline_missing_file_handling(binary_handler_profile_rocprof_compute):
try:
from roofline import Roofline
from utils.schema import Workload
from utils.specs import generate_machine_specs
class MockArgs:
@@ -1337,6 +1340,7 @@ def test_roofline_missing_file_handling(binary_handler_profile_rocprof_compute):
args = MockArgs()
mspec = generate_machine_specs(None, None)
workload = Workload()
workload_dir = test_utils.get_output_dir()
@@ -1351,7 +1355,9 @@ def test_roofline_missing_file_handling(binary_handler_profile_rocprof_compute):
roofline_instance = Roofline(args, mspec, run_parameters)
result = roofline_instance.cli_generate_plot("FP32")
result = roofline_instance.cli_generate_plot(
"FP32", workload, config, arch_config
)
assert result is None
@@ -1378,6 +1384,7 @@ def test_roofline_invalid_datatype_cli(binary_handler_profile_rocprof_compute):
try:
from roofline import Roofline
from utils.schema import Workload
from utils.specs import generate_machine_specs
class MockArgs:
@@ -1389,6 +1396,7 @@ def test_roofline_invalid_datatype_cli(binary_handler_profile_rocprof_compute):
args = MockArgs()
mspec = generate_machine_specs(None, None)
workload = Workload()
run_parameters = {
"workload_dir": test_utils.get_output_dir(),
@@ -1401,7 +1409,9 @@ def test_roofline_invalid_datatype_cli(binary_handler_profile_rocprof_compute):
roofline_instance = Roofline(args, mspec, run_parameters)
result = roofline_instance.cli_generate_plot("INVALID_DATATYPE")
result = roofline_instance.cli_generate_plot(
"INVALID_DATATYPE", workload, config, arch_config
)
assert result is None