From cef9e7476719b2acee37df0e298df3691bf2cd4a Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Tue, 31 Oct 2023 10:52:19 -0400 Subject: [PATCH 01/15] 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 02/15] 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 f4082891c903db6fedae52d115dd5e34cec1da87 Mon Sep 17 00:00:00 2001 From: Karl W Schulz Date: Wed, 1 Nov 2023 11:10:29 -0500 Subject: [PATCH 03/15] run profiler tests through queue Signed-off-by: Karl W Schulz [ROCm/rocprofiler-compute commit: a3b9dc7505720b2e4103f7728a42634e10417347] --- 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 898ca1721e..1c2502a3e8 100644 --- a/projects/rocprofiler-compute/.github/workflows/mi100.yml +++ b/projects/rocprofiler-compute/.github/workflows/mi100.yml @@ -37,13 +37,13 @@ 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 if: '!cancelled()' 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 if: '!cancelled()' uses: MishaKav/pytest-coverage-comment@v1.1.48 From 740258f18a96a46d316a9abeec0d13b10231661c Mon Sep 17 00:00:00 2001 From: Karl W Schulz Date: Tue, 31 Oct 2023 13:30:50 -0500 Subject: [PATCH 04/15] 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 94080f40345c4cbb4c3f366ea2bf87eb4d67e5a2 Mon Sep 17 00:00:00 2001 From: Karl W Schulz Date: Wed, 1 Nov 2023 16:50:54 -0500 Subject: [PATCH 05/15] bump wallclock runlimit for test Signed-off-by: Karl W Schulz [ROCm/rocprofiler-compute commit: 65f150e998641ff04ac92b962637bcfc48b3aa7b] --- 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 1c2502a3e8..eefadcc866 100644 --- a/projects/rocprofiler-compute/.github/workflows/mi100.yml +++ b/projects/rocprofiler-compute/.github/workflows/mi100.yml @@ -43,7 +43,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 if: '!cancelled()' uses: MishaKav/pytest-coverage-comment@v1.1.48 From 11530583ce8e31be2743589018245fae7a4e5029 Mon Sep 17 00:00:00 2001 From: Karl W Schulz Date: Wed, 1 Nov 2023 11:10:29 -0500 Subject: [PATCH 06/15] 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 07/15] 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: From ba7ce7f9d80660fbded7645038d2e201fd9eb064 Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Fri, 17 Nov 2023 12:30:39 -0700 Subject: [PATCH 08/15] add requirements-test.txt file to organize python testing dependencies (#205) * add a requirements-test.txt file to organize additional python packages needed to support testing; update CI to install python packages from dependency files Signed-off-by: Karl W Schulz [ROCm/rocprofiler-compute commit: a6ace99bde35d8aef0b6a832723aaf4c47695e98] --- .../rocprofiler-compute/.github/workflows/mi100.yml | 11 +++++++---- projects/rocprofiler-compute/requirements-test.txt | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 projects/rocprofiler-compute/requirements-test.txt diff --git a/projects/rocprofiler-compute/.github/workflows/mi100.yml b/projects/rocprofiler-compute/.github/workflows/mi100.yml index bfe1ed2533..617f75effc 100644 --- a/projects/rocprofiler-compute/.github/workflows/mi100.yml +++ b/projects/rocprofiler-compute/.github/workflows/mi100.yml @@ -17,22 +17,25 @@ jobs: build: runs-on: [mi100, rhel9] env: - TEST_DIR: ${RUNNER_TEMP}/omniperf - PYTHONPATH: /share/sw/omniperf/python-libs + PYTHONPATH: ${{ github.workspace }}/python-libs steps: - name: Checkout uses: actions/checkout@v3 with: submodules: recursive token: ${{ secrets.GH_PAT }} + - name: pythonpath + run: echo ${PYTHONPATH} + - name: Install Python collateral (build and test) + run: | + pip3 install -t ${PYTHONPATH} -r requirements.txt + pip3 install -t ${PYTHONPATH} -r requirements-test.txt - name: Configure run: | mkdir build cd build ml cmake 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 diff --git a/projects/rocprofiler-compute/requirements-test.txt b/projects/rocprofiler-compute/requirements-test.txt new file mode 100644 index 0000000000..27054f2588 --- /dev/null +++ b/projects/rocprofiler-compute/requirements-test.txt @@ -0,0 +1,3 @@ +mock +pytest +pytest-cov From 7894ac57049c4c6dc0c7bcce971fc06c5f13bd11 Mon Sep 17 00:00:00 2001 From: colramos-amd Date: Thu, 2 Nov 2023 16:14:16 -0500 Subject: [PATCH 09/15] Dynamically load dependency checker from requirements.txt Signed-off-by: colramos-amd [ROCm/rocprofiler-compute commit: c850d83bbd5ae6f0348894ba6ff80adec00b974f] --- projects/rocprofiler-compute/CMakeLists.txt | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/projects/rocprofiler-compute/CMakeLists.txt b/projects/rocprofiler-compute/CMakeLists.txt index c801eb75e5..51e45f3515 100644 --- a/projects/rocprofiler-compute/CMakeLists.txt +++ b/projects/rocprofiler-compute/CMakeLists.txt @@ -72,20 +72,7 @@ if(DEFINED PYTHON_DEPS) endif() # Check required Python packages -set(pythonDeps - "astunparse" - "colorlover" - "dash" - "matplotlib" - "numpy" - "pandas" - "pymongo" - "yaml" - "tabulate" - "tqdm" - "dash_svg" - "dash_bootstrap_components" - "kaleido") +file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/requirements.txt" pythonDeps) message(STATUS "Checking for required Python package dependencies...") set_property(GLOBAL PROPERTY pythonDepsFlag "groovy") @@ -105,6 +92,7 @@ endfunction() list(APPEND CMAKE_MESSAGE_INDENT " ") foreach(package IN LISTS pythonDeps) + string(REGEX REPLACE "[><=].*" "" package "${package}") checkpythonpackage(${package}) endforeach() list(POP_BACK CMAKE_MESSAGE_INDENT) From a0d57cd25a7c4f9bc11becf71abdd3e17b66851e Mon Sep 17 00:00:00 2001 From: colramos-amd Date: Thu, 2 Nov 2023 16:21:29 -0500 Subject: [PATCH 10/15] Add comments Signed-off-by: colramos-amd [ROCm/rocprofiler-compute commit: 69f705f634e6901f55cf174e8abf6a6f9f49f2db] --- projects/rocprofiler-compute/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/rocprofiler-compute/CMakeLists.txt b/projects/rocprofiler-compute/CMakeLists.txt index 51e45f3515..4789647635 100644 --- a/projects/rocprofiler-compute/CMakeLists.txt +++ b/projects/rocprofiler-compute/CMakeLists.txt @@ -92,6 +92,7 @@ endfunction() list(APPEND CMAKE_MESSAGE_INDENT " ") foreach(package IN LISTS pythonDeps) + # Filter out any version requirements from requirements.txt string(REGEX REPLACE "[><=].*" "" package "${package}") checkpythonpackage(${package}) endforeach() From e3b3ea3aab15a939ae5aa08f861c330e0c895628 Mon Sep 17 00:00:00 2001 From: colramos-amd Date: Thu, 2 Nov 2023 16:37:35 -0500 Subject: [PATCH 11/15] Replace any - with _ for checker logic Signed-off-by: colramos-amd [ROCm/rocprofiler-compute commit: 646c311af680ae961180ce919506254d84b1d862] --- projects/rocprofiler-compute/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/rocprofiler-compute/CMakeLists.txt b/projects/rocprofiler-compute/CMakeLists.txt index 4789647635..0b9911598e 100644 --- a/projects/rocprofiler-compute/CMakeLists.txt +++ b/projects/rocprofiler-compute/CMakeLists.txt @@ -94,6 +94,7 @@ list(APPEND CMAKE_MESSAGE_INDENT " ") foreach(package IN LISTS pythonDeps) # Filter out any version requirements from requirements.txt string(REGEX REPLACE "[><=].*" "" package "${package}") + string(REPLACE "-" "_" package "${package}") checkpythonpackage(${package}) endforeach() list(POP_BACK CMAKE_MESSAGE_INDENT) From 45aaa29b5f6cf5e206a9372a27044ecbb95e610d Mon Sep 17 00:00:00 2001 From: Karl W Schulz Date: Fri, 17 Nov 2023 15:29:29 -0600 Subject: [PATCH 12/15] Update cmake config with Fix for pyyaml package installation check Signed-off-by: Karl W Schulz [ROCm/rocprofiler-compute commit: f100ef8ff50475a510215fe04cf5e52289088f6c] --- projects/rocprofiler-compute/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/rocprofiler-compute/CMakeLists.txt b/projects/rocprofiler-compute/CMakeLists.txt index 0b9911598e..1f6ad8618e 100644 --- a/projects/rocprofiler-compute/CMakeLists.txt +++ b/projects/rocprofiler-compute/CMakeLists.txt @@ -78,8 +78,13 @@ message(STATUS "Checking for required Python package dependencies...") set_property(GLOBAL PROPERTY pythonDepsFlag "groovy") function(checkPythonPackage [package]) + # mapping for non-default package names + set(PACKAGE ${ARGV0}) + if(${ARGV0} STREQUAL "pyyaml") + set(PACKAGE "yaml") + endif() execute_process( - COMMAND ${Python3_EXECUTABLE} -c "import ${ARGV0}" + COMMAND ${Python3_EXECUTABLE} -c "import ${PACKAGE}" OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE EXIT_CODE) if(${EXIT_CODE} EQUAL 0) From e6af1314e497862d82de5e00f3e7ae991d142a37 Mon Sep 17 00:00:00 2001 From: Karl W Schulz Date: Fri, 17 Nov 2023 16:16:47 -0600 Subject: [PATCH 13/15] update mi100 CI config Signed-off-by: Karl W Schulz [ROCm/rocprofiler-compute commit: 63d6289754e9d282e548aaf67128488efa568f3b] --- 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 617f75effc..093b1de202 100644 --- a/projects/rocprofiler-compute/.github/workflows/mi100.yml +++ b/projects/rocprofiler-compute/.github/workflows/mi100.yml @@ -1,7 +1,7 @@ name: mi100 on: - pull_request: + push: branches: - '2.x' From 7c82cd4c89903e2daaa8799f10b4d5962be8797c Mon Sep 17 00:00:00 2001 From: JoseSantosAMD <87447437+JoseSantosAMD@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:57:29 -0600 Subject: [PATCH 14/15] upgrade jsdom version (#206) Signed-off-by: JoseSantosAMD [ROCm/rocprofiler-compute commit: 235f812e2cdbc5b751b5e961da15397938771d08] --- .../grafana_plugins/omniperfData_plugin/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocprofiler-compute/grafana_plugins/omniperfData_plugin/package.json b/projects/rocprofiler-compute/grafana_plugins/omniperfData_plugin/package.json index 7ed4c9d1ba..d31f7c7c84 100644 --- a/projects/rocprofiler-compute/grafana_plugins/omniperfData_plugin/package.json +++ b/projects/rocprofiler-compute/grafana_plugins/omniperfData_plugin/package.json @@ -18,7 +18,7 @@ "chai": "~4.2.0", "gulp": "^4.0.2", "gulp-babel": "^7.0.1", - "jsdom": "~16.2.2", + "jsdom": ">=16.5.0", "prunk": "^1.3.1", "q": "^1.5.1" }, From 311014ddbd629052fda78ecc3830872a8c89ddc3 Mon Sep 17 00:00:00 2001 From: JoseSantosAMD <87447437+JoseSantosAMD@users.noreply.github.com> Date: Thu, 30 Nov 2023 13:31:20 -0600 Subject: [PATCH 15/15] RHEL9 uses RHEL8 roofline binary (#208) Signed-off-by: JoseSantosAMD [ROCm/rocprofiler-compute commit: f52a1c8df58c5da5fa98df6d7cfbc18d1e319bc2] --- projects/rocprofiler-compute/src/omniperf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/rocprofiler-compute/src/omniperf b/projects/rocprofiler-compute/src/omniperf index ec239271c2..5b80000d24 100755 --- a/projects/rocprofiler-compute/src/omniperf +++ b/projects/rocprofiler-compute/src/omniperf @@ -308,9 +308,9 @@ def detect_roofline(): print("ROOFLINE ERROR: user-supplied path to binary not accessible") print("--> ROOFLINE_BIN = %s\n" % target_binary) sys.exit(1) - elif rhel_distro == "platform:el8": + elif rhel_distro == "platform:el8" or rhel_distro == "platform:el9": # Must be a valid RHEL machine - distro = rhel_distro + distro = "platform:el8" elif ( (type(sles_distro) == str and len(sles_distro) >= 3) and # confirm string and len sles_distro[:2] == "15" and int(sles_distro[3]) >= 3 # SLES15 and SP >= 3