From dc4ff2577164b55760c85c62c4b46c3a16be8487 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 25 Nov 2025 11:46:18 -0500 Subject: [PATCH 01/68] Enable test builds for rocprofiler-compute, updated artifact subproject deps --- profiler/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index 9476b869881..cc0eab443b7 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -97,6 +97,8 @@ if(THEROCK_ENABLE_ROCPROFV3) BACKGROUND_BUILD CMAKE_ARGS -DHIP_PLATFORM=amd + -DENABLE_TESTS=ON + -DINSTALL_TESTS=ON CMAKE_INCLUDES therock_explicit_finders.cmake COMPILER_TOOLCHAIN @@ -183,11 +185,8 @@ if(THEROCK_ENABLE_ROCPROFV3) run test SUBPROJECT_DEPS - aqlprofile rocprofiler-sdk rocprofiler-compute - roctracer - ${_rocprofiler_sdk_optional_deps} ) ############################################################################## From 7049feb3fb887a02253da11497574cedade08207 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 25 Nov 2025 13:22:26 -0500 Subject: [PATCH 02/68] Add rocprofiler options to installing_artifacts.md --- docs/development/installing_artifacts.md | 36 +++++++++++++----------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/docs/development/installing_artifacts.md b/docs/development/installing_artifacts.md index 98679b468ce..8766b1e0ac6 100644 --- a/docs/development/installing_artifacts.md +++ b/docs/development/installing_artifacts.md @@ -6,23 +6,25 @@ This document provides instructions for installing ROCm artifacts from TheRock b The script supports the following command-line options: -| Option | Type | Description | -| ----------------- | ------ | ---------------------------------------------------------------------- | -| `--amdgpu-family` | String | AMD GPU family target (required) | -| `--base-only` | Flag | Include only base artifacts (minimal installation) | -| `--blas` | Flag | Include BLAS artifacts | -| `--fft` | Flag | Include FFT artifacts | -| `--hipdnn` | Flag | Include hipDNN artifacts | -| `--input-dir` | String | Existing TheRock directory to copy from | -| `--miopen` | Flag | Include MIOpen artifacts | -| `--output-dir` | Path | Output directory for TheRock installation (default: `./therock-build`) | -| `--prim` | Flag | Include primitives artifacts | -| `--rand` | Flag | Include random number generator artifacts | -| `--rccl` | Flag | Include RCCL artifacts | -| `--rocwmma` | Flag | Include rocWMMA artifacts | -| `--release` | String | Release version from nightly or dev tarballs | -| `--run-id` | String | GitHub CI workflow run ID to install from | -| `--tests` | Flag | Include test artifacts for enabled components | +| Option | Type | Description | +| ------------------------- | ------ | ---------------------------------------------------------------------- | +| `--amdgpu-family` | String | AMD GPU family target (required) | +| `--base-only` | Flag | Include only base artifacts (minimal installation) | +| `--blas` | Flag | Include BLAS artifacts | +| `--fft` | Flag | Include FFT artifacts | +| `--hipdnn` | Flag | Include hipDNN artifacts | +| `--input-dir` | String | Existing TheRock directory to copy from | +| `--miopen` | Flag | Include MIOpen artifacts | +| `--output-dir` | Path | Output directory for TheRock installation (default: `./therock-build`) | +| `--prim` | Flag | Include primitives artifacts | +| `--rand` | Flag | Include random number generator artifacts | +| `--rccl` | Flag | Include RCCL artifacts | +| `--rocprofiler-compute` | Flag | Include rocprofiler-compute artifacts | +| `--rocprofiler-systems` | Flag | Include rocprofiler-systems artifacts | +| `--rocwmma` | Flag | Include rocWMMA artifacts | +| `--release` | String | Release version from nightly or dev tarballs | +| `--run-id` | String | GitHub CI workflow run ID to install from | +| `--tests` | Flag | Include test artifacts for enabled components | ### Finding GitHub Run IDs From 0513e221fa24d5f1cdcaba6deb624cbd15368925 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 25 Nov 2025 13:49:48 -0500 Subject: [PATCH 03/68] Add test_rocprofiler_compute.py, updated fetch_test_configurations.py --- .../fetch_test_configurations.py | 9 ++++++ .../test_rocprofiler_compute.py | 29 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index 5f5f6313dfb..627965c039d 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -213,6 +213,15 @@ def _get_script_path(script_name: str) -> str: "platform": ["linux", "windows"], "total_shards": 4, }, + # rocprofiler tests + "rocprofiler-compute": { + "job_name": "rocwmma", + "fetch_artifact_args": "--rocprofiler-compute --tests", + "timeout_minutes": 60, + "test_script": f"python {_get_script_path('test_rocprofiler_compute.py')}", + "platform": ["linux"], + "total_shards": 1, + }, } diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py new file mode 100644 index 00000000000..088e9e7d18b --- /dev/null +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -0,0 +1,29 @@ +import logging +import os +import shlex +import subprocess +from pathlib import Path + +THEROCK_BIN_DIR = os.getenv("THEROCK_BIN_DIR") +SCRIPT_DIR = Path(__file__).resolve().parent +THEROCK_DIR = SCRIPT_DIR.parent.parent.parent + +logging.basicConfig(level=logging.INFO) + +cmd = [ + "ctest", + "--test-dir", + f"{THEROCK_BIN_DIR}/rocprofiler-compute", + "--output-on-failure", + "--parallel", + "8", + "--timeout", + "1800", +] +logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") + +subprocess.run( + cmd, + cwd=THEROCK_DIR, + check=True, +) From 04a62d1fa1af92e79f99f4ca083ae916cecd9186 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 25 Nov 2025 14:26:30 -0500 Subject: [PATCH 04/68] Formatting changes for installing_artifacts.md --- docs/development/installing_artifacts.md | 38 ++++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/development/installing_artifacts.md b/docs/development/installing_artifacts.md index 8766b1e0ac6..35fe003db82 100644 --- a/docs/development/installing_artifacts.md +++ b/docs/development/installing_artifacts.md @@ -6,25 +6,25 @@ This document provides instructions for installing ROCm artifacts from TheRock b The script supports the following command-line options: -| Option | Type | Description | -| ------------------------- | ------ | ---------------------------------------------------------------------- | -| `--amdgpu-family` | String | AMD GPU family target (required) | -| `--base-only` | Flag | Include only base artifacts (minimal installation) | -| `--blas` | Flag | Include BLAS artifacts | -| `--fft` | Flag | Include FFT artifacts | -| `--hipdnn` | Flag | Include hipDNN artifacts | -| `--input-dir` | String | Existing TheRock directory to copy from | -| `--miopen` | Flag | Include MIOpen artifacts | -| `--output-dir` | Path | Output directory for TheRock installation (default: `./therock-build`) | -| `--prim` | Flag | Include primitives artifacts | -| `--rand` | Flag | Include random number generator artifacts | -| `--rccl` | Flag | Include RCCL artifacts | -| `--rocprofiler-compute` | Flag | Include rocprofiler-compute artifacts | -| `--rocprofiler-systems` | Flag | Include rocprofiler-systems artifacts | -| `--rocwmma` | Flag | Include rocWMMA artifacts | -| `--release` | String | Release version from nightly or dev tarballs | -| `--run-id` | String | GitHub CI workflow run ID to install from | -| `--tests` | Flag | Include test artifacts for enabled components | +| Option | Type | Description | +| ----------------------- | ------ | ---------------------------------------------------------------------- | +| `--amdgpu-family` | String | AMD GPU family target (required) | +| `--base-only` | Flag | Include only base artifacts (minimal installation) | +| `--blas` | Flag | Include BLAS artifacts | +| `--fft` | Flag | Include FFT artifacts | +| `--hipdnn` | Flag | Include hipDNN artifacts | +| `--input-dir` | String | Existing TheRock directory to copy from | +| `--miopen` | Flag | Include MIOpen artifacts | +| `--output-dir` | Path | Output directory for TheRock installation (default: `./therock-build`) | +| `--prim` | Flag | Include primitives artifacts | +| `--rand` | Flag | Include random number generator artifacts | +| `--rccl` | Flag | Include RCCL artifacts | +| `--rocprofiler-compute` | Flag | Include rocprofiler-compute artifacts | +| `--rocprofiler-systems` | Flag | Include rocprofiler-systems artifacts | +| `--rocwmma` | Flag | Include rocWMMA artifacts | +| `--release` | String | Release version from nightly or dev tarballs | +| `--run-id` | String | GitHub CI workflow run ID to install from | +| `--tests` | Flag | Include test artifacts for enabled components | ### Finding GitHub Run IDs From 378cbe801a6dac1a2bdd21c887997b117fa46e13 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 26 Nov 2025 10:09:10 -0500 Subject: [PATCH 05/68] Fix job_name in rocprofiler_compute test --- build_tools/github_actions/fetch_test_configurations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index 627965c039d..5e78f11bf9c 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -215,7 +215,7 @@ def _get_script_path(script_name: str) -> str: }, # rocprofiler tests "rocprofiler-compute": { - "job_name": "rocwmma", + "job_name": "rocprofiler_compute", "fetch_artifact_args": "--rocprofiler-compute --tests", "timeout_minutes": 60, "test_script": f"python {_get_script_path('test_rocprofiler_compute.py')}", From 018f4e493db708b63eb53ef0f1421adedb33f658 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 26 Nov 2025 10:13:21 -0500 Subject: [PATCH 06/68] Add ROCM_PATH to test_rocprofiler_compute.py, update test dir path --- .../test_executable_scripts/test_rocprofiler_compute.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 088e9e7d18b..5bacbaa0d2d 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -5,15 +5,20 @@ from pathlib import Path THEROCK_BIN_DIR = os.getenv("THEROCK_BIN_DIR") +OUTPUT_ARTIFACTS_DIR = os.getenv("OUTPUT_ARTIFACTS_DIR") SCRIPT_DIR = Path(__file__).resolve().parent THEROCK_DIR = SCRIPT_DIR.parent.parent.parent +ROCM_PATH = Path(THEROCK_BIN_DIR).resolve().parent +environ_vars = os.environ.copy() +environ_vars["ROCM_PATH"] = str(ROCM_PATH) + logging.basicConfig(level=logging.INFO) cmd = [ "ctest", "--test-dir", - f"{THEROCK_BIN_DIR}/rocprofiler-compute", + f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/tests", "--output-on-failure", "--parallel", "8", @@ -26,4 +31,5 @@ cmd, cwd=THEROCK_DIR, check=True, + env=environ_vars ) From d0179f0c153a19b2bfb70b33deac164a6b58cfaf Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 26 Nov 2025 10:50:28 -0500 Subject: [PATCH 07/68] Remove tests suffix from test-dir path --- .../test_executable_scripts/test_rocprofiler_compute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 5bacbaa0d2d..dae58bc2fc0 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -18,7 +18,7 @@ cmd = [ "ctest", "--test-dir", - f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/tests", + f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute", "--output-on-failure", "--parallel", "8", From dab6af348fc4d6bbab7e88be2433aa351b4a1a3b Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 26 Nov 2025 11:12:44 -0500 Subject: [PATCH 08/68] Formatting change in test_rocprofiler_compute.py --- .../test_executable_scripts/test_rocprofiler_compute.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index dae58bc2fc0..3032edf474d 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -27,9 +27,4 @@ ] logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") -subprocess.run( - cmd, - cwd=THEROCK_DIR, - check=True, - env=environ_vars -) +subprocess.run(cmd, cwd=THEROCK_DIR, check=True, env=environ_vars) From 8631762538840df3b86b721b835537dca1252c78 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Mon, 8 Dec 2025 15:09:45 -0500 Subject: [PATCH 09/68] Add TEST_FROM_INSTALL CMake arg to rocprofiler-compute --- profiler/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index a0593b7e335..ed3601d30aa 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -100,6 +100,7 @@ if(THEROCK_ENABLE_ROCPROFV3) -DHIP_PLATFORM=amd -DENABLE_TESTS=ON -DINSTALL_TESTS=ON + -DTEST_FROM_INSTALL=ON -DCHECK_PYTHON_DEPS=OFF CMAKE_INCLUDES therock_explicit_finders.cmake From 14b6c0f3c682c5a6c39fbc9c4d0c4ac314b05014 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Mon, 29 Dec 2025 09:47:56 -0500 Subject: [PATCH 10/68] Add pip install requirements for compute --- .../test_rocprofiler_compute.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 3032edf474d..3fe95397b8a 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -15,7 +15,17 @@ logging.basicConfig(level=logging.INFO) -cmd = [ +cmd1 = [ + "pip", + "install", + "-r", + f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements.txt", +] +logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd1)}") + +subprocess.run(cmd1, cwd=THEROCK_DIR, check=True, env=environ_vars) + +cmd2 = [ "ctest", "--test-dir", f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute", @@ -25,6 +35,6 @@ "--timeout", "1800", ] -logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") +logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd2)}") -subprocess.run(cmd, cwd=THEROCK_DIR, check=True, env=environ_vars) +subprocess.run(cmd2, cwd=THEROCK_DIR, check=True, env=environ_vars) From b6afee38569f291c03fcd638089ced99c48c2b5c Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Mon, 29 Dec 2025 15:41:30 -0500 Subject: [PATCH 11/68] Add PYTHONPATH env variable, test requirements install --- .../test_rocprofiler_compute.py | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 3fe95397b8a..a2cfb957685 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -13,8 +13,17 @@ environ_vars = os.environ.copy() environ_vars["ROCM_PATH"] = str(ROCM_PATH) +old_pythonpath = os.getenv("PYTHONPATH", "") +test_dir = f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/tests" + +if old_pythonpath: + os.environ["PYTHONPATH"] = f"{test_dir}:{old_pythonpath}" +else: + os.environ["PYTHONPATH"] = test_dir + logging.basicConfig(level=logging.INFO) +# Install pip requirements cmd1 = [ "pip", "install", @@ -25,7 +34,20 @@ subprocess.run(cmd1, cwd=THEROCK_DIR, check=True, env=environ_vars) +# Install pip requirements for tests cmd2 = [ + "pip", + "install", + "-r", + f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements-test.txt", +] + +logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd2)}") + +subprocess.run(cmd2, cwd=THEROCK_DIR, check=True, env=environ_vars) + +# Run tests +cmd3 = [ "ctest", "--test-dir", f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute", @@ -35,6 +57,6 @@ "--timeout", "1800", ] -logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd2)}") +logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd3)}") -subprocess.run(cmd2, cwd=THEROCK_DIR, check=True, env=environ_vars) +subprocess.run(cmd3, cwd=THEROCK_DIR, check=True, env=environ_vars) From c874209e3d76e8e0f78f87817d9ef060ba9c6c42 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Mon, 29 Dec 2025 16:31:28 -0500 Subject: [PATCH 12/68] Combine both requirement installs in one command --- .../test_rocprofiler_compute.py | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index a2cfb957685..1e54812a51d 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -29,25 +29,15 @@ "install", "-r", f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements.txt", -] -logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd1)}") - -subprocess.run(cmd1, cwd=THEROCK_DIR, check=True, env=environ_vars) - -# Install pip requirements for tests -cmd2 = [ - "pip", - "install", "-r", f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements-test.txt", ] +logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd1)}") -logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd2)}") - -subprocess.run(cmd2, cwd=THEROCK_DIR, check=True, env=environ_vars) +subprocess.run(cmd1, cwd=THEROCK_DIR, check=True, env=environ_vars) # Run tests -cmd3 = [ +cmd2 = [ "ctest", "--test-dir", f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute", @@ -57,6 +47,6 @@ "--timeout", "1800", ] -logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd3)}") +logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd2)}") -subprocess.run(cmd3, cwd=THEROCK_DIR, check=True, env=environ_vars) +subprocess.run(cmd2, cwd=THEROCK_DIR, check=True, env=environ_vars) From cd9753a9a81adf369ba892e608db7fbb6594e094 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 30 Dec 2025 11:03:44 -0500 Subject: [PATCH 13/68] Add extra step in action.yml to install compute python requirements --- .../actions/setup_test_environment/action.yml | 10 +++++++++ .../test_rocprofiler_compute.py | 21 +++---------------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/actions/setup_test_environment/action.yml b/.github/actions/setup_test_environment/action.yml index b3e544ad846..f4259600deb 100644 --- a/.github/actions/setup_test_environment/action.yml +++ b/.github/actions/setup_test_environment/action.yml @@ -80,3 +80,13 @@ runs: --artifact-group=${ARTIFACT_GROUP} \ --output-dir=${OUTPUT_ARTIFACTS_DIR} \ ${FETCH_ARTIFACT_ARGS} + + - name: Install additional test requirements for rocprofiler-compute + if: ${{ contains(inputs.FETCH_ARTIFACT_ARGS, 'rocprofiler-compute') }} + shell: bash + env: + OUTPUT_ARTIFACTS_DIR: ${{ inputs.OUTPUT_ARTIFACTS_DIR }} + run: | + uv pip install -r ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements.txt + uv pip install -r ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements-test.txt + uv pip freeze diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 1e54812a51d..5306643d78a 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -21,23 +21,8 @@ else: os.environ["PYTHONPATH"] = test_dir -logging.basicConfig(level=logging.INFO) - -# Install pip requirements -cmd1 = [ - "pip", - "install", - "-r", - f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements.txt", - "-r", - f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements-test.txt", -] -logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd1)}") - -subprocess.run(cmd1, cwd=THEROCK_DIR, check=True, env=environ_vars) - # Run tests -cmd2 = [ +cmd = [ "ctest", "--test-dir", f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute", @@ -47,6 +32,6 @@ "--timeout", "1800", ] -logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd2)}") +logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") -subprocess.run(cmd2, cwd=THEROCK_DIR, check=True, env=environ_vars) +subprocess.run(cmd, cwd=THEROCK_DIR, check=True, env=environ_vars) From 02eb4a57fdf5a19809c807e51fcd6945b432ddc1 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 31 Dec 2025 12:45:04 -0500 Subject: [PATCH 14/68] Disable gfx906 support for rocprofiler-compute --- cmake/therock_amdgpu_targets.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/therock_amdgpu_targets.cmake b/cmake/therock_amdgpu_targets.cmake index 620bf6a9508..20c7b68c146 100644 --- a/cmake/therock_amdgpu_targets.cmake +++ b/cmake/therock_amdgpu_targets.cmake @@ -48,6 +48,7 @@ therock_add_amdgpu_target(gfx906 "Radeon VII / MI50 CDNA" FAMILY dgpu-all gfx90X hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 composable_kernel # https://github.com/ROCm/TheRock/issues/1245 rocWMMA # https://github.com/ROCm/TheRock/issues/1944 + rocprofiler-compute # TODO: Add GitHub Issue link here ) therock_add_amdgpu_target(gfx908 "MI100 CDNA" FAMILY gfx90X-all dcgpu-all gfx90X-dcgpu EXCLUDE_TARGET_PROJECTS From 206e790f7cde4c44dabc2b3003e51bec6176b7e5 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 31 Dec 2025 14:26:17 -0500 Subject: [PATCH 15/68] disable amdgpu targets for testing --- profiler/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index ce233b7eab1..e05d8edfcc0 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -98,7 +98,7 @@ if(THEROCK_ENABLE_ROCPROFV3) # rocprofiler-compute ############################################################################## therock_cmake_subproject_declare(rocprofiler-compute - USE_DIST_AMDGPU_TARGETS + DISABLE_AMDGPU_TARGETS EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/rocprofiler-compute" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/rocprofiler-compute" BACKGROUND_BUILD From cd783232b224550ea484bef9755a99f2676f30d4 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Fri, 2 Jan 2026 12:25:54 -0500 Subject: [PATCH 16/68] Update rocprofiler-compute to exclude all gfx90X families --- cmake/therock_amdgpu_targets.cmake | 2 ++ profiler/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/therock_amdgpu_targets.cmake b/cmake/therock_amdgpu_targets.cmake index 20c7b68c146..28172b2a0e9 100644 --- a/cmake/therock_amdgpu_targets.cmake +++ b/cmake/therock_amdgpu_targets.cmake @@ -53,10 +53,12 @@ therock_add_amdgpu_target(gfx906 "Radeon VII / MI50 CDNA" FAMILY dgpu-all gfx90X therock_add_amdgpu_target(gfx908 "MI100 CDNA" FAMILY gfx90X-all dcgpu-all gfx90X-dcgpu EXCLUDE_TARGET_PROJECTS hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 + rocprofiler-compute # TODO: Add GitHub Issue link here ) therock_add_amdgpu_target(gfx90a "MI210/250 CDNA" FAMILY gfx90X-all dcgpu-all gfx90X-dcgpu EXCLUDE_TARGET_PROJECTS hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 + rocprofiler-compute # TODO: Add GitHub Issue link here ) # gfx94X family diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index e05d8edfcc0..ce233b7eab1 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -98,7 +98,7 @@ if(THEROCK_ENABLE_ROCPROFV3) # rocprofiler-compute ############################################################################## therock_cmake_subproject_declare(rocprofiler-compute - DISABLE_AMDGPU_TARGETS + USE_DIST_AMDGPU_TARGETS EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/rocprofiler-compute" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/rocprofiler-compute" BACKGROUND_BUILD From f8f85292463940ab6634bc6b57084497ea2bf9ee Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Mon, 5 Jan 2026 10:29:36 -0500 Subject: [PATCH 17/68] Add DEFAULT_GPU_TARGETS to rocprofiler-compute --- profiler/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index ce233b7eab1..c1cff2a1d89 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -102,6 +102,8 @@ if(THEROCK_ENABLE_ROCPROFV3) EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/rocprofiler-compute" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/rocprofiler-compute" BACKGROUND_BUILD + DEFAULT_GPU_TARGETS + gfx1100 # TODO: Fix rocprofiler-compute to accept an empty target list. CMAKE_ARGS -DHIP_PLATFORM=amd -DENABLE_TESTS=ON From dc6d954b71ded3ca64be3ac06868b325c90aee14 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 13 Jan 2026 15:14:49 -0500 Subject: [PATCH 18/68] Update amdgpu_targets for rocprofiler-compute --- cmake/therock_amdgpu_targets.cmake | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/cmake/therock_amdgpu_targets.cmake b/cmake/therock_amdgpu_targets.cmake index 99b05654625..0286ea00aa0 100644 --- a/cmake/therock_amdgpu_targets.cmake +++ b/cmake/therock_amdgpu_targets.cmake @@ -48,19 +48,17 @@ therock_add_amdgpu_target(gfx906 "Radeon VII / MI50 CDNA" FAMILY dgpu-all gfx90X hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 composable_kernel # https://github.com/ROCm/TheRock/issues/1245 rocWMMA # https://github.com/ROCm/TheRock/issues/1944 - rocprofiler-compute # TODO: Add GitHub Issue link here + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 libhipcxx # https://github.com/ROCm/TheRock/issues/2504 ) therock_add_amdgpu_target(gfx908 "MI100 CDNA" FAMILY gfx90X-all dcgpu-all gfx90X-dcgpu EXCLUDE_TARGET_PROJECTS hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 - rocprofiler-compute # TODO: Add GitHub Issue link here libhipcxx # https://github.com/ROCm/TheRock/issues/2504 ) therock_add_amdgpu_target(gfx90a "MI210/250 CDNA" FAMILY gfx90X-all dcgpu-all gfx90X-dcgpu EXCLUDE_TARGET_PROJECTS hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 - rocprofiler-compute # TODO: Add GitHub Issue link here ) # gfx94X family @@ -77,6 +75,7 @@ therock_add_amdgpu_target(gfx1010 "AMD RX 5700" FAMILY dgpu-all gfx101X-all gfx1 composable_kernel # https://github.com/ROCm/TheRock/issues/1245 rocWMMA # https://github.com/ROCm/TheRock/issues/1944 libhipcxx # https://github.com/ROCm/TheRock/issues/2504 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) therock_add_amdgpu_target(gfx1011 "AMD Radeon Pro V520" FAMILY dgpu-all gfx101X-all gfx101X-dgpu EXCLUDE_TARGET_PROJECTS @@ -85,7 +84,9 @@ therock_add_amdgpu_target(gfx1011 "AMD Radeon Pro V520" FAMILY dgpu-all gfx101X- composable_kernel # https://github.com/ROCm/TheRock/issues/1245 rocWMMA # https://github.com/ROCm/TheRock/issues/1944 libhipcxx # https://github.com/ROCm/TheRock/issues/2504 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) + therock_add_amdgpu_target(gfx1012 "AMD RX 5500" FAMILY dgpu-all gfx101X-all gfx101X-dgpu EXCLUDE_TARGET_PROJECTS hipBLASLt # https://github.com/ROCm/TheRock/issues/1062 @@ -93,6 +94,7 @@ therock_add_amdgpu_target(gfx1012 "AMD RX 5500" FAMILY dgpu-all gfx101X-all gfx1 composable_kernel # https://github.com/ROCm/TheRock/issues/1245 rocWMMA # https://github.com/ROCm/TheRock/issues/1944 libhipcxx # https://github.com/ROCm/TheRock/issues/2504 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) # gfx103X family @@ -102,6 +104,7 @@ therock_add_amdgpu_target(gfx1030 "AMD RX 6800 / XT" FAMILY dgpu-all gfx103X-all hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 rocWMMA # https://github.com/ROCm/TheRock/issues/1944 libhipcxx # https://github.com/ROCm/TheRock/issues/2504 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) therock_add_amdgpu_target(gfx1032 "AMD RX 6600" FAMILY dgpu-all gfx103X-all gfx103X-dgpu EXCLUDE_TARGET_PROJECTS @@ -109,6 +112,7 @@ therock_add_amdgpu_target(gfx1032 "AMD RX 6600" FAMILY dgpu-all gfx103X-all gfx1 hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 rocWMMA # https://github.com/ROCm/TheRock/issues/1944 libhipcxx # https://github.com/ROCm/TheRock/issues/2504 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) therock_add_amdgpu_target(gfx1035 "AMD Radeon 680M Laptop iGPU" igpu-all FAMILY gfx103X-all gfx103X-igpu EXCLUDE_TARGET_PROJECTS @@ -116,6 +120,7 @@ therock_add_amdgpu_target(gfx1035 "AMD Radeon 680M Laptop iGPU" igpu-all FAMILY hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 rocWMMA # https://github.com/ROCm/TheRock/issues/1944 libhipcxx # https://github.com/ROCm/TheRock/issues/2504 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) therock_add_amdgpu_target(gfx1036 "AMD Raphael iGPU" FAMILY igpu-all gfx103X-all gfx103X-igpu EXCLUDE_TARGET_PROJECTS @@ -123,22 +128,26 @@ therock_add_amdgpu_target(gfx1036 "AMD Raphael iGPU" FAMILY igpu-all gfx103X-all hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 rocWMMA # https://github.com/ROCm/TheRock/issues/1944 libhipcxx # https://github.com/ROCm/TheRock/issues/2504 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) # gfx110X family therock_add_amdgpu_target(gfx1100 "AMD RX 7900 XTX" FAMILY dgpu-all gfx110X-all gfx110X-dgpu EXCLUDE_TARGET_PROJECTS hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) therock_add_amdgpu_target(gfx1101 "AMD RX 7800 XT" FAMILY dgpu-all gfx110X-all gfx110X-dgpu EXCLUDE_TARGET_PROJECTS hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) therock_add_amdgpu_target(gfx1102 "AMD RX 7700S/Framework Laptop 16" FAMILY dgpu-all gfx110X-all gfx110X-dgpu EXCLUDE_TARGET_PROJECTS hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 hipBLASLt # https://github.com/ROCm/TheRock/issues/1062 libhipcxx # https://github.com/ROCm/TheRock/issues/2504 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) therock_add_amdgpu_target(gfx1103 "AMD Radeon 780M Laptop iGPU" FAMILY igpu-all gfx110X-all gfx110X-igpu EXCLUDE_TARGET_PROJECTS @@ -146,6 +155,7 @@ therock_add_amdgpu_target(gfx1103 "AMD Radeon 780M Laptop iGPU" FAMILY igpu-all rccl # https://github.com/ROCm/TheRock/issues/150 rocWMMA # https://github.com/ROCm/TheRock/issues/1944 libhipcxx # https://github.com/ROCm/TheRock/issues/2504 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) # gfx115X family @@ -154,34 +164,40 @@ therock_add_amdgpu_target(gfx1150 "AMD Strix Point iGPU" FAMILY igpu-all gfx115X hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 rccl # https://github.com/ROCm/TheRock/issues/150 libhipcxx # https://github.com/ROCm/TheRock/issues/2504 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) therock_add_amdgpu_target(gfx1151 "AMD Strix Halo iGPU" FAMILY igpu-all gfx115X-all gfx115X-igpu EXCLUDE_TARGET_PROJECTS hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 rccl # https://github.com/ROCm/TheRock/issues/150 libhipcxx # https://github.com/ROCm/TheRock/issues/2504 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) therock_add_amdgpu_target(gfx1152 "AMD Krackan 1 iGPU" FAMILY igpu-all gfx115X-all gfx115X-igpu EXCLUDE_TARGET_PROJECTS hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 rccl # https://github.com/ROCm/TheRock/issues/150 rocWMMA # https://github.com/ROCm/TheRock/issues/1944 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) therock_add_amdgpu_target(gfx1153 "AMD Radeon 820M iGPU" FAMILY igpu-all gfx115X-all gfx115X-igpu EXCLUDE_TARGET_PROJECTS hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 rccl # https://github.com/ROCm/TheRock/issues/150 rocWMMA # https://github.com/ROCm/TheRock/issues/1944 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) # gfx120X family therock_add_amdgpu_target(gfx1200 "AMD RX 9060 / XT" FAMILY dgpu-all gfx120X-all EXCLUDE_TARGET_PROJECTS hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) therock_add_amdgpu_target(gfx1201 "AMD RX 9070 / XT" FAMILY dgpu-all gfx120X-all EXCLUDE_TARGET_PROJECTS hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 + rocprofiler-compute # https://github.com/ROCm/TheRock/issues/2892 ) # Optional extension targets (used for out of tree target development). From 0ea61a03b20759e149c2231085f5350f45f0b781 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 13 Jan 2026 16:40:09 -0500 Subject: [PATCH 19/68] Add PATH to test_rocprofiler_compute.py to try and address rocminfo error --- .../test_executable_scripts/test_rocprofiler_compute.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 5306643d78a..aec2bd373c3 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -14,6 +14,7 @@ environ_vars["ROCM_PATH"] = str(ROCM_PATH) old_pythonpath = os.getenv("PYTHONPATH", "") +old_path = os.getenv("PATH", "") test_dir = f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/tests" if old_pythonpath: @@ -21,6 +22,11 @@ else: os.environ["PYTHONPATH"] = test_dir +if old_path: + os.environ["PATH"] = f"{THEROCK_BIN_DIR}:{old_path}" +else: + os.environ["PATH"] = THEROCK_BIN_DIR + # Run tests cmd = [ "ctest", From 3fb442bda69e742186a3d9c4c19f933e2317c55b Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 14 Jan 2026 11:52:53 -0500 Subject: [PATCH 20/68] Change cwd, add LB_LIBRARY_PATH to test_rocprofiler_compute.py --- .../test_rocprofiler_compute.py | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index aec2bd373c3..378ec793ffd 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -13,20 +13,30 @@ environ_vars = os.environ.copy() environ_vars["ROCM_PATH"] = str(ROCM_PATH) +# Set up PYTHONPATH old_pythonpath = os.getenv("PYTHONPATH", "") -old_path = os.getenv("PATH", "") test_dir = f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/tests" - if old_pythonpath: os.environ["PYTHONPATH"] = f"{test_dir}:{old_pythonpath}" else: os.environ["PYTHONPATH"] = test_dir +# Set up PATH +old_path = os.getenv("PATH", "") if old_path: os.environ["PATH"] = f"{THEROCK_BIN_DIR}:{old_path}" else: os.environ["PATH"] = THEROCK_BIN_DIR +# Set up LD_LIBRARY_PATH +old_ld_lib_path = os.getenv("LD_LIBRARY_PATH", "") +if old_ld_lib_path: + os.environ["LD_LIBRARY_PATH"] = ( + f"{OUTPUT_ARTIFACTS_DIR}/lib:{OUTPUT_ARTIFACTS_DIR}/lib/rocm_sysdeps/lib:{old_ld_lib_path}" + ) +else: + os.environ["LD_LIBRARY_PATH"] = f"{OUTPUT_ARTIFACTS_DIR}/lib" + # Run tests cmd = [ "ctest", @@ -38,6 +48,12 @@ "--timeout", "1800", ] -logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") - -subprocess.run(cmd, cwd=THEROCK_DIR, check=True, env=environ_vars) +logging.info( + f"++ Exec [{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute]$ {shlex.join(cmd)}" +) +subprocess.run( + cmd, + cwd=f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute", + check=True, + env=environ_vars, +) From feeda9994876871281650b822d2e828e65004f49 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 14 Jan 2026 15:44:01 -0500 Subject: [PATCH 21/68] Remove --test-dir option from ctest, run directly from test directory --- .../test_executable_scripts/test_rocprofiler_compute.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 378ec793ffd..15108acf90f 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -40,8 +40,6 @@ # Run tests cmd = [ "ctest", - "--test-dir", - f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute", "--output-on-failure", "--parallel", "8", From ad6fa383b0a246637c873dfe51919eeeb708f33a Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Thu, 15 Jan 2026 10:58:58 -0500 Subject: [PATCH 22/68] Add absolute paths to test_rocprofiler_compute.py --- .../test_rocprofiler_compute.py | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 15108acf90f..079765d9389 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -9,33 +9,40 @@ SCRIPT_DIR = Path(__file__).resolve().parent THEROCK_DIR = SCRIPT_DIR.parent.parent.parent +# Set up ROCm path ROCM_PATH = Path(THEROCK_BIN_DIR).resolve().parent environ_vars = os.environ.copy() environ_vars["ROCM_PATH"] = str(ROCM_PATH) +# Resolve absolute paths +OUTPUT_ARTIFACTS_PATH = Path(OUTPUT_ARTIFACTS_DIR).resolve() +THEROCK_BIN_PATH = Path(THEROCK_BIN_DIR).resolve() + # Set up PYTHONPATH old_pythonpath = os.getenv("PYTHONPATH", "") -test_dir = f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/tests" +module_dir = f"{THEROCK_BIN_PATH}/libexec/rocprofiler-compute/tests" if old_pythonpath: - os.environ["PYTHONPATH"] = f"{test_dir}:{old_pythonpath}" + os.environ["PYTHONPATH"] = f"{module_dir}:{old_pythonpath}" else: - os.environ["PYTHONPATH"] = test_dir + os.environ["PYTHONPATH"] = module_dir # Set up PATH old_path = os.getenv("PATH", "") +rocm_bin = str(THEROCK_BIN_PATH) if old_path: - os.environ["PATH"] = f"{THEROCK_BIN_DIR}:{old_path}" + os.environ["PATH"] = f"{rocm_bin}:{old_path}" else: - os.environ["PATH"] = THEROCK_BIN_DIR + os.environ["PATH"] = rocm_bin # Set up LD_LIBRARY_PATH old_ld_lib_path = os.getenv("LD_LIBRARY_PATH", "") +rocm_lib = str(OUTPUT_ARTIFACTS_PATH / "lib") if old_ld_lib_path: os.environ["LD_LIBRARY_PATH"] = ( - f"{OUTPUT_ARTIFACTS_DIR}/lib:{OUTPUT_ARTIFACTS_DIR}/lib/rocm_sysdeps/lib:{old_ld_lib_path}" + f"{rocm_lib}:{rocm_lib}/rocm_sysdeps/lib:{old_ld_lib_path}" ) else: - os.environ["LD_LIBRARY_PATH"] = f"{OUTPUT_ARTIFACTS_DIR}/lib" + os.environ["LD_LIBRARY_PATH"] = rocm_lib # Run tests cmd = [ From a4bd8dda8a027e734469efca48872a77ba020281 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Thu, 15 Jan 2026 15:20:41 -0500 Subject: [PATCH 23/68] Add rocprofiler-sdk dependency for compute tests --- .../github_actions/fetch_test_configurations.py | 2 +- build_tools/install_rocm_from_artifacts.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index c9d1bfe59f7..0a02a1da625 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -252,7 +252,7 @@ def _get_script_path(script_name: str) -> str: # rocprofiler-compute tests "rocprofiler-compute": { "job_name": "rocprofiler_compute", - "fetch_artifact_args": "--rocprofiler-compute --tests", + "fetch_artifact_args": "--rocprofiler-compute --rocprofiler-sdk --tests", "timeout_minutes": 60, "test_script": f"python {_get_script_path('test_rocprofiler_compute.py')}", "platform": ["linux"], diff --git a/build_tools/install_rocm_from_artifacts.py b/build_tools/install_rocm_from_artifacts.py index 56491c57317..690f7cc9820 100644 --- a/build_tools/install_rocm_from_artifacts.py +++ b/build_tools/install_rocm_from_artifacts.py @@ -25,6 +25,7 @@ [--rand | --no-rand] [--rccl | --no-rccl] [--rocprofiler-compute | --no-rocprofiler-compute] + [--rocprofiler-sdk | --no-rocprofiler-sdk ] [--rocprofiler-systems | --no-rocprofiler-systems] [--rocwmma | --no-rocwmma] [--libhipcxx | --no-libhipcxx] @@ -238,6 +239,8 @@ def retrieve_artifacts_by_run_id(args): extra_artifacts.append("rccl") if args.rocprofiler_compute: extra_artifacts.append("rocprofiler-compute") + if args.rocprofiler_sdk: + extra_artifacts.append("rocprofiler-sdk") if args.rocprofiler_systems: extra_artifacts.append("rocprofiler-systems") if args.rocwmma: @@ -449,6 +452,13 @@ def main(argv): action=argparse.BooleanOptionalAction, ) + artifacts_group.add_argument( + "--rocprofiler-sdk", + default=False, + help="Include 'rocprofiler-sdk' artifacts", + action=argparse.BooleanOptionalAction, + ) + artifacts_group.add_argument( "--rocprofiler-systems", default=False, From 0cce7ec0744dba4fd6a50ab0043b3993e19e2fa1 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Fri, 16 Jan 2026 09:23:16 -0500 Subject: [PATCH 24/68] Add debug print statements --- .../test_executable_scripts/test_rocprofiler_compute.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 079765d9389..8619de86c68 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -17,10 +17,13 @@ # Resolve absolute paths OUTPUT_ARTIFACTS_PATH = Path(OUTPUT_ARTIFACTS_DIR).resolve() THEROCK_BIN_PATH = Path(THEROCK_BIN_DIR).resolve() +print(f"OUTPUT_ARTIFACTS_PATH: {OUTPUT_ARTIFACTS_DIR}") +print(f"THEROCK_BIN_PATH: {THEROCK_BIN_PATH}") # Set up PYTHONPATH old_pythonpath = os.getenv("PYTHONPATH", "") module_dir = f"{THEROCK_BIN_PATH}/libexec/rocprofiler-compute/tests" +print(f"Module Directory: {module_dir}") if old_pythonpath: os.environ["PYTHONPATH"] = f"{module_dir}:{old_pythonpath}" else: @@ -29,6 +32,7 @@ # Set up PATH old_path = os.getenv("PATH", "") rocm_bin = str(THEROCK_BIN_PATH) +print(f"ROCm Bin Directory: {rocm_bin}") if old_path: os.environ["PATH"] = f"{rocm_bin}:{old_path}" else: @@ -37,6 +41,7 @@ # Set up LD_LIBRARY_PATH old_ld_lib_path = os.getenv("LD_LIBRARY_PATH", "") rocm_lib = str(OUTPUT_ARTIFACTS_PATH / "lib") +print(f"ROCm Lib Directory: {rocm_lib}") if old_ld_lib_path: os.environ["LD_LIBRARY_PATH"] = ( f"{rocm_lib}:{rocm_lib}/rocm_sysdeps/lib:{old_ld_lib_path}" @@ -44,6 +49,10 @@ else: os.environ["LD_LIBRARY_PATH"] = rocm_lib +# Print out all env vars +for key, value in os.environ.items(): + print(f"{key}: {value}") + # Run tests cmd = [ "ctest", From 257569a9f4eba9044a0b31d122e1f9a309cfab32 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Fri, 16 Jan 2026 10:44:34 -0500 Subject: [PATCH 25/68] Change default GPU target to gfx942 for rocprofiler-compute --- profiler/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index 004d1a188ff..57cf4010ae3 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -105,7 +105,7 @@ if(THEROCK_ENABLE_ROCPROFV3) BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/rocprofiler-compute" BACKGROUND_BUILD DEFAULT_GPU_TARGETS - gfx1100 # TODO: Fix rocprofiler-compute to accept an empty target list. + gfx942 # TODO: Fix rocprofiler-compute to accept an empty target list. CMAKE_ARGS -DHIP_PLATFORM=amd -DENABLE_TESTS=ON From 86f04ca6c7713e9252204ea56354e0d194b8d3a3 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Fri, 16 Jan 2026 13:44:01 -0500 Subject: [PATCH 26/68] Fix issue in PYTHONPATH --- .../test_executable_scripts/test_rocprofiler_compute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 8619de86c68..786bbd29412 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -22,7 +22,7 @@ # Set up PYTHONPATH old_pythonpath = os.getenv("PYTHONPATH", "") -module_dir = f"{THEROCK_BIN_PATH}/libexec/rocprofiler-compute/tests" +module_dir = f"{THEROCK_BIN_PATH}/../libexec/rocprofiler-compute/tests" print(f"Module Directory: {module_dir}") if old_pythonpath: os.environ["PYTHONPATH"] = f"{module_dir}:{old_pythonpath}" From d988e3769af1d9a01b3c725381080c8c98d46646 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Fri, 16 Jan 2026 17:06:34 -0500 Subject: [PATCH 27/68] Refactor environment setup, paths --- .../test_rocprofiler_compute.py | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 786bbd29412..1c02a793ac3 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -2,6 +2,7 @@ import os import shlex import subprocess +import sys from pathlib import Path THEROCK_BIN_DIR = os.getenv("THEROCK_BIN_DIR") @@ -9,26 +10,32 @@ SCRIPT_DIR = Path(__file__).resolve().parent THEROCK_DIR = SCRIPT_DIR.parent.parent.parent -# Set up ROCm path -ROCM_PATH = Path(THEROCK_BIN_DIR).resolve().parent environ_vars = os.environ.copy() -environ_vars["ROCM_PATH"] = str(ROCM_PATH) # Resolve absolute paths -OUTPUT_ARTIFACTS_PATH = Path(OUTPUT_ARTIFACTS_DIR).resolve() THEROCK_BIN_PATH = Path(THEROCK_BIN_DIR).resolve() -print(f"OUTPUT_ARTIFACTS_PATH: {OUTPUT_ARTIFACTS_DIR}") +THEROCK_PATH = THEROCK_BIN_PATH.parent +THEROCK_LIB_PATH = str(THEROCK_PATH / "lib") + +print(f"THEROCK_PATH: {THEROCK_PATH}") print(f"THEROCK_BIN_PATH: {THEROCK_BIN_PATH}") +print(f"THEROCK_LIB_PATH: {THEROCK_PATH}") + +# Set up ROCM_PATH +environ_vars["ROCM_PATH"] = str(THEROCK_PATH) # Set up PYTHONPATH old_pythonpath = os.getenv("PYTHONPATH", "") -module_dir = f"{THEROCK_BIN_PATH}/../libexec/rocprofiler-compute/tests" +module_dir = f"{THEROCK_DIR}/libexec/rocprofiler-compute/tests" print(f"Module Directory: {module_dir}") if old_pythonpath: os.environ["PYTHONPATH"] = f"{module_dir}:{old_pythonpath}" else: os.environ["PYTHONPATH"] = module_dir +# See if this helps pick up modules properly +sys.path.append(os.path.dirname(__file__)) + # Set up PATH old_path = os.getenv("PATH", "") rocm_bin = str(THEROCK_BIN_PATH) @@ -40,34 +47,32 @@ # Set up LD_LIBRARY_PATH old_ld_lib_path = os.getenv("LD_LIBRARY_PATH", "") -rocm_lib = str(OUTPUT_ARTIFACTS_PATH / "lib") -print(f"ROCm Lib Directory: {rocm_lib}") if old_ld_lib_path: os.environ["LD_LIBRARY_PATH"] = ( - f"{rocm_lib}:{rocm_lib}/rocm_sysdeps/lib:{old_ld_lib_path}" + f"{THEROCK_LIB_PATH}:{THEROCK_LIB_PATH}/rocm_sysdeps/lib:{old_ld_lib_path}" ) else: - os.environ["LD_LIBRARY_PATH"] = rocm_lib + os.environ["LD_LIBRARY_PATH"] = THEROCK_LIB_PATH # Print out all env vars -for key, value in os.environ.items(): +for key, value in environ_vars.items(): print(f"{key}: {value}") # Run tests cmd = [ "ctest", + "--test-dir", + f"{THEROCK_PATH}/libexec/rocprofiler-compute", "--output-on-failure", "--parallel", "8", "--timeout", "1800", ] -logging.info( - f"++ Exec [{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute]$ {shlex.join(cmd)}" -) +logging.info(f"++ Exec [{THEROCK_PATH}]$ {shlex.join(cmd)}") subprocess.run( cmd, - cwd=f"{OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute", + cwd=THEROCK_PATH, check=True, env=environ_vars, ) From 9ee4f9cb02f9d289ae6c1425710e74f289161b25 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Mon, 19 Jan 2026 10:40:36 -0500 Subject: [PATCH 28/68] Update SDK test artifact to include python modules for compute --- .../test_executable_scripts/test_rocprofiler_compute.py | 2 +- profiler/CMakeLists.txt | 1 + profiler/artifact-rocprofiler-sdk.toml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 1c02a793ac3..e7ccbc1a836 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -26,7 +26,7 @@ # Set up PYTHONPATH old_pythonpath = os.getenv("PYTHONPATH", "") -module_dir = f"{THEROCK_DIR}/libexec/rocprofiler-compute/tests" +module_dir = f"{THEROCK_PATH}/libexec/rocprofiler-compute/tests" print(f"Module Directory: {module_dir}") if old_pythonpath: os.environ["PYTHONPATH"] = f"{module_dir}:{old_pythonpath}" diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index 57cf4010ae3..ad517c3d5db 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -180,6 +180,7 @@ if(THEROCK_ENABLE_ROCPROFV3) doc lib run + test SUBPROJECT_DEPS aqlprofile rocprofiler-sdk diff --git a/profiler/artifact-rocprofiler-sdk.toml b/profiler/artifact-rocprofiler-sdk.toml index 032082b23ba..1e893787dc6 100644 --- a/profiler/artifact-rocprofiler-sdk.toml +++ b/profiler/artifact-rocprofiler-sdk.toml @@ -31,6 +31,7 @@ include = [ [components.test."profiler/rocprofiler-sdk/stage"] include = [ "share/rocprofiler-sdk/tests/**", + "lib/python*/**", ] # roctracer From df38263c8251b0d78f041a75deeb78157e8a3862 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Mon, 19 Jan 2026 14:49:02 -0500 Subject: [PATCH 29/68] Update environ_vars in test_rocprofiler_compute.py --- .../test_rocprofiler_compute.py | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index e7ccbc1a836..5679f47fbcb 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -2,7 +2,6 @@ import os import shlex import subprocess -import sys from pathlib import Path THEROCK_BIN_DIR = os.getenv("THEROCK_BIN_DIR") @@ -10,8 +9,6 @@ SCRIPT_DIR = Path(__file__).resolve().parent THEROCK_DIR = SCRIPT_DIR.parent.parent.parent -environ_vars = os.environ.copy() - # Resolve absolute paths THEROCK_BIN_PATH = Path(THEROCK_BIN_DIR).resolve() THEROCK_PATH = THEROCK_BIN_PATH.parent @@ -22,37 +19,36 @@ print(f"THEROCK_LIB_PATH: {THEROCK_PATH}") # Set up ROCM_PATH +environ_vars = os.environ.copy() environ_vars["ROCM_PATH"] = str(THEROCK_PATH) -# Set up PYTHONPATH +# Set up PYTHONPATH (for test_utils.py) old_pythonpath = os.getenv("PYTHONPATH", "") module_dir = f"{THEROCK_PATH}/libexec/rocprofiler-compute/tests" print(f"Module Directory: {module_dir}") if old_pythonpath: - os.environ["PYTHONPATH"] = f"{module_dir}:{old_pythonpath}" + environ_vars["PYTHONPATH"] = f"{module_dir}:{old_pythonpath}" else: - os.environ["PYTHONPATH"] = module_dir - -# See if this helps pick up modules properly -sys.path.append(os.path.dirname(__file__)) + environ_vars["PYTHONPATH"] = module_dir # Set up PATH old_path = os.getenv("PATH", "") rocm_bin = str(THEROCK_BIN_PATH) print(f"ROCm Bin Directory: {rocm_bin}") if old_path: - os.environ["PATH"] = f"{rocm_bin}:{old_path}" + environ_vars["PATH"] = f"{rocm_bin}:{old_path}" else: - os.environ["PATH"] = rocm_bin + environ_vars["PATH"] = rocm_bin # Set up LD_LIBRARY_PATH old_ld_lib_path = os.getenv("LD_LIBRARY_PATH", "") +sysdeps_path = f"{THEROCK_LIB_PATH}/rocm_sysdeps/lib" if old_ld_lib_path: - os.environ["LD_LIBRARY_PATH"] = ( - f"{THEROCK_LIB_PATH}:{THEROCK_LIB_PATH}/rocm_sysdeps/lib:{old_ld_lib_path}" + environ_vars["LD_LIBRARY_PATH"] = ( + f"{THEROCK_LIB_PATH}:{sysdeps_path}:{old_ld_lib_path}" ) else: - os.environ["LD_LIBRARY_PATH"] = THEROCK_LIB_PATH + environ_vars["LD_LIBRARY_PATH"] = f"{THEROCK_LIB_PATH}:{sysdeps_path}" # Print out all env vars for key, value in environ_vars.items(): From a5f153fd3e9532b306e42047b7b79aab69d86bad Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 20 Jan 2026 09:46:29 -0500 Subject: [PATCH 30/68] Remove parallel to debug timeouts --- .../test_executable_scripts/test_rocprofiler_compute.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 5679f47fbcb..a11937c0903 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -60,8 +60,6 @@ "--test-dir", f"{THEROCK_PATH}/libexec/rocprofiler-compute", "--output-on-failure", - "--parallel", - "8", "--timeout", "1800", ] From f63badfe89e8b0882e5e5300b7f8f83edc49728a Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 20 Jan 2026 11:15:02 -0500 Subject: [PATCH 31/68] Add rocprofiler-sdk option to installing_artifacts.md --- docs/development/installing_artifacts.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/development/installing_artifacts.md b/docs/development/installing_artifacts.md index 689ecc49707..ad6f6ee5a31 100644 --- a/docs/development/installing_artifacts.md +++ b/docs/development/installing_artifacts.md @@ -21,6 +21,7 @@ The script supports the following command-line options: | `--rand` | Flag | Include random number generator artifacts | | `--rccl` | Flag | Include RCCL artifacts | | `--rocprofiler-compute` | Flag | Include rocprofiler-compute artifacts | +| `--rocprofiler-sdk` | Flag | Include rocprofiler-sdk artifacts | | `--rocprofiler-systems` | Flag | Include rocprofiler-systems artifacts | | `--rocwmma` | Flag | Include rocWMMA artifacts | | `--libhipcxx` | Flag | Include libhipcxx artifacts | From dfa74a2770a0f1afca8ca0253b08edaa301e36d4 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 20 Jan 2026 13:43:25 -0500 Subject: [PATCH 32/68] Clean up test_rocprofiler_compute.py, add verbose output in pytest command --- .../github_actions/fetch_test_configurations.py | 2 +- .../test_rocprofiler_compute.py | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index 7f12235a250..deef4278a7c 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -254,7 +254,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocprofiler_compute", "fetch_artifact_args": "--rocprofiler-compute --rocprofiler-sdk --tests", "timeout_minutes": 60, - "test_script": f"python {_get_script_path('test_rocprofiler_compute.py')}", + "test_script": f"python {_get_script_path('test_rocprofiler_compute.py')} -v", "platform": ["linux"], "total_shards": 1, }, diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index a11937c0903..9fe4970f69f 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -14,10 +14,6 @@ THEROCK_PATH = THEROCK_BIN_PATH.parent THEROCK_LIB_PATH = str(THEROCK_PATH / "lib") -print(f"THEROCK_PATH: {THEROCK_PATH}") -print(f"THEROCK_BIN_PATH: {THEROCK_BIN_PATH}") -print(f"THEROCK_LIB_PATH: {THEROCK_PATH}") - # Set up ROCM_PATH environ_vars = os.environ.copy() environ_vars["ROCM_PATH"] = str(THEROCK_PATH) @@ -25,7 +21,6 @@ # Set up PYTHONPATH (for test_utils.py) old_pythonpath = os.getenv("PYTHONPATH", "") module_dir = f"{THEROCK_PATH}/libexec/rocprofiler-compute/tests" -print(f"Module Directory: {module_dir}") if old_pythonpath: environ_vars["PYTHONPATH"] = f"{module_dir}:{old_pythonpath}" else: @@ -34,7 +29,6 @@ # Set up PATH old_path = os.getenv("PATH", "") rocm_bin = str(THEROCK_BIN_PATH) -print(f"ROCm Bin Directory: {rocm_bin}") if old_path: environ_vars["PATH"] = f"{rocm_bin}:{old_path}" else: @@ -50,10 +44,6 @@ else: environ_vars["LD_LIBRARY_PATH"] = f"{THEROCK_LIB_PATH}:{sysdeps_path}" -# Print out all env vars -for key, value in environ_vars.items(): - print(f"{key}: {value}") - # Run tests cmd = [ "ctest", From 6f1fc7275bcb01fc7a572b032150f6b48c1ed991 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 20 Jan 2026 15:25:49 -0500 Subject: [PATCH 33/68] Add back parallel ctest run, reduce timeout to 600s --- .../test_executable_scripts/test_rocprofiler_compute.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 9fe4970f69f..89758ef081b 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -50,8 +50,10 @@ "--test-dir", f"{THEROCK_PATH}/libexec/rocprofiler-compute", "--output-on-failure", + "--parallel", + "8", "--timeout", - "1800", + "600", ] logging.info(f"++ Exec [{THEROCK_PATH}]$ {shlex.join(cmd)}") subprocess.run( From f3fa9c054f4c1b06fed149576bf8e1614c0fb589 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 21 Jan 2026 11:59:19 -0500 Subject: [PATCH 34/68] Add verbose output --- .../test_executable_scripts/test_rocprofiler_compute.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 89758ef081b..ec8157bdc28 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -54,6 +54,7 @@ "8", "--timeout", "600", + "--verbose", ] logging.info(f"++ Exec [{THEROCK_PATH}]$ {shlex.join(cmd)}") subprocess.run( From 43c79aa7b0ffe729cedd4eb585a0aa59ded3df23 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 21 Jan 2026 15:59:14 -0500 Subject: [PATCH 35/68] Update test artifacts in artifact-rocprofiler-sdk.toml to include run as well --- profiler/artifact-rocprofiler-sdk.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/profiler/artifact-rocprofiler-sdk.toml b/profiler/artifact-rocprofiler-sdk.toml index 1e893787dc6..a74dea61fd4 100644 --- a/profiler/artifact-rocprofiler-sdk.toml +++ b/profiler/artifact-rocprofiler-sdk.toml @@ -30,6 +30,10 @@ include = [ ] [components.test."profiler/rocprofiler-sdk/stage"] include = [ + "bin/**", + "share/rocprofiler-sdk/**", + "share/rocprofiler-sdk-rocpd/**", + "share/rocprofiler-sdk-roctx/**", "share/rocprofiler-sdk/tests/**", "lib/python*/**", ] From 96554fc2bd3b0dcc0d89301c25b8e6e0813c4668 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Thu, 22 Jan 2026 12:21:38 -0500 Subject: [PATCH 36/68] Add temporary workaround for pandas issues in action.yml --- .github/actions/setup_test_environment/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup_test_environment/action.yml b/.github/actions/setup_test_environment/action.yml index f4259600deb..596ac3cd7d2 100644 --- a/.github/actions/setup_test_environment/action.yml +++ b/.github/actions/setup_test_environment/action.yml @@ -87,6 +87,7 @@ runs: env: OUTPUT_ARTIFACTS_DIR: ${{ inputs.OUTPUT_ARTIFACTS_DIR }} run: | + sed -i "s/pandas>=1.4.3/pandas==2.3.3/g" ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements.txt uv pip install -r ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements.txt uv pip install -r ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements-test.txt uv pip freeze From 5ebf1afb5a95bcadc03f8e70abc3ca79e3f4f319 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Thu, 22 Jan 2026 16:40:12 -0500 Subject: [PATCH 37/68] Add temp fix for fixing path issue in test_autogen_config.py --- .github/actions/setup_test_environment/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup_test_environment/action.yml b/.github/actions/setup_test_environment/action.yml index 596ac3cd7d2..38c13e3fb88 100644 --- a/.github/actions/setup_test_environment/action.yml +++ b/.github/actions/setup_test_environment/action.yml @@ -88,6 +88,7 @@ runs: OUTPUT_ARTIFACTS_DIR: ${{ inputs.OUTPUT_ARTIFACTS_DIR }} run: | sed -i "s/pandas>=1.4.3/pandas==2.3.3/g" ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements.txt + sed -i "s/src\///g" ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/tests/test_autogen_config.py uv pip install -r ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements.txt uv pip install -r ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements-test.txt uv pip freeze From f6465a4639a2fb1819623de410d11e1e590fcc05 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Fri, 23 Jan 2026 09:39:57 -0500 Subject: [PATCH 38/68] Disable test_profile_pc_sampling test due to Jira issue --- .../test_executable_scripts/test_rocprofiler_compute.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index ec8157bdc28..0c0902d4113 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -14,6 +14,10 @@ THEROCK_PATH = THEROCK_BIN_PATH.parent THEROCK_LIB_PATH = str(THEROCK_PATH / "lib") +# Set up excluded tests (include Jiras) +# AIPROFSDK-36: rocr issue causing test to fail +EXCLUDED_TESTS = "test_profile_pc_sampling" + # Set up ROCM_PATH environ_vars = os.environ.copy() environ_vars["ROCM_PATH"] = str(THEROCK_PATH) @@ -52,9 +56,9 @@ "--output-on-failure", "--parallel", "8", - "--timeout", - "600", "--verbose", + "-E", + f"{EXCLUDED_TESTS}", ] logging.info(f"++ Exec [{THEROCK_PATH}]$ {shlex.join(cmd)}") subprocess.run( From 6082b1d917f2f286bbaf21901815dd239e80ce78 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Fri, 23 Jan 2026 12:42:11 -0500 Subject: [PATCH 39/68] Remove --parallel 8 option from ctest to avoid profile errors --- .../test_executable_scripts/test_rocprofiler_compute.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 0c0902d4113..8ee3ebd0d71 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -54,8 +54,6 @@ "--test-dir", f"{THEROCK_PATH}/libexec/rocprofiler-compute", "--output-on-failure", - "--parallel", - "8", "--verbose", "-E", f"{EXCLUDED_TESTS}", From 51c392ea66c7beea9eded65a91640c9f94c480f8 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Fri, 23 Jan 2026 16:29:54 -0500 Subject: [PATCH 40/68] Minor code cleanup on test_rocprofiler_compute.py --- .../test_rocprofiler_compute.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 8ee3ebd0d71..5e745e2bdb4 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -4,27 +4,24 @@ import subprocess from pathlib import Path +# Resolve paths THEROCK_BIN_DIR = os.getenv("THEROCK_BIN_DIR") OUTPUT_ARTIFACTS_DIR = os.getenv("OUTPUT_ARTIFACTS_DIR") SCRIPT_DIR = Path(__file__).resolve().parent THEROCK_DIR = SCRIPT_DIR.parent.parent.parent -# Resolve absolute paths THEROCK_BIN_PATH = Path(THEROCK_BIN_DIR).resolve() THEROCK_PATH = THEROCK_BIN_PATH.parent THEROCK_LIB_PATH = str(THEROCK_PATH / "lib") - -# Set up excluded tests (include Jiras) -# AIPROFSDK-36: rocr issue causing test to fail -EXCLUDED_TESTS = "test_profile_pc_sampling" +ROCPROFILER_COMPUTE_DIRECTORY = f"{THEROCK_PATH}/libexec/rocprofiler-compute" # Set up ROCM_PATH environ_vars = os.environ.copy() environ_vars["ROCM_PATH"] = str(THEROCK_PATH) -# Set up PYTHONPATH (for test_utils.py) +# Set up PYTHONPATH old_pythonpath = os.getenv("PYTHONPATH", "") -module_dir = f"{THEROCK_PATH}/libexec/rocprofiler-compute/tests" +module_dir = f"{ROCPROFILER_COMPUTE_DIRECTORY}/tests" if old_pythonpath: environ_vars["PYTHONPATH"] = f"{module_dir}:{old_pythonpath}" else: @@ -48,11 +45,15 @@ else: environ_vars["LD_LIBRARY_PATH"] = f"{THEROCK_LIB_PATH}:{sysdeps_path}" +# Set up excluded tests (include Jiras) +# AIPROFSDK-36: rocr issue causing test to fail +EXCLUDED_TESTS = "test_profile_pc_sampling" + # Run tests cmd = [ "ctest", "--test-dir", - f"{THEROCK_PATH}/libexec/rocprofiler-compute", + f"{ROCPROFILER_COMPUTE_DIRECTORY}", "--output-on-failure", "--verbose", "-E", From 2e854bba54080081c0a2e22985b944c10fbd5b1d Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 4 Feb 2026 15:08:58 -0500 Subject: [PATCH 41/68] Remove temporary sed commands from action.yml --- .github/actions/setup_test_environment/action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/actions/setup_test_environment/action.yml b/.github/actions/setup_test_environment/action.yml index 38c13e3fb88..f4259600deb 100644 --- a/.github/actions/setup_test_environment/action.yml +++ b/.github/actions/setup_test_environment/action.yml @@ -87,8 +87,6 @@ runs: env: OUTPUT_ARTIFACTS_DIR: ${{ inputs.OUTPUT_ARTIFACTS_DIR }} run: | - sed -i "s/pandas>=1.4.3/pandas==2.3.3/g" ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements.txt - sed -i "s/src\///g" ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/tests/test_autogen_config.py uv pip install -r ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements.txt uv pip install -r ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements-test.txt uv pip freeze From 2052f4e84ce15aa3ea837db9284d56cdf5f7ec7f Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 10 Feb 2026 10:42:37 -0500 Subject: [PATCH 42/68] Add setup scripts for fetch_test_configurations.py --- .../actions/setup_test_environment/action.yml | 10 ----- .github/workflows/test_component.yml | 4 ++ .../fetch_test_configurations.py | 39 ++++++++++++++-- .../setup_rocprofiler_compute.py | 45 +++++++++++++++++++ 4 files changed, 85 insertions(+), 13 deletions(-) create mode 100644 build_tools/github_actions/setup_executable_scripts/setup_rocprofiler_compute.py diff --git a/.github/actions/setup_test_environment/action.yml b/.github/actions/setup_test_environment/action.yml index 0054d33d071..eff647313a1 100644 --- a/.github/actions/setup_test_environment/action.yml +++ b/.github/actions/setup_test_environment/action.yml @@ -80,13 +80,3 @@ runs: --artifact-group=${ARTIFACT_GROUP} \ --output-dir=${OUTPUT_ARTIFACTS_DIR} \ ${FETCH_ARTIFACT_ARGS} - - - name: Install additional test requirements for rocprofiler-compute - if: ${{ contains(inputs.FETCH_ARTIFACT_ARGS, 'rocprofiler-compute') }} - shell: bash - env: - OUTPUT_ARTIFACTS_DIR: ${{ inputs.OUTPUT_ARTIFACTS_DIR }} - run: | - uv pip install -r ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements.txt - uv pip install -r ${OUTPUT_ARTIFACTS_DIR}/libexec/rocprofiler-compute/requirements-test.txt - uv pip freeze diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index 7ee3ccbc9f0..1a17c11d3c1 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -108,6 +108,10 @@ jobs: run: | python ./build_tools/print_driver_gpu_info.py + - name: Setup Test + run: | + ${{ fromJSON(inputs.component).setup_script }} + - name: Test timeout-minutes: ${{ fromJSON(inputs.component).timeout_minutes }} env: diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index 3d1cc23b2aa..228b1f08232 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -18,11 +18,14 @@ # Note: these paths are relative to the repository root. We could make that # more explicit, or use absolute paths. -SCRIPT_DIR = Path("./build_tools/github_actions/test_executable_scripts") +SCRIPT_DIR = Path("./build_tools/github_actions") -def _get_script_path(script_name: str) -> str: - platform_path = SCRIPT_DIR / script_name +def _get_script_path(script_name: str, is_setup: bool = False) -> str: + script_folder = ( + "setup_executable_scripts" if is_setup else "test_executable_scripts" + ) + platform_path = SCRIPT_DIR / script_folder / script_name # Convert to posix (using `/` instead of `\\`) so test workflows can use # 'bash' as the shell on Linux and Windows. posix_path = platform_path.as_posix() @@ -35,6 +38,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "hip-tests", "fetch_artifact_args": "--tests", "timeout_minutes": 120, + "setup_script": "", "test_script": f"python {_get_script_path('test_hiptests.py')}", "platform": ["linux", "windows"], "total_shards": 4, @@ -44,6 +48,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocblas", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 15, + "setup_script": "", "test_script": f"python {_get_script_path('test_rocblas.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -52,6 +57,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocroller", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 60, + "setup_script": "", "test_script": f"python {_get_script_path('test_rocroller.py')}", "platform": ["linux"], "total_shards": 5, @@ -75,6 +81,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipblas", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 30, + "setup_script": "", "test_script": f"python {_get_script_path('test_hipblas.py')}", "platform": ["linux", "windows"], # TODO(#2616): Enable full tests once known machine issues are resolved @@ -84,6 +91,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipblaslt", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 180, + "setup_script": "", "test_script": f"python {_get_script_path('test_hipblaslt.py')}", "platform": ["linux", "windows"], "total_shards": 6, @@ -93,6 +101,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipsolver", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 5, + "setup_script": "", "test_script": f"python {_get_script_path('test_hipsolver.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -101,6 +110,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocsolver", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 30, + "setup_script": "", "test_script": f"python {_get_script_path('test_rocsolver.py')}", # Issue for adding windows tests: https://github.com/ROCm/TheRock/issues/1770 "platform": ["linux"], @@ -111,6 +121,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocprim", "fetch_artifact_args": "--prim --tests", "timeout_minutes": 30, + "setup_script": "", "test_script": f"python {_get_script_path('test_rocprim.py')}", "platform": ["linux", "windows"], "total_shards": 2, @@ -119,6 +130,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipcub", "fetch_artifact_args": "--prim --tests", "timeout_minutes": 15, + "setup_script": "", "test_script": f"python {_get_script_path('test_hipcub.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -127,6 +139,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocr-debug-agent", "fetch_artifact_args": "--debug-tools --tests", "timeout_minutes": 10, + "setup_script": "", "test_script": f"python {_get_script_path('test_rocr-debug-agent.py')}", "platform": ["linux"], "total_shards": 1, @@ -135,6 +148,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocthrust", "fetch_artifact_args": "--prim --tests", "timeout_minutes": 15, + "setup_script": "", "test_script": f"python {_get_script_path('test_rocthrust.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -144,6 +158,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipsparse", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 30, + "setup_script": "", "test_script": f"python {_get_script_path('test_hipsparse.py')}", "platform": ["linux", "windows"], "total_shards": 2, @@ -152,6 +167,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocsparse", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 15, + "setup_script": "", "test_script": f"python {_get_script_path('test_rocsparse.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -160,6 +176,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipsparselt", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 120, + "setup_script": "", "test_script": f"python {_get_script_path('test_hipsparselt.py')}", # TODO(#2616): Re-enable tests after test slowdown issues are resolved "platform": [], @@ -170,6 +187,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocrand", "fetch_artifact_args": "--rand --tests", "timeout_minutes": 15, + "setup_script": "", "test_script": f"python {_get_script_path('test_rocrand.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -178,6 +196,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "hiprand", "fetch_artifact_args": "--rand --tests", "timeout_minutes": 5, + "setup_script": "", "test_script": f"python {_get_script_path('test_hiprand.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -187,6 +206,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocfft", "fetch_artifact_args": "--fft --rand --tests", "timeout_minutes": 60, + "setup_script": "", "test_script": f"python {_get_script_path('test_rocfft.py')}", # TODO(geomin12): Add windows test (https://github.com/ROCm/TheRock/issues/1391) "platform": ["linux"], @@ -196,6 +216,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipfft", "fetch_artifact_args": "--fft --rand --tests", "timeout_minutes": 60, + "setup_script": "", "test_script": f"python {_get_script_path('test_hipfft.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -205,6 +226,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "miopen", "fetch_artifact_args": "--blas --miopen --tests", "timeout_minutes": 60, + "setup_script": "", "test_script": f"python {_get_script_path('test_miopen.py')}", "platform": ["linux", "windows"], "total_shards": 4, @@ -214,6 +236,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rccl", "fetch_artifact_args": "--rccl --tests", "timeout_minutes": 15, + "setup_script": "", "test_script": f"pytest {_get_script_path('test_rccl.py')} -v -s --log-cli-level=info", "platform": ["linux"], "total_shards": 1, @@ -225,6 +248,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipdnn", "fetch_artifact_args": "--hipdnn --tests", "timeout_minutes": 5, + "setup_script": "", "test_script": f"python {_get_script_path('test_hipdnn.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -233,6 +257,7 @@ def _get_script_path(script_name: str) -> str: "hipdnn_install": { "job_name": "hipdnn_install", "timeout_minutes": 10, + "setup_script": "", "test_script": f"python {_get_script_path('test_hipdnn_install.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -242,6 +267,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipdnn-samples", "fetch_artifact_args": "--blas --miopen --hipdnn --miopen-plugin --hipdnn-samples --tests", "timeout_minutes": 5, + "setup_script": "", "test_script": f"python {_get_script_path('test_hipdnn_samples.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -251,6 +277,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "miopen_plugin", "fetch_artifact_args": "--blas --miopen --hipdnn --miopen-plugin --tests", "timeout_minutes": 15, + "setup_script": "", "test_script": f"python {_get_script_path('test_miopen_plugin.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -270,6 +297,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipblaslt_plugin", "fetch_artifact_args": "--blas --hipdnn --hipblaslt-plugin --tests", "timeout_minutes": 15, + "setup_script": "", "test_script": f"python {_get_script_path('test_hipblaslt_plugin.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -279,6 +307,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocwmma", "fetch_artifact_args": "--rocwmma --tests --blas", "timeout_minutes": 60, + "setup_script": "", "test_script": f"python {_get_script_path('test_rocwmma.py')}", "platform": ["linux", "windows"], "total_shards": 5, @@ -288,6 +317,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocprofiler_compute", "fetch_artifact_args": "--rocprofiler-compute --rocprofiler-sdk --tests", "timeout_minutes": 60, + "setup_script": f"python {_get_script_path('setup_rocprofiler_compute.py', True)}", "test_script": f"python {_get_script_path('test_rocprofiler_compute.py')} -v", "platform": ["linux"], "total_shards": 1, @@ -297,6 +327,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "libhipcxx_hipcc", "fetch_artifact_args": "--libhipcxx --tests", "timeout_minutes": 30, + "setup_script": "", "test_script": f"python {_get_script_path('test_libhipcxx_hipcc.py')}", "platform": ["linux"], "total_shards": 1, @@ -306,6 +337,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "libhipcxx_hiprtc", "fetch_artifact_args": "--libhipcxx --tests", "timeout_minutes": 20, + "setup_script": "", "test_script": f"python {_get_script_path('test_libhipcxx_hiprtc.py')}", "platform": ["linux"], "total_shards": 1, @@ -315,6 +347,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "aqlprofile", "fetch_artifact_args": "--aqlprofile --tests", "timeout_minutes": 5, + "setup_script": "", "test_script": f"python {_get_script_path('test_aqlprofile.py')}", "platform": ["linux"], "total_shards": 1, diff --git a/build_tools/github_actions/setup_executable_scripts/setup_rocprofiler_compute.py b/build_tools/github_actions/setup_executable_scripts/setup_rocprofiler_compute.py new file mode 100644 index 00000000000..816492a3956 --- /dev/null +++ b/build_tools/github_actions/setup_executable_scripts/setup_rocprofiler_compute.py @@ -0,0 +1,45 @@ +import logging +import shlex +import subprocess +import os +from pathlib import Path + +SCRIPT_DIR = Path(__file__).resolve().parent +THEROCK_DIR = SCRIPT_DIR.parent.parent.parent +THEROCK_OUTPUT_DIR = str(THEROCK_DIR / "build") + +VENV_DIR = os.getenv("VENV_DIR") +PYTHON_EXECUTABLE = VENV_DIR + "/bin/python" + +# Set up pip +setup_cmd = [ + f"{PYTHON_EXECUTABLE}", + "-m", + "ensurepip", + "--upgrade", +] +logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(setup_cmd)}") +subprocess.run( + setup_cmd, + cwd=THEROCK_DIR, + check=True, +) + +# Install requirements +requirements_dir = f"{THEROCK_OUTPUT_DIR}/libexec/rocprofiler-compute" +cmd = [ + f"{PYTHON_EXECUTABLE}", + "-m", + "pip", + "install", + "-r", + f"{requirements_dir}/requirements.txt", + "-r", + f"{requirements_dir}/requirements-test.txt", +] +logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") +subprocess.run( + cmd, + cwd=THEROCK_DIR, + check=True, +) From 97a3eefea14801168954ecc11f03192612784cdf Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 10 Feb 2026 17:27:51 -0500 Subject: [PATCH 43/68] Revert changes to artifact-rocprofiler-sdk.toml, update install_rocm_from_artifacts.py --- build_tools/install_rocm_from_artifacts.py | 2 ++ profiler/artifact-rocprofiler-sdk.toml | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/build_tools/install_rocm_from_artifacts.py b/build_tools/install_rocm_from_artifacts.py index 7ce8e2060db..f916126c4d1 100644 --- a/build_tools/install_rocm_from_artifacts.py +++ b/build_tools/install_rocm_from_artifacts.py @@ -399,6 +399,8 @@ def retrieve_artifacts_by_run_id(args): extra_artifacts.append("rccl") if args.rocprofiler_compute: extra_artifacts.append("rocprofiler-compute") + # rocprofiler-compute has a runtime dependency on rocprofiler-sdk + argv.append("rocprofiler-sdk_run") if args.rocprofiler_sdk: extra_artifacts.append("rocprofiler-sdk") if args.rocprofiler_systems: diff --git a/profiler/artifact-rocprofiler-sdk.toml b/profiler/artifact-rocprofiler-sdk.toml index a74dea61fd4..032082b23ba 100644 --- a/profiler/artifact-rocprofiler-sdk.toml +++ b/profiler/artifact-rocprofiler-sdk.toml @@ -30,12 +30,7 @@ include = [ ] [components.test."profiler/rocprofiler-sdk/stage"] include = [ - "bin/**", - "share/rocprofiler-sdk/**", - "share/rocprofiler-sdk-rocpd/**", - "share/rocprofiler-sdk-roctx/**", "share/rocprofiler-sdk/tests/**", - "lib/python*/**", ] # roctracer From e02af5785ebb3b46e0ac878b2d8d7b1659c81109 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 17 Feb 2026 11:16:56 -0500 Subject: [PATCH 44/68] Add sharding and smoke test support to test_rocprofiler_compute.py --- .../fetch_test_configurations.py | 2 +- .../test_rocprofiler_compute.py | 49 ++++++++++++++++++- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index 228b1f08232..4d0afe3bf41 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -320,7 +320,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "setup_script": f"python {_get_script_path('setup_rocprofiler_compute.py', True)}", "test_script": f"python {_get_script_path('test_rocprofiler_compute.py')} -v", "platform": ["linux"], - "total_shards": 1, + "total_shards": 2, }, # libhipcxx hipcc tests "libhipcxx_hipcc": { diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 5e745e2bdb4..0c57d8605f5 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -47,7 +47,50 @@ # Set up excluded tests (include Jiras) # AIPROFSDK-36: rocr issue causing test to fail -EXCLUDED_TESTS = "test_profile_pc_sampling" +BASE_EXCLUDED_TESTS = [ + "test_profile_pc_sampling", +] + +# Sharding +shard_index = int(os.getenv("SHARD_INDEX", "1")) - 1 +total_shards = int(os.getenv("TOTAL_SHARDS", "1")) + +# Smoke Tests Setup +SMOKE_TESTS = [ + "test_autogen_config", + "test_utils", + "test_num_xcds_cli_output", + "test_num_xcds_spec_class", + "test_L1_cache_counters", + "test_analyze_workloads", + "test_analyze_commands", + "test_metric_validation", +] +SMOKE_EXCLUDED_TESTS = [ + "test_profile_iteration_multiplexing_stochastic", + "test_profile_iteration_multiplexing_2", + "test_profile_iteration_multiplexing_1", + "test_profile_live_attach_detach", + "test_profile_sets_func", + "test_profile_pc_sampling", + "test_profile_section", + "test_profile_roofline_2", + "test_profile_roofline_1", + "test_profile_path", + "test_profile_misc", + "test_profile_sort", + "test_profile_join", + "test_profile_mem", + "test_profile_dispatch", + "test_profile_kernel_execution", +] + +# If smoke tests are enabled, we run smoke tests only. +# Otherwise, we run the normal test suite +test_type = os.getenv("TEST_TYPE", "full") +excluded_tests = BASE_EXCLUDED_TESTS +if test_type == "smoke": + excluded_tests = excluded_tests + SMOKE_EXCLUDED_TESTS # Run tests cmd = [ @@ -57,7 +100,9 @@ "--output-on-failure", "--verbose", "-E", - f"{EXCLUDED_TESTS}", + f"{"|".join(excluded_tests)}", + "--tests-information", + f"{shard_index},,{total_shards}", ] logging.info(f"++ Exec [{THEROCK_PATH}]$ {shlex.join(cmd)}") subprocess.run( From bf4faa03119e8885ec43886003f39e31e83d081c Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 17 Feb 2026 14:44:36 -0500 Subject: [PATCH 45/68] Add rocprofiler_sdk to args check --- build_tools/install_rocm_from_artifacts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build_tools/install_rocm_from_artifacts.py b/build_tools/install_rocm_from_artifacts.py index 0bfefa57ad8..6cea5ca259a 100644 --- a/build_tools/install_rocm_from_artifacts.py +++ b/build_tools/install_rocm_from_artifacts.py @@ -345,6 +345,7 @@ def retrieve_artifacts_by_run_id(args): args.rand, args.rccl, args.rocprofiler_compute, + args.rocprofiler_sdk, args.rocprofiler_systems, args.rocwmma, args.libhipcxx, From 3e1ee69eaa3e395980d1324cd84185ffcc9df014 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 17 Feb 2026 17:22:36 -0500 Subject: [PATCH 46/68] Add template for requirements files setup in test_componnet.yml --- .github/workflows/test_component.yml | 13 +++- .../fetch_test_configurations.py | 69 +++++++++---------- .../setup_rocprofiler_compute.py | 45 ------------ 3 files changed, 44 insertions(+), 83 deletions(-) delete mode 100644 build_tools/github_actions/setup_executable_scripts/setup_rocprofiler_compute.py diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index dcd314b31c0..6209c340939 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -110,9 +110,18 @@ jobs: run: | python ./build_tools/print_driver_gpu_info.py - - name: Setup Test + - name: Setup Requirements run: | - ${{ fromJSON(inputs.component).setup_script }} + REQUIREMENTS_FILES = ${{ fromJSON(inputs.component).requirements_files }} + DELIMITER="," + IFS="$DELIMITER" read -r -a array <<< "$STRING" + + ${{ github.workspace }}/.venv/bin/python -m ensurepip --upgrade + + for file in "${array[@]}"; do + echo "Installing Requirements File: $file" + ${{ github.workspace }}/.venv/bin/python -m pip install -r ${{ env.OUTPUT_ARTIFACTS_DIR }}/$file + done - name: Test timeout-minutes: ${{ fromJSON(inputs.component).timeout_minutes }} diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index 4d0afe3bf41..eabf0c299b8 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -18,14 +18,11 @@ # Note: these paths are relative to the repository root. We could make that # more explicit, or use absolute paths. -SCRIPT_DIR = Path("./build_tools/github_actions") +SCRIPT_DIR = Path("./build_tools/github_actions/test_executable_scripts") -def _get_script_path(script_name: str, is_setup: bool = False) -> str: - script_folder = ( - "setup_executable_scripts" if is_setup else "test_executable_scripts" - ) - platform_path = SCRIPT_DIR / script_folder / script_name +def _get_script_path(script_name: str) -> str: + platform_path = SCRIPT_DIR / script_name # Convert to posix (using `/` instead of `\\`) so test workflows can use # 'bash' as the shell on Linux and Windows. posix_path = platform_path.as_posix() @@ -38,7 +35,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "hip-tests", "fetch_artifact_args": "--tests", "timeout_minutes": 120, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hiptests.py')}", "platform": ["linux", "windows"], "total_shards": 4, @@ -48,7 +45,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "rocblas", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 15, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_rocblas.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -57,7 +54,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "rocroller", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 60, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_rocroller.py')}", "platform": ["linux"], "total_shards": 5, @@ -81,7 +78,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "hipblas", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 30, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hipblas.py')}", "platform": ["linux", "windows"], # TODO(#2616): Enable full tests once known machine issues are resolved @@ -91,7 +88,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "hipblaslt", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 180, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hipblaslt.py')}", "platform": ["linux", "windows"], "total_shards": 6, @@ -101,7 +98,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "hipsolver", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 5, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hipsolver.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -110,7 +107,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "rocsolver", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 30, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_rocsolver.py')}", # Issue for adding windows tests: https://github.com/ROCm/TheRock/issues/1770 "platform": ["linux"], @@ -121,7 +118,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "rocprim", "fetch_artifact_args": "--prim --tests", "timeout_minutes": 30, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_rocprim.py')}", "platform": ["linux", "windows"], "total_shards": 2, @@ -130,7 +127,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "hipcub", "fetch_artifact_args": "--prim --tests", "timeout_minutes": 15, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hipcub.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -139,7 +136,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "rocr-debug-agent", "fetch_artifact_args": "--debug-tools --tests", "timeout_minutes": 10, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_rocr-debug-agent.py')}", "platform": ["linux"], "total_shards": 1, @@ -148,7 +145,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "rocthrust", "fetch_artifact_args": "--prim --tests", "timeout_minutes": 15, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_rocthrust.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -158,7 +155,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "hipsparse", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 30, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hipsparse.py')}", "platform": ["linux", "windows"], "total_shards": 2, @@ -167,7 +164,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "rocsparse", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 15, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_rocsparse.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -176,7 +173,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "hipsparselt", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 120, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hipsparselt.py')}", # TODO(#2616): Re-enable tests after test slowdown issues are resolved "platform": [], @@ -187,7 +184,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "rocrand", "fetch_artifact_args": "--rand --tests", "timeout_minutes": 15, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_rocrand.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -196,7 +193,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "hiprand", "fetch_artifact_args": "--rand --tests", "timeout_minutes": 5, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hiprand.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -206,7 +203,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "rocfft", "fetch_artifact_args": "--fft --rand --tests", "timeout_minutes": 60, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_rocfft.py')}", # TODO(geomin12): Add windows test (https://github.com/ROCm/TheRock/issues/1391) "platform": ["linux"], @@ -216,7 +213,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "hipfft", "fetch_artifact_args": "--fft --rand --tests", "timeout_minutes": 60, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hipfft.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -226,7 +223,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "miopen", "fetch_artifact_args": "--blas --miopen --tests", "timeout_minutes": 60, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_miopen.py')}", "platform": ["linux", "windows"], "total_shards": 4, @@ -236,7 +233,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "rccl", "fetch_artifact_args": "--rccl --tests", "timeout_minutes": 15, - "setup_script": "", + "requirements_files": "", "test_script": f"pytest {_get_script_path('test_rccl.py')} -v -s --log-cli-level=info", "platform": ["linux"], "total_shards": 1, @@ -248,7 +245,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "hipdnn", "fetch_artifact_args": "--hipdnn --tests", "timeout_minutes": 5, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hipdnn.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -257,7 +254,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "hipdnn_install": { "job_name": "hipdnn_install", "timeout_minutes": 10, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hipdnn_install.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -267,7 +264,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "hipdnn-samples", "fetch_artifact_args": "--blas --miopen --hipdnn --miopen-plugin --hipdnn-samples --tests", "timeout_minutes": 5, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hipdnn_samples.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -277,7 +274,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "miopen_plugin", "fetch_artifact_args": "--blas --miopen --hipdnn --miopen-plugin --tests", "timeout_minutes": 15, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_miopen_plugin.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -297,7 +294,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "hipblaslt_plugin", "fetch_artifact_args": "--blas --hipdnn --hipblaslt-plugin --tests", "timeout_minutes": 15, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_hipblaslt_plugin.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -307,7 +304,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "rocwmma", "fetch_artifact_args": "--rocwmma --tests --blas", "timeout_minutes": 60, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_rocwmma.py')}", "platform": ["linux", "windows"], "total_shards": 5, @@ -317,7 +314,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "rocprofiler_compute", "fetch_artifact_args": "--rocprofiler-compute --rocprofiler-sdk --tests", "timeout_minutes": 60, - "setup_script": f"python {_get_script_path('setup_rocprofiler_compute.py', True)}", + "requirements_files": f"python {_get_script_path('setup_rocprofiler_compute.py', True)}", "test_script": f"python {_get_script_path('test_rocprofiler_compute.py')} -v", "platform": ["linux"], "total_shards": 2, @@ -327,7 +324,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "libhipcxx_hipcc", "fetch_artifact_args": "--libhipcxx --tests", "timeout_minutes": 30, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_libhipcxx_hipcc.py')}", "platform": ["linux"], "total_shards": 1, @@ -337,7 +334,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "libhipcxx_hiprtc", "fetch_artifact_args": "--libhipcxx --tests", "timeout_minutes": 20, - "setup_script": "", + "requirements_files": "libexec/rocprofiler-compute/requirements.txt,libexec/rocprofiler-compute/requirements-test.txt", "test_script": f"python {_get_script_path('test_libhipcxx_hiprtc.py')}", "platform": ["linux"], "total_shards": 1, @@ -347,7 +344,7 @@ def _get_script_path(script_name: str, is_setup: bool = False) -> str: "job_name": "aqlprofile", "fetch_artifact_args": "--aqlprofile --tests", "timeout_minutes": 5, - "setup_script": "", + "requirements_files": "", "test_script": f"python {_get_script_path('test_aqlprofile.py')}", "platform": ["linux"], "total_shards": 1, diff --git a/build_tools/github_actions/setup_executable_scripts/setup_rocprofiler_compute.py b/build_tools/github_actions/setup_executable_scripts/setup_rocprofiler_compute.py deleted file mode 100644 index 816492a3956..00000000000 --- a/build_tools/github_actions/setup_executable_scripts/setup_rocprofiler_compute.py +++ /dev/null @@ -1,45 +0,0 @@ -import logging -import shlex -import subprocess -import os -from pathlib import Path - -SCRIPT_DIR = Path(__file__).resolve().parent -THEROCK_DIR = SCRIPT_DIR.parent.parent.parent -THEROCK_OUTPUT_DIR = str(THEROCK_DIR / "build") - -VENV_DIR = os.getenv("VENV_DIR") -PYTHON_EXECUTABLE = VENV_DIR + "/bin/python" - -# Set up pip -setup_cmd = [ - f"{PYTHON_EXECUTABLE}", - "-m", - "ensurepip", - "--upgrade", -] -logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(setup_cmd)}") -subprocess.run( - setup_cmd, - cwd=THEROCK_DIR, - check=True, -) - -# Install requirements -requirements_dir = f"{THEROCK_OUTPUT_DIR}/libexec/rocprofiler-compute" -cmd = [ - f"{PYTHON_EXECUTABLE}", - "-m", - "pip", - "install", - "-r", - f"{requirements_dir}/requirements.txt", - "-r", - f"{requirements_dir}/requirements-test.txt", -] -logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") -subprocess.run( - cmd, - cwd=THEROCK_DIR, - check=True, -) From c16068ef7b1bf25f73a97a20ca1fa31f4455d699 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 17 Feb 2026 17:28:04 -0500 Subject: [PATCH 47/68] Removed old instance of _get_script_path --- build_tools/github_actions/fetch_test_configurations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index eabf0c299b8..5306bac1531 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -314,7 +314,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocprofiler_compute", "fetch_artifact_args": "--rocprofiler-compute --rocprofiler-sdk --tests", "timeout_minutes": 60, - "requirements_files": f"python {_get_script_path('setup_rocprofiler_compute.py', True)}", + "requirements_files": "libexec/rocprofiler-compute/requirements.txt,libexec/rocprofiler-compute/requirements-test.txt", "test_script": f"python {_get_script_path('test_rocprofiler_compute.py')} -v", "platform": ["linux"], "total_shards": 2, @@ -334,7 +334,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "libhipcxx_hiprtc", "fetch_artifact_args": "--libhipcxx --tests", "timeout_minutes": 20, - "requirements_files": "libexec/rocprofiler-compute/requirements.txt,libexec/rocprofiler-compute/requirements-test.txt", + "requirements_files": "", "test_script": f"python {_get_script_path('test_libhipcxx_hiprtc.py')}", "platform": ["linux"], "total_shards": 1, From 76542db86e17d6f948d21e26bec4a9e7d8e9e316 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 18 Feb 2026 08:58:56 -0500 Subject: [PATCH 48/68] Fix spacing issue in setup requirements stage --- .github/workflows/test_component.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index 6209c340939..085ab738025 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -112,7 +112,7 @@ jobs: - name: Setup Requirements run: | - REQUIREMENTS_FILES = ${{ fromJSON(inputs.component).requirements_files }} + REQUIREMENTS_FILES=${{ fromJSON(inputs.component).requirements_files }} DELIMITER="," IFS="$DELIMITER" read -r -a array <<< "$STRING" From 62e3bf932f7ff7b472b58f4a315cc2995f65971e Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 18 Feb 2026 09:16:55 -0500 Subject: [PATCH 49/68] Change python command in setup requirements --- .github/workflows/test_component.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index 085ab738025..3d9cc96943b 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -116,11 +116,11 @@ jobs: DELIMITER="," IFS="$DELIMITER" read -r -a array <<< "$STRING" - ${{ github.workspace }}/.venv/bin/python -m ensurepip --upgrade + python -m ensurepip --upgrade for file in "${array[@]}"; do echo "Installing Requirements File: $file" - ${{ github.workspace }}/.venv/bin/python -m pip install -r ${{ env.OUTPUT_ARTIFACTS_DIR }}/$file + python -m pip install -r ${{ env.OUTPUT_ARTIFACTS_DIR }}/$file done - name: Test From 2febf286118447c28eb5bd2ba4c19040fc28f9ac Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 18 Feb 2026 09:47:49 -0500 Subject: [PATCH 50/68] Update setup requirements again --- .github/workflows/test_component.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index 3d9cc96943b..ceceb87b594 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -114,7 +114,7 @@ jobs: run: | REQUIREMENTS_FILES=${{ fromJSON(inputs.component).requirements_files }} DELIMITER="," - IFS="$DELIMITER" read -r -a array <<< "$STRING" + IFS="$DELIMITER" read -r -a array <<< "$REQUIREMENTS_FILES" python -m ensurepip --upgrade From c49255d559139f45bfdca2395cc16c5ac7786d8b Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 18 Feb 2026 11:01:46 -0500 Subject: [PATCH 51/68] Add test_profile_iteration_multiplexing_1 to smoke tests --- .../test_executable_scripts/test_rocprofiler_compute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 0c57d8605f5..822b5b01ec2 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -65,11 +65,11 @@ "test_analyze_workloads", "test_analyze_commands", "test_metric_validation", + "test_profile_iteration_multiplexing_1", ] SMOKE_EXCLUDED_TESTS = [ "test_profile_iteration_multiplexing_stochastic", "test_profile_iteration_multiplexing_2", - "test_profile_iteration_multiplexing_1", "test_profile_live_attach_detach", "test_profile_sets_func", "test_profile_pc_sampling", From 0e16201051a3f912beaee0b667d31ea8cb522429 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Thu, 19 Feb 2026 17:21:38 -0500 Subject: [PATCH 52/68] Add --tests-regex arg on smoke tests, address other feedback --- .github/workflows/test_component.yml | 1 + .../fetch_test_configurations.py | 29 ------------- .../test_rocprofiler_compute.py | 41 ++++++------------- 3 files changed, 13 insertions(+), 58 deletions(-) diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index ceceb87b594..4fc58284364 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -112,6 +112,7 @@ jobs: - name: Setup Requirements run: | + # Sets up IFS (Internal Field Separator) to read comma separated REQUIREMENTS_FILES and output filenames to an array REQUIREMENTS_FILES=${{ fromJSON(inputs.component).requirements_files }} DELIMITER="," IFS="$DELIMITER" read -r -a array <<< "$REQUIREMENTS_FILES" diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index 5306bac1531..99c07e22e26 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -35,7 +35,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "hip-tests", "fetch_artifact_args": "--tests", "timeout_minutes": 120, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hiptests.py')}", "platform": ["linux", "windows"], "total_shards": 4, @@ -45,7 +44,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocblas", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 15, - "requirements_files": "", "test_script": f"python {_get_script_path('test_rocblas.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -54,7 +52,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocroller", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 60, - "requirements_files": "", "test_script": f"python {_get_script_path('test_rocroller.py')}", "platform": ["linux"], "total_shards": 5, @@ -78,7 +75,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipblas", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 30, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hipblas.py')}", "platform": ["linux", "windows"], # TODO(#2616): Enable full tests once known machine issues are resolved @@ -88,7 +84,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipblaslt", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 180, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hipblaslt.py')}", "platform": ["linux", "windows"], "total_shards": 6, @@ -98,7 +93,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipsolver", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 5, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hipsolver.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -107,7 +101,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocsolver", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 30, - "requirements_files": "", "test_script": f"python {_get_script_path('test_rocsolver.py')}", # Issue for adding windows tests: https://github.com/ROCm/TheRock/issues/1770 "platform": ["linux"], @@ -118,7 +111,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocprim", "fetch_artifact_args": "--prim --tests", "timeout_minutes": 30, - "requirements_files": "", "test_script": f"python {_get_script_path('test_rocprim.py')}", "platform": ["linux", "windows"], "total_shards": 2, @@ -127,7 +119,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipcub", "fetch_artifact_args": "--prim --tests", "timeout_minutes": 15, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hipcub.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -136,7 +127,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocr-debug-agent", "fetch_artifact_args": "--debug-tools --tests", "timeout_minutes": 10, - "requirements_files": "", "test_script": f"python {_get_script_path('test_rocr-debug-agent.py')}", "platform": ["linux"], "total_shards": 1, @@ -145,7 +135,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocthrust", "fetch_artifact_args": "--prim --tests", "timeout_minutes": 15, - "requirements_files": "", "test_script": f"python {_get_script_path('test_rocthrust.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -155,7 +144,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipsparse", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 30, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hipsparse.py')}", "platform": ["linux", "windows"], "total_shards": 2, @@ -164,7 +152,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocsparse", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 15, - "requirements_files": "", "test_script": f"python {_get_script_path('test_rocsparse.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -173,7 +160,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipsparselt", "fetch_artifact_args": "--blas --tests", "timeout_minutes": 120, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hipsparselt.py')}", # TODO(#2616): Re-enable tests after test slowdown issues are resolved "platform": [], @@ -184,7 +170,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocrand", "fetch_artifact_args": "--rand --tests", "timeout_minutes": 15, - "requirements_files": "", "test_script": f"python {_get_script_path('test_rocrand.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -193,7 +178,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "hiprand", "fetch_artifact_args": "--rand --tests", "timeout_minutes": 5, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hiprand.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -203,7 +187,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocfft", "fetch_artifact_args": "--fft --rand --tests", "timeout_minutes": 60, - "requirements_files": "", "test_script": f"python {_get_script_path('test_rocfft.py')}", # TODO(geomin12): Add windows test (https://github.com/ROCm/TheRock/issues/1391) "platform": ["linux"], @@ -213,7 +196,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipfft", "fetch_artifact_args": "--fft --rand --tests", "timeout_minutes": 60, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hipfft.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -223,7 +205,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "miopen", "fetch_artifact_args": "--blas --miopen --tests", "timeout_minutes": 60, - "requirements_files": "", "test_script": f"python {_get_script_path('test_miopen.py')}", "platform": ["linux", "windows"], "total_shards": 4, @@ -233,7 +214,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "rccl", "fetch_artifact_args": "--rccl --tests", "timeout_minutes": 15, - "requirements_files": "", "test_script": f"pytest {_get_script_path('test_rccl.py')} -v -s --log-cli-level=info", "platform": ["linux"], "total_shards": 1, @@ -245,7 +225,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipdnn", "fetch_artifact_args": "--hipdnn --tests", "timeout_minutes": 5, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hipdnn.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -254,7 +233,6 @@ def _get_script_path(script_name: str) -> str: "hipdnn_install": { "job_name": "hipdnn_install", "timeout_minutes": 10, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hipdnn_install.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -264,7 +242,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipdnn-samples", "fetch_artifact_args": "--blas --miopen --hipdnn --miopen-plugin --hipdnn-samples --tests", "timeout_minutes": 5, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hipdnn_samples.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -274,7 +251,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "miopen_plugin", "fetch_artifact_args": "--blas --miopen --hipdnn --miopen-plugin --tests", "timeout_minutes": 15, - "requirements_files": "", "test_script": f"python {_get_script_path('test_miopen_plugin.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -294,7 +270,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "hipblaslt_plugin", "fetch_artifact_args": "--blas --hipdnn --hipblaslt-plugin --tests", "timeout_minutes": 15, - "requirements_files": "", "test_script": f"python {_get_script_path('test_hipblaslt_plugin.py')}", "platform": ["linux", "windows"], "total_shards": 1, @@ -304,7 +279,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocwmma", "fetch_artifact_args": "--rocwmma --tests --blas", "timeout_minutes": 60, - "requirements_files": "", "test_script": f"python {_get_script_path('test_rocwmma.py')}", "platform": ["linux", "windows"], "total_shards": 5, @@ -324,7 +298,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "libhipcxx_hipcc", "fetch_artifact_args": "--libhipcxx --tests", "timeout_minutes": 30, - "requirements_files": "", "test_script": f"python {_get_script_path('test_libhipcxx_hipcc.py')}", "platform": ["linux"], "total_shards": 1, @@ -334,7 +307,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "libhipcxx_hiprtc", "fetch_artifact_args": "--libhipcxx --tests", "timeout_minutes": 20, - "requirements_files": "", "test_script": f"python {_get_script_path('test_libhipcxx_hiprtc.py')}", "platform": ["linux"], "total_shards": 1, @@ -344,7 +316,6 @@ def _get_script_path(script_name: str) -> str: "job_name": "aqlprofile", "fetch_artifact_args": "--aqlprofile --tests", "timeout_minutes": 5, - "requirements_files": "", "test_script": f"python {_get_script_path('test_aqlprofile.py')}", "platform": ["linux"], "total_shards": 1, diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 822b5b01ec2..1f855d2afcc 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -13,7 +13,7 @@ THEROCK_BIN_PATH = Path(THEROCK_BIN_DIR).resolve() THEROCK_PATH = THEROCK_BIN_PATH.parent THEROCK_LIB_PATH = str(THEROCK_PATH / "lib") -ROCPROFILER_COMPUTE_DIRECTORY = f"{THEROCK_PATH}/libexec/rocprofiler-compute" +ROCPROFILER_COMPUTE_DIRECTORY = f"{THEROCK_PATH}" / "libexec" / "rocprofiler-compute" # Set up ROCM_PATH environ_vars = os.environ.copy() @@ -21,7 +21,7 @@ # Set up PYTHONPATH old_pythonpath = os.getenv("PYTHONPATH", "") -module_dir = f"{ROCPROFILER_COMPUTE_DIRECTORY}/tests" +module_dir = f"{ROCPROFILER_COMPUTE_DIRECTORY}" / "tests" if old_pythonpath: environ_vars["PYTHONPATH"] = f"{module_dir}:{old_pythonpath}" else: @@ -47,7 +47,7 @@ # Set up excluded tests (include Jiras) # AIPROFSDK-36: rocr issue causing test to fail -BASE_EXCLUDED_TESTS = [ +EXCLUDED_TESTS = [ "test_profile_pc_sampling", ] @@ -67,30 +67,6 @@ "test_metric_validation", "test_profile_iteration_multiplexing_1", ] -SMOKE_EXCLUDED_TESTS = [ - "test_profile_iteration_multiplexing_stochastic", - "test_profile_iteration_multiplexing_2", - "test_profile_live_attach_detach", - "test_profile_sets_func", - "test_profile_pc_sampling", - "test_profile_section", - "test_profile_roofline_2", - "test_profile_roofline_1", - "test_profile_path", - "test_profile_misc", - "test_profile_sort", - "test_profile_join", - "test_profile_mem", - "test_profile_dispatch", - "test_profile_kernel_execution", -] - -# If smoke tests are enabled, we run smoke tests only. -# Otherwise, we run the normal test suite -test_type = os.getenv("TEST_TYPE", "full") -excluded_tests = BASE_EXCLUDED_TESTS -if test_type == "smoke": - excluded_tests = excluded_tests + SMOKE_EXCLUDED_TESTS # Run tests cmd = [ @@ -99,11 +75,18 @@ f"{ROCPROFILER_COMPUTE_DIRECTORY}", "--output-on-failure", "--verbose", - "-E", - f"{"|".join(excluded_tests)}", + "--exclude-regex", + f"{"|".join(EXCLUDED_TESTS)}", "--tests-information", f"{shard_index},,{total_shards}", ] + +# If smoke tests are enabled, we run smoke tests only. +# Otherwise, we run the normal test suite +test_type = os.getenv("TEST_TYPE", "full") +if test_type == "smoke": + cmd.append("--tests-regex", "|".join(SMOKE_TESTS)) + logging.info(f"++ Exec [{THEROCK_PATH}]$ {shlex.join(cmd)}") subprocess.run( cmd, From aeb0a5adcdd8b39a57aebffdd4e70938884a5f44 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Thu, 19 Feb 2026 17:41:28 -0500 Subject: [PATCH 53/68] Fix issue with paths in test_rocprofiler_compute.py --- .../test_executable_scripts/test_rocprofiler_compute.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 1f855d2afcc..c21db6d33db 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -13,7 +13,7 @@ THEROCK_BIN_PATH = Path(THEROCK_BIN_DIR).resolve() THEROCK_PATH = THEROCK_BIN_PATH.parent THEROCK_LIB_PATH = str(THEROCK_PATH / "lib") -ROCPROFILER_COMPUTE_DIRECTORY = f"{THEROCK_PATH}" / "libexec" / "rocprofiler-compute" +ROCPROFILER_COMPUTE_DIRECTORY = THEROCK_PATH / "libexec" / "rocprofiler-compute" # Set up ROCM_PATH environ_vars = os.environ.copy() @@ -21,7 +21,7 @@ # Set up PYTHONPATH old_pythonpath = os.getenv("PYTHONPATH", "") -module_dir = f"{ROCPROFILER_COMPUTE_DIRECTORY}" / "tests" +module_dir = ROCPROFILER_COMPUTE_DIRECTORY / "tests" if old_pythonpath: environ_vars["PYTHONPATH"] = f"{module_dir}:{old_pythonpath}" else: From 94dda5cfd001e514c428a33e64deb0fde902ceb5 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Fri, 20 Feb 2026 09:21:15 -0500 Subject: [PATCH 54/68] Remove duplicate rocprofiler-sdk entries in install_rocm_from_artifacts.py --- build_tools/install_rocm_from_artifacts.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/build_tools/install_rocm_from_artifacts.py b/build_tools/install_rocm_from_artifacts.py index e90b9e9d020..0296beebc27 100644 --- a/build_tools/install_rocm_from_artifacts.py +++ b/build_tools/install_rocm_from_artifacts.py @@ -426,10 +426,6 @@ def retrieve_artifacts_by_run_id(args): argv.append("rocprofiler-sdk_run") if args.rocprofiler_compute: extra_artifacts.append("rocprofiler-compute") - # rocprofiler-compute has a runtime dependency on rocprofiler-sdk - argv.append("rocprofiler-sdk_run") - if args.rocprofiler_sdk: - extra_artifacts.append("rocprofiler-sdk") if args.rocprofiler_systems: extra_artifacts.append("rocprofiler-systems") # Contains executables (rocprof-sys-run, rocprof-sys-instrument, etc.) @@ -753,13 +749,6 @@ def main(argv): action=argparse.BooleanOptionalAction, ) - artifacts_group.add_argument( - "--rocprofiler-sdk", - default=False, - help="Include 'rocprofiler-sdk' artifacts", - action=argparse.BooleanOptionalAction, - ) - artifacts_group.add_argument( "--rocwmma", default=False, From a01730fda65ee616c752abfe4eca4e53d4b5ff7f Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Fri, 20 Feb 2026 14:15:10 -0500 Subject: [PATCH 55/68] Fix cmd.append() command --- .../test_executable_scripts/test_rocprofiler_compute.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index c21db6d33db..db4982141bb 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -85,7 +85,8 @@ # Otherwise, we run the normal test suite test_type = os.getenv("TEST_TYPE", "full") if test_type == "smoke": - cmd.append("--tests-regex", "|".join(SMOKE_TESTS)) + cmd.append("--tests-regex") + cmd.append("|".join(SMOKE_TESTS)) logging.info(f"++ Exec [{THEROCK_PATH}]$ {shlex.join(cmd)}") subprocess.run( From b5e0c8834726be0690ada4646375264eea3f9246 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Mon, 23 Feb 2026 11:45:58 -0500 Subject: [PATCH 56/68] Remove DEFAULT_GPU_TARGETS from compute to debug build error --- profiler/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index 3b9c23b20c9..0d79f8e2565 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -121,8 +121,6 @@ endif(THEROCK_BUILD_TESTING) EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/rocprofiler-compute" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/rocprofiler-compute" BACKGROUND_BUILD - DEFAULT_GPU_TARGETS - gfx942 # TODO: Fix rocprofiler-compute to accept an empty target list. CMAKE_ARGS -DHIP_PLATFORM=amd -DENABLE_TESTS=ON From a9bf3074098fe870c241d7f11e0fc5bdd83c5ce8 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Mon, 23 Feb 2026 14:19:24 -0500 Subject: [PATCH 57/68] Add install_requirements.py, updated test_component.yml --- .github/workflows/test_component.yml | 13 +----- build_tools/install_requirements.py | 63 ++++++++++++++++++++++++++++ profiler/CMakeLists.txt | 2 + 3 files changed, 67 insertions(+), 11 deletions(-) create mode 100644 build_tools/install_requirements.py diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index 01112b05327..f9f15010dd0 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -119,17 +119,8 @@ jobs: - name: Setup Requirements run: | - # Sets up IFS (Internal Field Separator) to read comma separated REQUIREMENTS_FILES and output filenames to an array - REQUIREMENTS_FILES=${{ fromJSON(inputs.component).requirements_files }} - DELIMITER="," - IFS="$DELIMITER" read -r -a array <<< "$REQUIREMENTS_FILES" - - python -m ensurepip --upgrade - - for file in "${array[@]}"; do - echo "Installing Requirements File: $file" - python -m pip install -r ${{ env.OUTPUT_ARTIFACTS_DIR }}/$file - done + python ./build_tools/install_requirements.py \ + --requirements_files=${{ fromJSON(inputs.component).requirements_files }} - name: Test timeout-minutes: ${{ fromJSON(inputs.component).timeout_minutes }} diff --git a/build_tools/install_requirements.py b/build_tools/install_requirements.py new file mode 100644 index 00000000000..6532a98f754 --- /dev/null +++ b/build_tools/install_requirements.py @@ -0,0 +1,63 @@ +import argparse +import logging +import os +import shlex +import subprocess +from pathlib import Path +import sys + +SCRIPT_DIR = Path(__file__).resolve().parent +THEROCK_DIR = SCRIPT_DIR.parent +THEROCK_OUTPUT_DIR = str(THEROCK_DIR / "build") + + +def setup_pip(): + environ_vars = os.environ.copy() + + setup_cmd = [ + sys.executable, + "-m", + "ensurepip", + "--upgrade", + ] + logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(setup_cmd)}") + subprocess.run(setup_cmd, cwd=THEROCK_DIR, check=True, env=environ_vars) + + +def install_requirements(input: str): + environ_vars = os.environ.copy() + + requirements_files = input.split(",") + + for file in requirements_files: + cmd = [ + sys.executable, + "-m", + "pip", + "install", + "-r", + f"{THEROCK_OUTPUT_DIR}/{file}", + ] + logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") + subprocess.run(cmd, cwd=THEROCK_DIR, check=True, env=environ_vars) + + +def main(argv): + parser = argparse.ArgumentParser() + parser.add_argument( + "--requirements-files", + type=str, + default="", + help="A comma separated list of requirements.txt files to install", + ) + args = parser.parse_args(argv) + if not args.requirements_files: + logging.info("No requirements files found. Exiting install_requirements.py...") + sys.exit(1) + + setup_pip() + install_requirements(str(args.requirements_files)) + + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index 0d79f8e2565..98b0eb04b4e 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -121,6 +121,8 @@ endif(THEROCK_BUILD_TESTING) EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/rocprofiler-compute" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/rocprofiler-compute" BACKGROUND_BUILD + DEFAULT_GPU_TARGETS + gfx942 CMAKE_ARGS -DHIP_PLATFORM=amd -DENABLE_TESTS=ON From a70b7ce76ef4064ea6c2b92e815ee87d62ec019d Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Mon, 23 Feb 2026 16:34:59 -0500 Subject: [PATCH 58/68] Fix typo in test_component.yml --- .github/workflows/test_component.yml | 2 +- build_tools/install_requirements.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index f9f15010dd0..af2927144a0 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -120,7 +120,7 @@ jobs: - name: Setup Requirements run: | python ./build_tools/install_requirements.py \ - --requirements_files=${{ fromJSON(inputs.component).requirements_files }} + --requirements-files=${{ fromJSON(inputs.component).requirements_files }} - name: Test timeout-minutes: ${{ fromJSON(inputs.component).timeout_minutes }} diff --git a/build_tools/install_requirements.py b/build_tools/install_requirements.py index 6532a98f754..38bbc386cb4 100644 --- a/build_tools/install_requirements.py +++ b/build_tools/install_requirements.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import argparse import logging import os @@ -52,7 +54,9 @@ def main(argv): ) args = parser.parse_args(argv) if not args.requirements_files: - logging.info("No requirements files found. Exiting install_requirements.py...") + logging.info( + "No requirements file(s) found. Exiting install_requirements.py..." + ) sys.exit(1) setup_pip() From 93da34464e2653fc2903916f2ecf1460f5e816d3 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Mon, 23 Feb 2026 16:44:51 -0500 Subject: [PATCH 59/68] Update exit code for no input in install_requirements.py --- build_tools/install_requirements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/install_requirements.py b/build_tools/install_requirements.py index 38bbc386cb4..e4fddd01d69 100644 --- a/build_tools/install_requirements.py +++ b/build_tools/install_requirements.py @@ -57,7 +57,7 @@ def main(argv): logging.info( "No requirements file(s) found. Exiting install_requirements.py..." ) - sys.exit(1) + sys.exit(0) setup_pip() install_requirements(str(args.requirements_files)) From 35c6726c26231e5ea0019582c5231f9f65fbfa73 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Tue, 24 Feb 2026 12:16:07 -0500 Subject: [PATCH 60/68] Remove PYTHONPATH env vars from test_rocprofiler_compute.py --- .../test_executable_scripts/test_rocprofiler_compute.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index db4982141bb..39a10557419 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -19,14 +19,6 @@ environ_vars = os.environ.copy() environ_vars["ROCM_PATH"] = str(THEROCK_PATH) -# Set up PYTHONPATH -old_pythonpath = os.getenv("PYTHONPATH", "") -module_dir = ROCPROFILER_COMPUTE_DIRECTORY / "tests" -if old_pythonpath: - environ_vars["PYTHONPATH"] = f"{module_dir}:{old_pythonpath}" -else: - environ_vars["PYTHONPATH"] = module_dir - # Set up PATH old_path = os.getenv("PATH", "") rocm_bin = str(THEROCK_BIN_PATH) From 4c946a9349f41939763945703acbc2b008019f60 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 25 Feb 2026 15:00:22 -0500 Subject: [PATCH 61/68] Rename install_requirements.py, changed additional_requirements_files to array, add build test flag --- .github/workflows/test_component.yml | 7 ++++--- build_tools/github_actions/fetch_test_configurations.py | 5 ++++- ..._requirements.py => install_additional_requirements.py} | 0 profiler/CMakeLists.txt | 6 +++--- 4 files changed, 11 insertions(+), 7 deletions(-) rename build_tools/{install_requirements.py => install_additional_requirements.py} (100%) diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index 0f96bfa8b67..4a88436a6ce 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -128,10 +128,11 @@ jobs: run: | python ./build_tools/print_driver_gpu_info.py - - name: Setup Requirements + - name: Setup Additional Requirements + if: ${{ fromJSON(inputs.component).additional_requirements_files != '' }} run: | - python ./build_tools/install_requirements.py \ - --requirements-files=${{ fromJSON(inputs.component).requirements_files }} + python ./build_tools/install_additional_requirements.py \ + --requirements-files=${{ fromJSON(inputs.component).additional_requirements_files }} - name: Test timeout-minutes: ${{ fromJSON(inputs.component).timeout_minutes }} diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index 4e2e425bfee..7d4157cc70b 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -306,7 +306,10 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocprofiler_compute", "fetch_artifact_args": "--rocprofiler-compute --rocprofiler-sdk --tests", "timeout_minutes": 60, - "requirements_files": "libexec/rocprofiler-compute/requirements.txt,libexec/rocprofiler-compute/requirements-test.txt", + "requirements_files": [ + "libexec/rocprofiler-compute/requirements.txt", + "libexec/rocprofiler-compute/requirements-test.txt", + ], "test_script": f"python {_get_script_path('test_rocprofiler_compute.py')} -v", "platform": ["linux"], "total_shards": 2, diff --git a/build_tools/install_requirements.py b/build_tools/install_additional_requirements.py similarity index 100% rename from build_tools/install_requirements.py rename to build_tools/install_additional_requirements.py diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index 98b0eb04b4e..7c86f99b1dc 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -125,9 +125,9 @@ endif(THEROCK_BUILD_TESTING) gfx942 CMAKE_ARGS -DHIP_PLATFORM=amd - -DENABLE_TESTS=ON - -DINSTALL_TESTS=ON - -DTEST_FROM_INSTALL=ON + -DBUILD_TEST=${THEROCK_BUILD_TESTING} + -DINSTALL_TESTS=${THEROCK_BUILD_TESTING} + -DTEST_FROM_INSTALL=${THEROCK_BUILD_TESTING} -DCHECK_PYTHON_DEPS=OFF CMAKE_INCLUDES therock_explicit_finders.cmake From f1330f0318603a5ec27586c2171f0d7254ae132c Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 25 Feb 2026 15:06:38 -0500 Subject: [PATCH 62/68] Rename requirements_files in fetch_test_configurations.py --- build_tools/github_actions/fetch_test_configurations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index 7d4157cc70b..d57418f1cc0 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -306,7 +306,7 @@ def _get_script_path(script_name: str) -> str: "job_name": "rocprofiler_compute", "fetch_artifact_args": "--rocprofiler-compute --rocprofiler-sdk --tests", "timeout_minutes": 60, - "requirements_files": [ + "additional_requirements_files": [ "libexec/rocprofiler-compute/requirements.txt", "libexec/rocprofiler-compute/requirements-test.txt", ], From 3f50e599f5d9553f21867ad2f14abe3686d8456c Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 25 Feb 2026 16:05:27 -0500 Subject: [PATCH 63/68] Change to uv pip install in install_additional_requirements.py --- build_tools/install_additional_requirements.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build_tools/install_additional_requirements.py b/build_tools/install_additional_requirements.py index e4fddd01d69..3010efe258e 100644 --- a/build_tools/install_additional_requirements.py +++ b/build_tools/install_additional_requirements.py @@ -33,8 +33,7 @@ def install_requirements(input: str): for file in requirements_files: cmd = [ - sys.executable, - "-m", + "uv", "pip", "install", "-r", @@ -55,7 +54,7 @@ def main(argv): args = parser.parse_args(argv) if not args.requirements_files: logging.info( - "No requirements file(s) found. Exiting install_requirements.py..." + "No requirements file(s) provided. Exiting install_additional_requirements.py..." ) sys.exit(0) From 4603da7a0b165e1eab1a1560f18cde9d88146921 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 25 Feb 2026 16:16:50 -0500 Subject: [PATCH 64/68] Change array to comma separated list in test_component.yml --- .github/workflows/test_component.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_component.yml b/.github/workflows/test_component.yml index 4a88436a6ce..3785e0ff2b3 100644 --- a/.github/workflows/test_component.yml +++ b/.github/workflows/test_component.yml @@ -132,7 +132,7 @@ jobs: if: ${{ fromJSON(inputs.component).additional_requirements_files != '' }} run: | python ./build_tools/install_additional_requirements.py \ - --requirements-files=${{ fromJSON(inputs.component).additional_requirements_files }} + --requirements-files=${{ join(fromJSON(inputs.component).additional_requirements_files, ',') }} - name: Test timeout-minutes: ${{ fromJSON(inputs.component).timeout_minutes }} From 9dac2f6158ac946ae098aa9830639daf8063a867 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Wed, 25 Feb 2026 16:30:15 -0500 Subject: [PATCH 65/68] Remove setup_pip() function from install_additional_requirements.py --- build_tools/install_additional_requirements.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/build_tools/install_additional_requirements.py b/build_tools/install_additional_requirements.py index 3010efe258e..1f4385e2247 100644 --- a/build_tools/install_additional_requirements.py +++ b/build_tools/install_additional_requirements.py @@ -13,19 +13,6 @@ THEROCK_OUTPUT_DIR = str(THEROCK_DIR / "build") -def setup_pip(): - environ_vars = os.environ.copy() - - setup_cmd = [ - sys.executable, - "-m", - "ensurepip", - "--upgrade", - ] - logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(setup_cmd)}") - subprocess.run(setup_cmd, cwd=THEROCK_DIR, check=True, env=environ_vars) - - def install_requirements(input: str): environ_vars = os.environ.copy() @@ -58,7 +45,6 @@ def main(argv): ) sys.exit(0) - setup_pip() install_requirements(str(args.requirements_files)) From 0864ffe46ee1a409a6104bbf1919fd926e11ebce Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Thu, 26 Feb 2026 09:26:47 -0500 Subject: [PATCH 66/68] Change CMake args to debug build errors --- profiler/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index e8255404144..283a8520421 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -127,8 +127,8 @@ endif(THEROCK_BUILD_TESTING) CMAKE_ARGS -DHIP_PLATFORM=amd -DBUILD_TEST=${THEROCK_BUILD_TESTING} - -DINSTALL_TESTS=${THEROCK_BUILD_TESTING} - -DTEST_FROM_INSTALL=${THEROCK_BUILD_TESTING} + -DINSTALL_TESTS=ON + -DTEST_FROM_INSTALL=ON -DCHECK_PYTHON_DEPS=OFF CMAKE_INCLUDES therock_explicit_finders.cmake From 6aa966d9300b0e721eee30e7255709a411bc75b1 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Thu, 26 Feb 2026 10:36:55 -0500 Subject: [PATCH 67/68] Update BUILD_TEST value --- profiler/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index 283a8520421..aebf2aca140 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -126,7 +126,7 @@ endif(THEROCK_BUILD_TESTING) gfx942 CMAKE_ARGS -DHIP_PLATFORM=amd - -DBUILD_TEST=${THEROCK_BUILD_TESTING} + -DBUILD_TEST=ON -DINSTALL_TESTS=ON -DTEST_FROM_INSTALL=ON -DCHECK_PYTHON_DEPS=OFF From 94c0d530a332008c6293e04033d3bf994fc0ee93 Mon Sep 17 00:00:00 2001 From: jbonnell-amd Date: Thu, 26 Feb 2026 12:25:07 -0500 Subject: [PATCH 68/68] Update CMake args in CMakeLists.txt for rocprofiler-compute --- profiler/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index aebf2aca140..49536160404 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -126,9 +126,9 @@ endif(THEROCK_BUILD_TESTING) gfx942 CMAKE_ARGS -DHIP_PLATFORM=amd - -DBUILD_TEST=ON - -DINSTALL_TESTS=ON - -DTEST_FROM_INSTALL=ON + -DENABLE_TESTS=${THEROCK_BUILD_TESTING} + -DINSTALL_TESTS=${THEROCK_BUILD_TESTING} + -DTEST_FROM_INSTALL=${THEROCK_BUILD_TESTING} -DCHECK_PYTHON_DEPS=OFF CMAKE_INCLUDES therock_explicit_finders.cmake