From cef9e7476719b2acee37df0e298df3691bf2cd4a Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Tue, 31 Oct 2023 10:52:19 -0400 Subject: [PATCH 1/5] add mi100 badge Signed-off-by: Karl W. Schulz [ROCm/rocprofiler-compute commit: bf79b8c0c55dcb28433eeb5abe3e0125a0820a23] --- projects/rocprofiler-compute/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/rocprofiler-compute/README.md b/projects/rocprofiler-compute/README.md index 34bef5a2ed..346b7d9edd 100644 --- a/projects/rocprofiler-compute/README.md +++ b/projects/rocprofiler-compute/README.md @@ -1,5 +1,6 @@ [![Ubuntu 20.04](https://github.com/AMDResearch/omniperf/actions/workflows/ubuntu-focal.yml/badge.svg)](https://github.com/AMDResearch/omniperf/actions/workflows/ubuntu-focal.yml) [![RHEL 8](https://github.com/AMDResearch/omniperf/actions/workflows/opensuse.yml/badge.svg)](https://github.com/AMDResearch/omniperf/actions/workflows/opensuse.yml) +[![MI100](https://github.com/AMDResearch/omniperf/actions/workflows/mi100.yml/badge.svg?branch=2.x)](https://github.com/AMDResearch/omniperf/actions/workflows/mi100.yml) [![Docs](https://github.com/AMDResearch/omniperf/actions/workflows/docs.yml/badge.svg)](https://amdresearch.github.io/omniperf/) [![DOI](https://zenodo.org/badge/561919887.svg)](https://zenodo.org/badge/latestdoi/561919887) From 55011685afef237f9e06618d9e3195bd97e2b209 Mon Sep 17 00:00:00 2001 From: Karl W Schulz Date: Tue, 31 Oct 2023 13:23:00 -0500 Subject: [PATCH 2/5] include step to build hip binary Signed-off-by: Karl W Schulz [ROCm/rocprofiler-compute commit: 410b06c8e826f8aa155d974b6c53f25de66b5507] --- projects/rocprofiler-compute/.github/workflows/mi100.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/rocprofiler-compute/.github/workflows/mi100.yml b/projects/rocprofiler-compute/.github/workflows/mi100.yml index b74533d77f..b28246973d 100644 --- a/projects/rocprofiler-compute/.github/workflows/mi100.yml +++ b/projects/rocprofiler-compute/.github/workflows/mi100.yml @@ -33,6 +33,8 @@ jobs: cmake -DENABLE_COVERAGE=ON .. - name: Install Python testing collateral run: pip3 install pytest pytest-cov mock + - name: Create HIP binary (vcopy) + run: hipcc -o tests/vcopy ./sample/vcopy.cpp - name: Run [profile] mode run: | cd build From 740258f18a96a46d316a9abeec0d13b10231661c Mon Sep 17 00:00:00 2001 From: Karl W Schulz Date: Tue, 31 Oct 2023 13:30:50 -0500 Subject: [PATCH 3/5] add additional top-level vars for number of kernels expected and dispatch id; tests updated to use these vars so that vcopy binary can be used instead of mixbench Signed-off-by: Karl W Schulz [ROCm/rocprofiler-compute commit: 12fe6cc50829de4bb832c0820bcc61c963d6d391] --- .../tests/test_profile_general.py | 89 ++++++++++--------- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/projects/rocprofiler-compute/tests/test_profile_general.py b/projects/rocprofiler-compute/tests/test_profile_general.py index 7e4f540582..563ed18eff 100644 --- a/projects/rocprofiler-compute/tests/test_profile_general.py +++ b/projects/rocprofiler-compute/tests/test_profile_general.py @@ -11,13 +11,15 @@ import inspect omniperf = SourceFileLoader("omniperf", "src/omniperf").load_module() workload_1 = os.path.realpath("workload") -# kernel_name_1 = "vecCopy(double*, double*, double*, int, int) [clone .kd]" -kernel_name_1 = "void benchmark_func<__half2, 256, 8u, 11u>(__half2, __half2*) " +kernel_name_1 = "vecCopy(double*, double*, double*, int, int) [clone .kd]" +## kernel_name_1 = "void benchmark_func<__half2, 256, 8u, 11u>(__half2, __half2*) " # change to directory where app is at # app_1 = ["./sample/vcopy", "1048576", "256"] -app_1 = ["./mixbench/build_mi100/mixbench-hip"] - +# app_1 = ["./mixbench/build_mi100/mixbench-hip"] +app_1 = ["./tests/vcopy", "1048576", "256"] +num_kernels = 1 +dispatch_id = 0 ALL_CSVS = [ "SQ_IFETCH_LEVEL.csv", @@ -254,8 +256,9 @@ def test_path(): file_dict[file] = pd.read_csv(workload_1 + "/" + file, index_col=0) print("length is: ", len(file_dict[file].index)) print(file_dict[file]) + # TODO: verify contents: we know function evaluated if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) if soc == "mi200": print(sorted(list(file_dict.keys()))) @@ -300,7 +303,7 @@ def test_kernel(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == ALL_CSVS_MI200 @@ -344,7 +347,7 @@ def test_kernel_summaries(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == ALL_CSVS_MI200 @@ -388,7 +391,7 @@ def test_ipblocks_SQ(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) expected_csvs = [ "SQ_IFETCH_LEVEL.csv", @@ -474,7 +477,7 @@ def test_ipblocks_SQC(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) expected_csvs = [ "pmc_perf.csv", @@ -527,7 +530,7 @@ def test_ipblocks_TA(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) @@ -586,7 +589,7 @@ def test_ipblocks_TD(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) @@ -649,7 +652,7 @@ def test_ipblocks_TCP(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) expected_csvs = [ @@ -709,7 +712,7 @@ def test_ipblocks_TCC(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) expected_csvs = [ @@ -770,7 +773,7 @@ def test_ipblocks_SPI(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) expected_csvs = [ @@ -829,7 +832,7 @@ def test_ipblocks_CPC(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) expected_csvs = [ "pmc_perf.csv", @@ -883,7 +886,7 @@ def test_ipblocks_CPF(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) expected_csvs = [ "pmc_perf.csv", @@ -936,7 +939,7 @@ def test_ipblocks_SQ_CPC(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) expected_csvs = [ @@ -1024,7 +1027,7 @@ def test_ipblocks_SQ_TA(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) expected_csvs = [ @@ -1111,7 +1114,7 @@ def test_ipblocks_SQ_SPI(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) expected_csvs = [ @@ -1200,7 +1203,7 @@ def test_ipblocks_SQ_SQC_TCP_CPC(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) expected_csvs = [ @@ -1291,7 +1294,7 @@ def test_ipblocks_SQ_SPI_TA_TCC_CPF(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels print(sorted(list(file_dict.keys()))) expected_csvs = [ @@ -1423,7 +1426,7 @@ def test_dispatch_0_1(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file and not "roofline" in file: - assert len(file_dict[file].index) == 2 + assert len(file_dict[file].index) == num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == ALL_CSVS_MI200 @@ -1449,7 +1452,7 @@ def test_dispatch_2(): "--path", workload_1, "--dispatch", - "2", + dispatch_id, "--", ] + app_1, @@ -1511,7 +1514,7 @@ def test_kernel_verbose_0(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == ALL_CSVS_MI200 @@ -1555,7 +1558,7 @@ def test_kernel_verbose_1(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == ALL_CSVS_MI200 @@ -1599,7 +1602,7 @@ def test_kernel_verbose_2(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == ALL_CSVS_MI200 @@ -1643,7 +1646,7 @@ def test_kernel_verbose_3(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == ALL_CSVS_MI200 @@ -1687,7 +1690,7 @@ def test_kernel_verbose_4(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == ALL_CSVS_MI200 @@ -1731,7 +1734,7 @@ def test_kernel_verbose_5(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == ALL_CSVS_MI200 @@ -1775,7 +1778,7 @@ def test_join_type_grid(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == ALL_CSVS_MI200 @@ -1819,7 +1822,7 @@ def test_join_type_kernel(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == ALL_CSVS_MI200 @@ -1866,7 +1869,7 @@ def test_device_0(): if "roofline" in file: assert len(file_dict[file].index) else: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == ALL_CSVS_MI200 @@ -1909,7 +1912,7 @@ def test_no_roof(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels if soc == "mi200": print(sorted(list(file_dict.keys()))) assert sorted(list(file_dict.keys())) == [ @@ -1986,7 +1989,7 @@ def test_sort_dispatches(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels elif file.endswith(".pdf"): file_dict[file] = "pdf" if soc == "mi200": @@ -2038,7 +2041,7 @@ def test_sort_kernels(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels elif file.endswith(".pdf"): file_dict[file] = "pdf" if soc == "mi200": @@ -2091,7 +2094,7 @@ def test_mem_levels_HBM(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels elif file.endswith(".pdf"): file_dict[file] = "pdf" if soc == "mi200": @@ -2144,7 +2147,7 @@ def test_mem_levels_L2(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels elif file.endswith(".pdf"): file_dict[file] = "pdf" if soc == "mi200": @@ -2196,7 +2199,7 @@ def test_mem_levels_vL1D(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels elif file.endswith(".pdf"): file_dict[file] = "pdf" if soc == "mi200": @@ -2248,7 +2251,7 @@ def test_mem_levels_LDS(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels elif file.endswith(".pdf"): file_dict[file] = "pdf" if soc == "mi200": @@ -2301,7 +2304,7 @@ def test_mem_levels_HBM_LDS(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels elif file.endswith(".pdf"): file_dict[file] = "pdf" if soc == "mi200": @@ -2354,7 +2357,7 @@ def test_mem_levels_vL1D_LDS(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels elif file.endswith(".pdf"): file_dict[file] = "pdf" if soc == "mi200": @@ -2407,7 +2410,7 @@ def test_mem_levels_L2_vL1D_LDS(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels elif file.endswith(".pdf"): file_dict[file] = "pdf" if soc == "mi200": @@ -2458,7 +2461,7 @@ def test_kernel_names(): if file.endswith(".csv"): file_dict[file] = pd.read_csv(workload_1 + "/" + file) if not "sysinfo" in file: - assert len(file_dict[file].index) > 3 + assert len(file_dict[file].index) >= num_kernels elif file.endswith(".pdf"): file_dict[file] = "pdf" if soc == "mi200": From 11530583ce8e31be2743589018245fae7a4e5029 Mon Sep 17 00:00:00 2001 From: Karl W Schulz Date: Wed, 1 Nov 2023 11:10:29 -0500 Subject: [PATCH 4/5] run profiler tests through queue Signed-off-by: Karl W Schulz [ROCm/rocprofiler-compute commit: dd36ee2a29084827ab86283ae982dde78f37678e] --- projects/rocprofiler-compute/.github/workflows/mi100.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/rocprofiler-compute/.github/workflows/mi100.yml b/projects/rocprofiler-compute/.github/workflows/mi100.yml index b28246973d..ce6271f11d 100644 --- a/projects/rocprofiler-compute/.github/workflows/mi100.yml +++ b/projects/rocprofiler-compute/.github/workflows/mi100.yml @@ -39,12 +39,12 @@ jobs: run: | cd build ml cmake - ctest --verbose -R test_profiler_general + srun -N 1 -J omniperf -p ci -t 00:10:00 ctest --verbose -R test_profiler_general - name: Run [analyze] mode run: | cd build ml cmake - srun -N 1 -J omniperf -p ci -t 00:25:00 ctest --verbose -R test_analyze_commands + srun -N 1 -J omniperf -p ci -t 00:35:00 ctest --verbose -R test_analyze_commands - name: Pytest coverage comment uses: MishaKav/pytest-coverage-comment@v1.1.48 with: From afb19a377bafc3d8a0c466d7613215b9fc6c848b Mon Sep 17 00:00:00 2001 From: Karl W Schulz Date: Wed, 1 Nov 2023 16:50:54 -0500 Subject: [PATCH 5/5] bump wallclock runlimit for test Signed-off-by: Karl W Schulz [ROCm/rocprofiler-compute commit: bacdf8c09df5483705f52461ad31e2f39b4b4de7] --- projects/rocprofiler-compute/.github/workflows/mi100.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocprofiler-compute/.github/workflows/mi100.yml b/projects/rocprofiler-compute/.github/workflows/mi100.yml index ce6271f11d..df086e3d0d 100644 --- a/projects/rocprofiler-compute/.github/workflows/mi100.yml +++ b/projects/rocprofiler-compute/.github/workflows/mi100.yml @@ -44,7 +44,7 @@ jobs: run: | cd build ml cmake - srun -N 1 -J omniperf -p ci -t 00:35:00 ctest --verbose -R test_analyze_commands + srun -N 1 -J omniperf -p ci -t 00:55:00 ctest --verbose -R test_analyze_commands - name: Pytest coverage comment uses: MishaKav/pytest-coverage-comment@v1.1.48 with: