From 1eda63c1d2867d7c2bc798036c78537fbcb362ec Mon Sep 17 00:00:00 2001 From: Jose Santos Date: Thu, 7 Mar 2024 15:21:44 -0600 Subject: [PATCH] Change ipblocks flag to --blocks Signed-off-by: Jose Santos [ROCm/rocprofiler-compute commit: 66696f852b4d05f67bcd7c300b472d3d08e63df8] --- projects/rocprofiler-compute/pyproject.toml | 2 +- .../tests/test_analyze_commands.py | 50 +++++------ .../tests/test_profile_general.py | 84 +++++++++---------- 3 files changed, 68 insertions(+), 68 deletions(-) diff --git a/projects/rocprofiler-compute/pyproject.toml b/projects/rocprofiler-compute/pyproject.toml index c0f0505ac5..0bd5e23b48 100644 --- a/projects/rocprofiler-compute/pyproject.toml +++ b/projects/rocprofiler-compute/pyproject.toml @@ -45,7 +45,7 @@ markers = [ "verbosity", "dispatch", "list_metrics", - "filter_metrics", + "filter_block", "filter_kernel", "dispatch", "normal_unit", diff --git a/projects/rocprofiler-compute/tests/test_analyze_commands.py b/projects/rocprofiler-compute/tests/test_analyze_commands.py index b4e0ffcce6..50fd7d8632 100644 --- a/projects/rocprofiler-compute/tests/test_analyze_commands.py +++ b/projects/rocprofiler-compute/tests/test_analyze_commands.py @@ -175,8 +175,8 @@ def test_list_metrics_gfx908(): assert e.value.code == 0 -@pytest.mark.filter_metrics -def test_filter_metrics_1(): +@pytest.mark.filter_block +def test_filter_block_1(): with pytest.raises(SystemExit) as e: with patch( "sys.argv", @@ -185,7 +185,7 @@ def test_filter_metrics_1(): "analyze", "--path", "tests/workloads/vcopy/MI100", - "--metric", + "--block", "1", ], ): @@ -200,7 +200,7 @@ def test_filter_metrics_1(): "analyze", "--path", "tests/workloads/vcopy/MI200", - "--metric", + "--block", "1", ], ): @@ -208,8 +208,8 @@ def test_filter_metrics_1(): assert e.value.code == 0 -@pytest.mark.filter_metrics -def test_filter_metrics_2(): +@pytest.mark.filter_block +def test_filter_block_2(): with pytest.raises(SystemExit) as e: with patch( "sys.argv", @@ -218,7 +218,7 @@ def test_filter_metrics_2(): "analyze", "--path", "tests/workloads/vcopy/MI100", - "--metric", + "--block", "5", ], ): @@ -233,7 +233,7 @@ def test_filter_metrics_2(): "analyze", "--path", "tests/workloads/vcopy/MI200", - "--metric", + "--block", "5", ], ): @@ -241,8 +241,8 @@ def test_filter_metrics_2(): assert e.value.code == 0 -@pytest.mark.filter_metrics -def test_filter_metrics_3(): +@pytest.mark.filter_block +def test_filter_block_3(): with pytest.raises(SystemExit) as e: with patch( "sys.argv", @@ -251,7 +251,7 @@ def test_filter_metrics_3(): "analyze", "--path", "tests/workloads/vcopy/MI100", - "--metric", + "--block", "5.2.2", ], ): @@ -266,7 +266,7 @@ def test_filter_metrics_3(): "analyze", "--path", "tests/workloads/vcopy/MI200", - "--metric", + "--block", "5.2.2", ], ): @@ -274,8 +274,8 @@ def test_filter_metrics_3(): assert e.value.code == 0 -@pytest.mark.filter_metrics -def test_filter_metrics_4(): +@pytest.mark.filter_block +def test_filter_block_4(): with pytest.raises(SystemExit) as e: with patch( "sys.argv", @@ -284,7 +284,7 @@ def test_filter_metrics_4(): "analyze", "--path", "tests/workloads/vcopy/MI100", - "--metric", + "--block", "6.1", ], ): @@ -299,7 +299,7 @@ def test_filter_metrics_4(): "analyze", "--path", "tests/workloads/vcopy/MI200", - "--metric", + "--block", "6.1", ], ): @@ -307,8 +307,8 @@ def test_filter_metrics_4(): assert e.value.code == 0 -@pytest.mark.filter_metrics -def test_filter_metrics_5(): +@pytest.mark.filter_block +def test_filter_block_5(): with pytest.raises(SystemExit) as e: with patch( "sys.argv", @@ -317,7 +317,7 @@ def test_filter_metrics_5(): "analyze", "--path", "tests/workloads/vcopy/MI100", - "--metric", + "--block", "10", ], ): @@ -332,7 +332,7 @@ def test_filter_metrics_5(): "analyze", "--path", "tests/workloads/vcopy/MI200", - "--metric", + "--block", "10", ], ): @@ -340,8 +340,8 @@ def test_filter_metrics_5(): assert e.value.code == 0 -@pytest.mark.filter_metrics -def test_filter_metrics_6(): +@pytest.mark.filter_block +def test_filter_block_6(): with pytest.raises(SystemExit) as e: with patch( "sys.argv", @@ -350,7 +350,7 @@ def test_filter_metrics_6(): "analyze", "--path", "tests/workloads/vcopy/MI100", - "--metric", + "--block", "100", ], ): @@ -365,7 +365,7 @@ def test_filter_metrics_6(): "analyze", "--path", "tests/workloads/vcopy/MI200", - "--metric", + "--block", "100", ], ): @@ -1209,7 +1209,7 @@ def test_save_dfs(): single_row_tables = [ "0.1_Top_Kernels.csv", "13.3_Instruction_Cache_-_L2_Interface.csv", - "18.1_Aggregate_Stats_(All_32_channels).csv", + "18.1_Aggregate_Stats_(All_channels).csv", ] for file_name in files_in_workload: df = pd.read_csv(output_path + "/" + file_name) diff --git a/projects/rocprofiler-compute/tests/test_profile_general.py b/projects/rocprofiler-compute/tests/test_profile_general.py index c65cda8bdd..f93e9971ca 100644 --- a/projects/rocprofiler-compute/tests/test_profile_general.py +++ b/projects/rocprofiler-compute/tests/test_profile_general.py @@ -625,9 +625,9 @@ def test_kernel_summaries(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_SQ(): - options = baseline_opts + ["--ipblocks", "SQ"] +@pytest.mark.blocks +def test_blocks_SQ(): + options = baseline_opts + ["--blocks", "SQ"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -688,9 +688,9 @@ def test_ipblocks_SQ(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_SQC(): - options = baseline_opts + ["--ipblocks", "SQC"] +@pytest.mark.blocks +def test_blocks_SQC(): + options = baseline_opts + ["--blocks", "SQC"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -718,9 +718,9 @@ def test_ipblocks_SQC(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_TA(): - options = baseline_opts + ["--ipblocks", "TA"] +@pytest.mark.blocks +def test_blocks_TA(): + options = baseline_opts + ["--blocks", "TA"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -752,9 +752,9 @@ def test_ipblocks_TA(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_TD(): - options = baseline_opts + ["--ipblocks", "TD"] +@pytest.mark.blocks +def test_blocks_TD(): + options = baseline_opts + ["--blocks", "TD"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -790,9 +790,9 @@ def test_ipblocks_TD(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_TCP(): - options = baseline_opts + ["--ipblocks", "TCP"] +@pytest.mark.blocks +def test_blocks_TCP(): + options = baseline_opts + ["--blocks", "TCP"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -826,9 +826,9 @@ def test_ipblocks_TCP(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_TCC(): - options = baseline_opts + ["--ipblocks", "TCC"] +@pytest.mark.blocks +def test_blocks_TCC(): + options = baseline_opts + ["--blocks", "TCC"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -863,9 +863,9 @@ def test_ipblocks_TCC(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_SPI(): - options = baseline_opts + ["--ipblocks", "SPI"] +@pytest.mark.blocks +def test_blocks_SPI(): + options = baseline_opts + ["--blocks", "SPI"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -898,9 +898,9 @@ def test_ipblocks_SPI(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_CPC(): - options = baseline_opts + ["--ipblocks", "CPC"] +@pytest.mark.blocks +def test_blocks_CPC(): + options = baseline_opts + ["--blocks", "CPC"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -925,9 +925,9 @@ def test_ipblocks_CPC(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_CPF(): - options = baseline_opts + ["--ipblocks", "CPF"] +@pytest.mark.blocks +def test_blocks_CPF(): + options = baseline_opts + ["--blocks", "CPF"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -954,9 +954,9 @@ def test_ipblocks_CPF(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_SQ_CPC(): - options = baseline_opts + ["--ipblocks", "SQ", "CPC"] +@pytest.mark.blocks +def test_blocks_SQ_CPC(): + options = baseline_opts + ["--blocks", "SQ", "CPC"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -1017,9 +1017,9 @@ def test_ipblocks_SQ_CPC(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_SQ_TA(): - options = baseline_opts + ["--ipblocks", "SQ", "TA"] +@pytest.mark.blocks +def test_blocks_SQ_TA(): + options = baseline_opts + ["--blocks", "SQ", "TA"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -1075,9 +1075,9 @@ def test_ipblocks_SQ_TA(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_SQ_SPI(): - options = baseline_opts + ["--ipblocks", "SQ", "SPI"] +@pytest.mark.blocks +def test_blocks_SQ_SPI(): + options = baseline_opts + ["--blocks", "SQ", "SPI"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -1136,9 +1136,9 @@ def test_ipblocks_SQ_SPI(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_SQ_SQC_TCP_CPC(): - options = baseline_opts + ["--ipblocks", "SQ", "SQC", "TCP", "CPC"] +@pytest.mark.blocks +def test_blocks_SQ_SQC_TCP_CPC(): + options = baseline_opts + ["--blocks", "SQ", "SQC", "TCP", "CPC"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir) @@ -1195,9 +1195,9 @@ def test_ipblocks_SQ_SQC_TCP_CPC(): test_utils.clean_output_dir(config["cleanup"], workload_dir) -@pytest.mark.ipblocks -def test_ipblocks_SQ_SPI_TA_TCC_CPF(): - options = baseline_opts + ["--ipblocks", "SQ", "SPI", "TA", "TCC", "CPF"] +@pytest.mark.blocks +def test_blocks_SQ_SPI_TA_TCC_CPF(): + options = baseline_opts + ["--blocks", "SQ", "SPI", "TA", "TCC", "CPF"] workload_dir = test_utils.get_output_dir() test_utils.launch_omniperf(config, options, workload_dir)