From ed4be6ec05f512c6f080165829deb663de64c126 Mon Sep 17 00:00:00 2001 From: Brock Hargreaves Date: Wed, 11 Feb 2026 17:52:21 +0000 Subject: [PATCH 01/16] Add CK (independent of miopen) full build and test to TheRock. --- BUILD_TOPOLOGY.toml | 2 +- .../fetch_test_configurations.py | 8 +++++++ .../test_composablekernel.py | 24 +++++++++++++++++++ build_tools/install_rocm_from_artifacts.py | 11 +++++++++ ml-libs/CMakeLists.txt | 9 +++++-- ml-libs/artifact-composable-kernel.toml | 4 ++++ 6 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 build_tools/github_actions/test_executable_scripts/test_composablekernel.py diff --git a/BUILD_TOPOLOGY.toml b/BUILD_TOPOLOGY.toml index b38c7e536b..1971aa82c7 100644 --- a/BUILD_TOPOLOGY.toml +++ b/BUILD_TOPOLOGY.toml @@ -528,7 +528,7 @@ artifact_deps = [] [artifacts.composable-kernel] artifact_group = "ml-libs" type = "target-specific" -artifact_deps = ["core-runtime", "core-hip"] +artifact_deps = ["core-runtime", "core-hip", "rand", "rocprofiler-sdk"] [artifacts.miopen] artifact_group = "ml-libs" diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index 85b79b5936..ef253803bf 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -255,6 +255,14 @@ def _get_script_path(script_name: str) -> str: "platform": ["linux", "windows"], "total_shards": 1, }, + "composablekernel": { + "job_name": "composablekernel", + "fetch_artifact_args": "--composablekernel --tests", + "timeout_minutes": 60, + "test_script": f"python {_get_script_path('test_composablekernel.py')}", + "platform": ["linux, windows"], + "total_shards": 4, + } # TODO(iree-org/fusilli/issues/57): Enable fusilli tests once build is # enabled by default. # "fusilli_plugin": { diff --git a/build_tools/github_actions/test_executable_scripts/test_composablekernel.py b/build_tools/github_actions/test_executable_scripts/test_composablekernel.py new file mode 100644 index 0000000000..788625d8a9 --- /dev/null +++ b/build_tools/github_actions/test_executable_scripts/test_composablekernel.py @@ -0,0 +1,24 @@ +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 +AMDGPU_FAMILIES = os.getenv("AMDGPU_FAMILIES") + +logging.basicConfig(level=logging.INFO) + +cmd = [ + "test_ck_tile_pooling", +] + +logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") + +subprocess.run( + cmd, + cwd=THEROCK_DIR, + check=True, +) diff --git a/build_tools/install_rocm_from_artifacts.py b/build_tools/install_rocm_from_artifacts.py index 82774e71b5..dd7b4f23ef 100644 --- a/build_tools/install_rocm_from_artifacts.py +++ b/build_tools/install_rocm_from_artifacts.py @@ -24,6 +24,7 @@ [--hipdnn-samples | --no-hipdnn-samples] [--miopen | --no-miopen] [--miopen-plugin | --no-miopen-plugin] + [--composablekernel] [--fusilli-plugin | --no-fusilli-plugin] [--hipblaslt-plugin | --no-hipblaslt-plugin] [--prim | --no-prim] @@ -336,6 +337,7 @@ def retrieve_artifacts_by_run_id(args): args.hipdnn_samples, args.miopen, args.miopen_plugin, + args.composablekernel, args.fusilli_plugin, args.hipblaslt_plugin, args.prim, @@ -386,6 +388,8 @@ def retrieve_artifacts_by_run_id(args): argv.append("rand_dev") if args.miopen_plugin: extra_artifacts.append("miopen-plugin") + if args.composablekernel: + extra_artifacts.append("composablekernel") if args.fusilli_plugin: extra_artifacts.append("fusilli-plugin") if args.hipblaslt_plugin: @@ -649,6 +653,13 @@ def main(argv): action=argparse.BooleanOptionalAction, ) + artifacts_group.add_argument( + "--composablekernel", + default=False, + help="Include 'composablekernel' artifacts", + action=argparse.BooleanOptionalAction, + ) + artifacts_group.add_argument( "--fusilli-plugin", default=False, diff --git a/ml-libs/CMakeLists.txt b/ml-libs/CMakeLists.txt index a1b815f080..61eb2ad400 100644 --- a/ml-libs/CMakeLists.txt +++ b/ml-libs/CMakeLists.txt @@ -25,16 +25,21 @@ if(THEROCK_ENABLE_COMPOSABLE_KERNEL) ############################################################################## # TODO: Move this to math-libs + # In the context of building miopen, do a narrow build of CK. + set(optional_ck_cmake_args) + if(THEROCK_MIOPEN_USE_COMPOSABLE_KERNEL) + list(APPEND optional_ck_cmake_args -DMIOPEN_REQ_LIBS_ONLY=ON) + endif() + therock_cmake_subproject_declare(composable_kernel EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_LIBRARIES_SOURCE_DIR}/projects/composablekernel" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/composable_kernel" - BACKGROUND_BUILD CMAKE_ARGS -DHIP_PLATFORM=amd -DROCM_PATH= -DROCM_DIR= "-DBUILD_TESTING=${THEROCK_BUILD_TESTING}" - -DMIOPEN_REQ_LIBS_ONLY=ON + ${optional_ck_cmake_args} CMAKE_INCLUDES therock_explicit_finders.cmake COMPILER_TOOLCHAIN diff --git a/ml-libs/artifact-composable-kernel.toml b/ml-libs/artifact-composable-kernel.toml index faa101f25b..5517ed2594 100644 --- a/ml-libs/artifact-composable-kernel.toml +++ b/ml-libs/artifact-composable-kernel.toml @@ -6,4 +6,8 @@ include = [ "share/composable_kernel/**", ] +[components.test."ml-libs/composable_kernel/stage"] +include = [ + "bin/test_", +] [components.run."ml-libs/composable_kernel/stage"] From 578643a43b712e847016bdc16f61491c2aad4a2a Mon Sep 17 00:00:00 2001 From: Brock Hargreaves Date: Wed, 11 Feb 2026 18:08:50 +0000 Subject: [PATCH 02/16] Fix typo. --- base/rocm-kpack | 2 +- build_tools/github_actions/fetch_test_configurations.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/rocm-kpack b/base/rocm-kpack index 93eb7be7ec..fe9dd03a73 160000 --- a/base/rocm-kpack +++ b/base/rocm-kpack @@ -1 +1 @@ -Subproject commit 93eb7be7ec16adc30acadd59d623da9c46cec2cf +Subproject commit fe9dd03a738e6810b2876635de093b2dde1ce243 diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index ef253803bf..52fc60304e 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -262,7 +262,7 @@ def _get_script_path(script_name: str) -> str: "test_script": f"python {_get_script_path('test_composablekernel.py')}", "platform": ["linux, windows"], "total_shards": 4, - } + }, # TODO(iree-org/fusilli/issues/57): Enable fusilli tests once build is # enabled by default. # "fusilli_plugin": { From 8c4957b01973ecb78e6d1df7712cbd4f9dca9f15 Mon Sep 17 00:00:00 2001 From: Brock Hargreaves Date: Wed, 11 Feb 2026 18:17:50 +0000 Subject: [PATCH 03/16] Remove space. --- build_tools/install_rocm_from_artifacts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/install_rocm_from_artifacts.py b/build_tools/install_rocm_from_artifacts.py index dd7b4f23ef..9adcc0e6e9 100644 --- a/build_tools/install_rocm_from_artifacts.py +++ b/build_tools/install_rocm_from_artifacts.py @@ -653,7 +653,7 @@ def main(argv): action=argparse.BooleanOptionalAction, ) - artifacts_group.add_argument( + artifacts_group.add_argument( "--composablekernel", default=False, help="Include 'composablekernel' artifacts", From afac75967bcb3efa18be0218fdcd5b31af614116 Mon Sep 17 00:00:00 2001 From: Brock Hargreaves Date: Wed, 11 Feb 2026 17:26:45 -0500 Subject: [PATCH 04/16] Fix typo, collect all tests matching test_*. --- ml-libs/artifact-composable-kernel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml-libs/artifact-composable-kernel.toml b/ml-libs/artifact-composable-kernel.toml index 5517ed2594..061c35d15d 100644 --- a/ml-libs/artifact-composable-kernel.toml +++ b/ml-libs/artifact-composable-kernel.toml @@ -8,6 +8,6 @@ include = [ ] [components.test."ml-libs/composable_kernel/stage"] include = [ - "bin/test_", + "bin/test_*", ] [components.run."ml-libs/composable_kernel/stage"] From 7f66738e5549beb27c43161c2c5588a934a8a283 Mon Sep 17 00:00:00 2001 From: Brock Hargreaves Date: Wed, 11 Feb 2026 15:28:02 -0700 Subject: [PATCH 05/16] Update build_tools/github_actions/fetch_test_configurations.py Fix typo. Co-authored-by: Geo Min --- 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 52fc60304e..15e7e56a51 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -260,7 +260,7 @@ def _get_script_path(script_name: str) -> str: "fetch_artifact_args": "--composablekernel --tests", "timeout_minutes": 60, "test_script": f"python {_get_script_path('test_composablekernel.py')}", - "platform": ["linux, windows"], + "platform": ["linux", "windows"], "total_shards": 4, }, # TODO(iree-org/fusilli/issues/57): Enable fusilli tests once build is From 33783694062c2918b953edc9b15b6b642065d135 Mon Sep 17 00:00:00 2001 From: Brock Hargreaves Date: Wed, 11 Feb 2026 15:29:28 -0700 Subject: [PATCH 06/16] Update build_tools/install_rocm_from_artifacts.py Co-authored-by: Geo Min --- build_tools/install_rocm_from_artifacts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/install_rocm_from_artifacts.py b/build_tools/install_rocm_from_artifacts.py index 9adcc0e6e9..24acb9c061 100644 --- a/build_tools/install_rocm_from_artifacts.py +++ b/build_tools/install_rocm_from_artifacts.py @@ -24,7 +24,7 @@ [--hipdnn-samples | --no-hipdnn-samples] [--miopen | --no-miopen] [--miopen-plugin | --no-miopen-plugin] - [--composablekernel] + [--composablekernel | --no-composablekernel] [--fusilli-plugin | --no-fusilli-plugin] [--hipblaslt-plugin | --no-hipblaslt-plugin] [--prim | --no-prim] From 0107bc3e2bc3839a0ba6aa90010c65bc8009070f Mon Sep 17 00:00:00 2001 From: Brock Hargreaves Date: Wed, 11 Feb 2026 17:36:48 -0500 Subject: [PATCH 07/16] Go down to 1 shard for now. --- 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 15e7e56a51..7c5e007c2d 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -261,7 +261,7 @@ def _get_script_path(script_name: str) -> str: "timeout_minutes": 60, "test_script": f"python {_get_script_path('test_composablekernel.py')}", "platform": ["linux", "windows"], - "total_shards": 4, + "total_shards": 1, }, # TODO(iree-org/fusilli/issues/57): Enable fusilli tests once build is # enabled by default. From 112058cd79e8286e9b351b7cb14396379800eefe Mon Sep 17 00:00:00 2001 From: aalabsi-amd Date: Wed, 11 Feb 2026 11:25:28 -0700 Subject: [PATCH 08/16] Disabled MIOpen long running tests on windows gfx1151 (#3362) ## Motivation MIOpen tests on windows gfx1151 take long time that exceeds the expected time per shard. Some shards took around 50 mins and usually well over 30 mins. Disabling these tests will free up some resources for other projects to run on this limited architecture. ## Technical Details From other runs on PR, I gathered these info on the longest running tests: Test case | Time shard 1 | Time shard 2 | Time shard 3 | Time shard 4 | Total time -- | -- | -- | -- | -- | -- Full/GPU_Softmax_FP32 | 7:50 | 8:12 | 6:53 | 3:12 | ~26 mins Full/GPU_Softmax_BFP16 | 4:00 | 3:59 | 3:27 | 1:32 | ~13 mins Full/GPU_Softmax_FP16 | 3:39 | 3:42 | 2:53 | 1:13 | ~11.5 mins Smoke/GPU_Reduce_FP32 | 2:18 | 0:52 | 0:00 | 3:14 | ~6:24 mins With team feedback, these can be excluded from the rock CI and moved into nightly without increasing the risk. ## Test Plan Monitor the test run time of the shards on windows gfx1151 and compare to previous results. an example run on 4 shards takes: 27m - 36m - 34m - 36m we should see a big decrease in run time. ## Test Result Old run times: 27m - 36m - 34m - 36m New run times: 11m, 17m, 12m, 18m ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. --- .../github_actions/test_executable_scripts/test_miopen.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build_tools/github_actions/test_executable_scripts/test_miopen.py b/build_tools/github_actions/test_executable_scripts/test_miopen.py index f605621e36..9f73f1e1a2 100644 --- a/build_tools/github_actions/test_executable_scripts/test_miopen.py +++ b/build_tools/github_actions/test_executable_scripts/test_miopen.py @@ -220,6 +220,13 @@ "*CPU_UnitTestConvSolverImplicitGemmGroupWrwXdlopsDevApplicability_FP16.ConvHipImplicitGemmGroupWrwXdlops*" ) + # Disable long running tests + negative_filter.append("Full/GPU_Softmax_FP32*") # 24 min + negative_filter.append("Full/GPU_Softmax_BFP16*") # 13 min + negative_filter.append("Full/GPU_Softmax_FP16*") # 11.5 min + negative_filter.append("Smoke/GPU_Reduce_FP32*") # 6.5 min + negative_filter.append("Smoke/GPU_Reduce_FP16*") # 4.5 min + #################################################### # Creating a smoke test filter From 4c9c79f741a723dc4b51b5faba62dda5a7df0513 Mon Sep 17 00:00:00 2001 From: chiranjeevi-amd Date: Thu, 12 Feb 2026 00:14:48 +0530 Subject: [PATCH 09/16] Fix: Add missing backslash (\) in workflow (#3374) ## Motivation This PR fixes a missing backslash (\\) in the workflow configuration that was causing file upload failures to the S3 bucket. bug introduced here: https://github.com/ROCm/TheRock/pull/2280/changes#r2793460592 ## File changed - `.github/workflows/build_portable_linux_pytorch_wheels.yml` ## Technical Details - Added the missing backslash (\\) in the affected workflow file. ## Test Plan - https://github.com/ROCm/TheRock/actions/runs/21912800899 ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. --- .github/workflows/build_portable_linux_pytorch_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_portable_linux_pytorch_wheels.yml b/.github/workflows/build_portable_linux_pytorch_wheels.yml index 5e627a9460..16adadb302 100644 --- a/.github/workflows/build_portable_linux_pytorch_wheels.yml +++ b/.github/workflows/build_portable_linux_pytorch_wheels.yml @@ -310,7 +310,7 @@ jobs: --include "torch-${TORCH_VERSION}-${CP_VERSION}-linux_x86_64.whl" \ --include "torchaudio-${TORCHAUDIO_VERSION}-${CP_VERSION}-linux_x86_64.whl" \ --include "torchvision-${TORCHVISION_VERSION}-${CP_VERSION}-linux_x86_64.whl" \ - --include "triton-${TRITON_VERSION}-${CP_VERSION}-linux_x86_64.whl" + --include "triton-${TRITON_VERSION}-${CP_VERSION}-linux_x86_64.whl" \ --include "apex-${APEX_VERSION}-${CP_VERSION}-linux_x86_64.whl" - name: (Re-)Generate Python package release index From 6f392dbacd1f06cea274a0412455a6cbf2905ccc Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Wed, 11 Feb 2026 11:21:17 -0800 Subject: [PATCH 10/16] [ci][torch] Build Linux PyTorch wheels as part of ci.yml workflows (#3303) ## Motivation Progress on https://github.com/ROCm/TheRock/issues/3291. This adds a new `build_portable_linux_pytorch_wheels_ci.yml` workflow forked from [`build_portable_linux_pytorch_wheels.yml`](https://github.com/ROCm/TheRock/blob/main/.github/workflows/build_portable_linux_pytorch_wheels.yml). This new workflow is run as part of our CI pipeline and will help catch when changes to ROCm break PyTorch source builds. Future work will expand this to also build other packages, upload the built packages to S3, and run tests. This workflow code would have caught the build break reported at https://github.com/ROCm/TheRock/issues/3042. ## Technical Details > [!NOTE] > See https://github.com/ROCm/TheRock/issues/3291 and https://github.com/ScottTodd/claude-rocm-workspace/blob/main/tasks/active/pytorch-ci.md for other design considerations. I'm starting with a narrow scope here to provide _some_ value without blowing our budget or delaying while we refactor related workflows and infrastructure code (e.g. moving index page generation server-side, generating commit manifests at the _start_ of workflows instead of computing them after the fact and plumbing them through partway through the jobs) Specifics: * Linux only (as a start) * Non-configurable, always runs (as a start) * Included for all GPU architectures where `expect_pytorch_failure` is not set * Python 3.12 (not full matrix) * PyTorch release/2.10 branch (not full matrix) * Only builds 'torch', not 'torchaudio', 'torchvision', 'triton', or other packages * Does not upload packages yet * Does not run tests yet (beyond package sanity checks that `import torch` works on the build machine) The build jobs add about 30 minutes of CI time per GPU architecture, and we are not currently using ccache or sccache (https://github.com/ROCm/TheRock/pull/3171 will change that) ## Test Plan * Tested on a known-broken commit (https://github.com/ROCm/TheRock/commit/4497f661dfc38b81b8b658117dfbe29a62e53e12) * https://github.com/ROCm/TheRock/actions/runs/21768200125/job/62810358116 (failed as expected) * Test on a known-working commit (https://github.com/ROCm/TheRock/commit/a00104732aa736da7b59f2cacbe71f2783d5bbe1) * https://github.com/ROCm/TheRock/actions/runs/21768071862/job/62813030260 (passed as expected) * CI jobs on this PR itself, e.g. https://github.com/ROCm/TheRock/actions/runs/21846117572/job/63050058601?pr=3303 ``` [41](https://github.com/ROCm/TheRock/actions/runs/21846117572/job/63049474316?pr=3303#step:11:78642) Found built wheel: /__w/TheRock/TheRock/external-builds/pytorch/pytorch/dist/torch-2.10.0+devrocm7.12.0.dev0.09ac57fcd4e7258046fff2824dc0614384cb1c85-cp312-cp312-linux_x86_64.whl ++ Copy /__w/TheRock/TheRock/external-builds/pytorch/pytorch/dist/torch-2.10.0+devrocm7.12.0.dev0.09ac57fcd4e7258046fff2824dc0614384cb1c85-cp312-cp312-linux_x86_64.whl -> /home/runner/_work/TheRock/TheRock/output/packages/dist +++ Installing built torch: ++ Exec [/tmp]$ /opt/python/cp312-cp312/bin/python -m pip install /__w/TheRock/TheRock/external-builds/pytorch/pytorch/dist/torch-2.10.0+devrocm7.12.0.dev0.09ac57fcd4e7258046fff2824dc0614384cb1c85-cp312-cp312-linux_x86_64.whl +++ Sanity checking installed torch (unavailable is okay on CPU machines): ++ Capture [/tmp]$ /opt/python/cp312-cp312/bin/python -c 'import torch; print(torch.cuda.is_available())' Sanity check output: False --- Not build pytorch-audio (no --pytorch-audio-dir) --- Not build pytorch-vision (no --pytorch-vision-dir) --- Not build apex (no --apex-dir) --- Builds all completed ``` ``` Valid wheel: torch-2.10.0+devrocm7.12.0.dev0.09ac57fcd4e7258046fff2824dc0614384cb1c85-cp312-cp312-linux_x86_64.whl (222812153 bytes) ``` ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. --------- Co-authored-by: Claude --- .../build_portable_linux_pytorch_wheels.yml | 2 + ...build_portable_linux_pytorch_wheels_ci.yml | 137 ++++++++++++++++++ .../build_windows_pytorch_wheels.yml | 2 + .github/workflows/ci.yml | 1 + .github/workflows/ci_linux.yml | 25 ++++ .github/workflows/ci_nightly.yml | 1 + .github/workflows/ci_windows.yml | 3 + build_tools/github_actions/configure_ci.py | 25 +++- .../github_actions/tests/configure_ci_test.py | 67 +++++++++ 9 files changed, 261 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build_portable_linux_pytorch_wheels_ci.yml diff --git a/.github/workflows/build_portable_linux_pytorch_wheels.yml b/.github/workflows/build_portable_linux_pytorch_wheels.yml index 16adadb302..6041901b08 100644 --- a/.github/workflows/build_portable_linux_pytorch_wheels.yml +++ b/.github/workflows/build_portable_linux_pytorch_wheels.yml @@ -178,6 +178,8 @@ jobs: - name: Create pip cache directory run: mkdir -p /tmp/pipcache + # Note: determine_version.py sets optional_build_prod_arguments in + # GITHUB_ENV, which includes --rocm-sdk-version and --version-suffix. - name: Determine optional arguments passed to `build_prod_wheels.py` if: ${{ inputs.rocm_version }} run: | diff --git a/.github/workflows/build_portable_linux_pytorch_wheels_ci.yml b/.github/workflows/build_portable_linux_pytorch_wheels_ci.yml new file mode 100644 index 0000000000..e1b83d7810 --- /dev/null +++ b/.github/workflows/build_portable_linux_pytorch_wheels_ci.yml @@ -0,0 +1,137 @@ +# CI variant of build_portable_linux_pytorch_wheels.yml. +# +# Key differences from the release workflow: +# - Installs ROCm packages via --find-links (CI artifacts) instead of +# --index-url (release index) +# - Builds torch only (no torchvision, torchaudio, or triton) +# - No S3 upload, staging, testing, or promotion — just build + sanity check +# - (Not yet implemented) this can use an explict separate sccache bucket +# +# TODO(#3291): Build more packages (torchvision, torchaudio, triton, etc.) +# TODO(#3291): Upload packages to S3 (via upload_python_packages.py?) +# +# Both workflows share build_prod_wheels.py for the actual build logic. +# See https://github.com/ROCm/TheRock/issues/3291 for convergence plans. + +name: Build Portable Linux PyTorch Wheels (CI) + +on: + workflow_call: + inputs: + artifact_group: + type: string + required: true + python_version: + type: string + default: "3.12" + pytorch_git_ref: + description: PyTorch ref to checkout (typically "release/X.Y") + type: string + default: "release/2.10" + rocm_package_find_links_url: + description: URL for pip --find-links to install ROCm packages + type: string + required: true + rocm_version: + description: ROCm package version to install and build against (e.g. 7.10.0.dev0) + type: string + required: true + workflow_dispatch: + inputs: + artifact_group: + description: "The artifact group to build (e.g. gfx94X-dcgpu, gfx120X-all)" + type: string + default: gfx94X-dcgpu + python_version: + type: string + default: "3.12" + pytorch_git_ref: + description: PyTorch ref to checkout (typically "release/X.Y") + type: string + default: "release/2.10" + rocm_package_find_links_url: + description: URL for pip --find-links to install ROCm packages + type: string + required: true + rocm_version: + description: ROCm package version to install and build against (e.g. 7.10.0.dev0) + type: string + required: true + +permissions: + contents: read + +run-name: Build portable Linux PyTorch Wheels CI (${{ inputs.artifact_group }}, py${{ inputs.python_version }}, ${{ inputs.pytorch_git_ref }}) + +jobs: + build_pytorch_wheels: + name: Build PyTorch | ${{ inputs.artifact_group }} | torch ${{ inputs.pytorch_git_ref }} | py${{ inputs.python_version }} + runs-on: ${{ github.repository_owner == 'ROCm' && 'azure-linux-scale-rocm' || 'ubuntu-24.04' }} + container: + image: ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:db2b63f938941dde2abc80b734e64b45b9995a282896d513a0f3525d4591d6cb + env: + PACKAGE_DIST_DIR: ${{ github.workspace }}/output/packages/dist + optional_build_prod_arguments: "" + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Configure Git Identity + run: | + git config --global user.name "therockbot" + git config --global user.email "therockbot@amd.com" + + - name: Select Python version + run: | + python build_tools/github_actions/python_to_cp_version.py \ + --python-version ${{ inputs.python_version }} + + - name: Add selected Python version to PATH + run: | + python_dir="/opt/python/${{ env.cp_version }}" + if ! [ -x "${python_dir}/bin/python" ]; then + echo "ERROR: Could not find python: ${python_dir}" + exit 1 + fi + echo "${python_dir}/bin" >> "$GITHUB_PATH" + + - name: Checkout PyTorch source (nightly) + if: ${{ inputs.pytorch_git_ref == 'nightly' }} + run: | + ./external-builds/pytorch/pytorch_torch_repo.py checkout \ + --repo-hashtag nightly + + - name: Checkout PyTorch source (stable) + if: ${{ inputs.pytorch_git_ref != 'nightly' }} + run: | + ./external-builds/pytorch/pytorch_torch_repo.py checkout \ + --gitrepo-origin https://github.com/ROCm/pytorch.git \ + --repo-hashtag ${{ inputs.pytorch_git_ref }} + + - name: Create pip cache directory + run: mkdir -p /tmp/pipcache + + # Note: determine_version.py sets optional_build_prod_arguments in + # GITHUB_ENV, which includes --rocm-sdk-version and --version-suffix. + - name: Determine optional arguments passed to `build_prod_wheels.py` + if: ${{ inputs.rocm_version }} + run: | + pip install packaging + python build_tools/github_actions/determine_version.py \ + --rocm-version ${{ inputs.rocm_version }} + + - name: Build PyTorch wheels + run: | + ./external-builds/pytorch/build_prod_wheels.py \ + build \ + --install-rocm \ + --find-links "${{ inputs.rocm_package_find_links_url }}" \ + --pip-cache-dir /tmp/pipcache \ + --clean \ + --output-dir ${{ env.PACKAGE_DIST_DIR }} \ + ${{ env.optional_build_prod_arguments }} + + - name: Sanity check wheel + run: | + python external-builds/pytorch/sanity_check_wheel.py \ + ${{ env.PACKAGE_DIST_DIR }}/ diff --git a/.github/workflows/build_windows_pytorch_wheels.yml b/.github/workflows/build_windows_pytorch_wheels.yml index 6c9db1be7d..965a534d8a 100644 --- a/.github/workflows/build_windows_pytorch_wheels.yml +++ b/.github/workflows/build_windows_pytorch_wheels.yml @@ -195,6 +195,8 @@ jobs: --torch-dir ${{ env.CHECKOUT_ROOT }}/torch \ --require-related-commit + # Note: determine_version.py sets optional_build_prod_arguments in + # GITHUB_ENV, which includes --rocm-sdk-version and --version-suffix. - name: Determine optional arguments passed to `build_prod_wheels.py` if: ${{ inputs.rocm_version }} run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6238ab0fd..af8ce5c705 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,6 +102,7 @@ jobs: rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }} test_type: ${{ needs.setup.outputs.test_type }} sanity_check_only_for_family: ${{ matrix.variant.sanity_check_only_for_family == true }} + build_pytorch: ${{ matrix.variant.build_pytorch == true }} permissions: contents: read id-token: write diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 8940861787..d3da978ad6 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -32,6 +32,9 @@ on: type: string sanity_check_only_for_family: type: boolean + build_pytorch: + type: boolean + default: false permissions: contents: read @@ -164,3 +167,25 @@ jobs: package_find_links_url: ${{ needs.build_portable_linux_python_packages.outputs.package_find_links_url }} python_version: "3.12" rocm_version: ${{ inputs.rocm_package_version }} + + # TODO(#3291): Add test_pytorch_wheels job + build_portable_linux_pytorch_wheels_ci: + needs: [build_portable_linux_python_packages] + name: Build PyTorch + if: >- + ${{ + !failure() && + !cancelled() && + ( + inputs.use_prebuilt_artifacts == 'false' || + inputs.use_prebuilt_artifacts == 'true' + ) && + inputs.build_pytorch == true + }} + uses: ./.github/workflows/build_portable_linux_pytorch_wheels_ci.yml + with: + artifact_group: ${{ inputs.artifact_group }} + python_version: "3.12" + pytorch_git_ref: "release/2.10" + rocm_package_find_links_url: ${{ needs.build_portable_linux_python_packages.outputs.package_find_links_url }} + rocm_version: ${{ inputs.rocm_package_version }} diff --git a/.github/workflows/ci_nightly.yml b/.github/workflows/ci_nightly.yml index fcd9af7d46..4f6b402c1b 100644 --- a/.github/workflows/ci_nightly.yml +++ b/.github/workflows/ci_nightly.yml @@ -85,6 +85,7 @@ jobs: rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }} test_type: ${{ needs.setup.outputs.test_type }} sanity_check_only_for_family: ${{ matrix.variant.sanity_check_only_for_family == true }} + build_pytorch: ${{ matrix.variant.build_pytorch == true }} permissions: contents: read id-token: write diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 05f7ba1d7d..f58b8d6b70 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -164,3 +164,6 @@ jobs: package_find_links_url: ${{ needs.build_windows_python_packages.outputs.package_find_links_url }} python_version: "3.12" rocm_version: ${{ inputs.rocm_package_version }} + + # TODO(#3291): Add build_windows_pytorch_wheels_ci + # TODO(#3291): Add test_pytorch_wheels job diff --git a/build_tools/github_actions/configure_ci.py b/build_tools/github_actions/configure_ci.py index 175c99538b..0fbac377ca 100755 --- a/build_tools/github_actions/configure_ci.py +++ b/build_tools/github_actions/configure_ci.py @@ -215,6 +215,8 @@ def generate_multi_arch_matrix( # Extract family names for dist_amdgpu_families family_names = [f["amdgpu_family"] for f in family_info_list] + expect_failure = info.get("expect_failure", False) + expect_pytorch_failure = info.get("expect_pytorch_failure", False) matrix_row = { "matrix_per_family_json": json.dumps(family_info_list), "dist_amdgpu_families": ";".join(family_names), @@ -222,7 +224,8 @@ def generate_multi_arch_matrix( "build_variant_label": info["build_variant_label"], "build_variant_suffix": info["build_variant_suffix"], "build_variant_cmake_preset": info["build_variant_cmake_preset"], - "expect_failure": info.get("expect_failure", False), + "expect_failure": expect_failure, + "build_pytorch": not expect_failure and not expect_pytorch_failure, } matrix_output.append(matrix_row) @@ -489,6 +492,15 @@ def matrix_generator( # But if not, honor what is already there. if build_variant_info.get("expect_failure", False): matrix_row["expect_failure"] = True + + # Enable pytorch builds for families without known build failures. + # TODO(#3291): Add finer-grained controls over when pytorch is built + expect_failure = matrix_row.get("expect_failure", False) + expect_pytorch_failure = matrix_row.get("expect_pytorch_failure", False) + matrix_row["build_pytorch"] = ( + not expect_failure and not expect_pytorch_failure + ) + del matrix_row["build_variants"] matrix_row.update(build_variant_info) @@ -644,7 +656,16 @@ def format_variants(variants): result = [] for item in variants: if "family" in item: - result.append(item["family"]) + label = item["family"] + # Also show flags for the family, if any. + flags = [] + if item.get("expect_failure"): + flags.append("expect_failure") + if item.get("build_pytorch"): + flags.append("build_pytorch") + if flags: + label += f" ({', '.join(flags)})" + result.append(label) elif "matrix_per_family_json" in item: # Multi-arch mode: show the families from the JSON families = json.loads(item["matrix_per_family_json"]) diff --git a/build_tools/github_actions/tests/configure_ci_test.py b/build_tools/github_actions/tests/configure_ci_test.py index d7ed0e6d2a..31cf0e34fc 100644 --- a/build_tools/github_actions/tests/configure_ci_test.py +++ b/build_tools/github_actions/tests/configure_ci_test.py @@ -355,6 +355,73 @@ def test_windows_schedule_matrix_generator(self): ) self.assertEqual(windows_test_labels, []) + def test_build_pytorch_disabled_when_expect_failure(self): + """build_pytorch should be False when expect_failure is True.""" + # Schedule trigger includes all families, some with expect_failure + linux_target_output, _ = configure_ci.matrix_generator( + is_pull_request=False, + is_workflow_dispatch=False, + is_push=False, + is_schedule=True, + base_args={"build_variant": "release"}, + families={}, + platform="linux", + ) + for entry in linux_target_output: + if entry.get("expect_failure", False): + self.assertFalse( + entry.get("build_pytorch", False), + f"build_pytorch should be False when expect_failure is True " + f"for family {entry.get('family')}", + ) + + def test_build_pytorch_disabled_when_expect_pytorch_failure(self): + """build_pytorch should be False when expect_pytorch_failure is True.""" + # Use schedule trigger on windows to include gfx90x which has + # expect_pytorch_failure on windows + windows_target_output, _ = configure_ci.matrix_generator( + is_pull_request=False, + is_workflow_dispatch=False, + is_push=False, + is_schedule=True, + base_args={"build_variant": "release"}, + families={}, + platform="windows", + ) + for entry in windows_target_output: + if entry.get("expect_pytorch_failure", False): + self.assertFalse( + entry.get("build_pytorch", False), + f"build_pytorch should be False when expect_pytorch_failure " + f"is True for family {entry.get('family')}", + ) + + def test_build_pytorch_enabled_for_supported_families(self): + """build_pytorch should be True for families without known failures.""" + # Presubmit families (gfx94x, gfx110x, etc.) should have build_pytorch + # enabled if they don't have expect_failure or expect_pytorch_failure + linux_target_output, _ = configure_ci.matrix_generator( + is_pull_request=True, + is_workflow_dispatch=False, + is_push=False, + is_schedule=False, + base_args={ + "pr_labels": '{"labels":[]}', + "build_variant": "release", + }, + families={}, + platform="linux", + ) + for entry in linux_target_output: + if not entry.get("expect_failure", False) and not entry.get( + "expect_pytorch_failure", False + ): + self.assertTrue( + entry.get("build_pytorch", False), + f"build_pytorch should be True for supported family " + f"{entry.get('family')}", + ) + def test_determine_long_lived_branch(self): """Test to correctly determine long-lived branch that expect more testing.""" From 2a78149b2ea2e4f59cf3a2394a3f5edf27db1f0b Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Wed, 11 Feb 2026 11:26:02 -0800 Subject: [PATCH 11/16] [torch] Remove /tmp/pipcache from build workflows (#3378) ## Motivation Following up on https://github.com/ROCm/TheRock/pull/3303#discussion_r2793698012. The pip cache is useful for local rebuilds but is not providing much value on CI builds using ephemeral VMs running inside docker containers. ## Technical Details The `pip cache remove rocm` command fails under the manylinux docker container if an alternate cache directory is not provided: ``` Building PyTorch wheels for gfx94X-dcgpu WARNING: The directory '/github/home/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. ERROR: pip cache commands can not function since cache is disabled. Traceback (most recent call last): File "/__w/TheRock/TheRock/./external-builds/pytorch/build_prod_wheels.py", line 1078, in ++ Exec [/__w/TheRock/TheRock]$ /opt/python/cp312-cp312/bin/python -m pip cache remove rocm_sdk main(sys.argv[1:]) File "/__w/TheRock/TheRock/./external-builds/pytorch/build_prod_wheels.py", line 1074, in main args.func(args) File "/__w/TheRock/TheRock/./external-builds/pytorch/build_prod_wheels.py", line 348, in do_build do_install_rocm(args) File "/__w/TheRock/TheRock/./external-builds/pytorch/build_prod_wheels.py", line 302, in do_install_rocm run_command( File "/__w/TheRock/TheRock/./external-builds/pytorch/build_prod_wheels.py", line 175, in run_command subprocess.check_call(args, cwd=str(cwd), env=full_env) File "/opt/python/cp312-cp312/lib/python3.12/subprocess.py", line 413, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/opt/python/cp312-cp312/bin/python', '-m', 'pip', 'cache', 'remove', 'rocm_sdk']' returned non-zero exit status 1. Error: Process completed with exit code 1. ``` Also fixed a small bug from https://github.com/ROCm/TheRock/pull/735 where `--cache-dir` was added twice to the `pip install` command ## Test Plan Test workflow run: https://github.com/ROCm/TheRock/actions/runs/21916360386/job/63284560496 ## Test Result ``` Building PyTorch wheels for gfx94X-dcgpu WARNING: The directory '/github/home/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. ERROR: pip cache commands can not function since cache is disabled. WARNING: The directory '/github/home/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. Looking in indexes: https://rocm.devreleases.amd.com/v2/gfx94X-dcgpu/ Collecting rocm==7.12.0a20260211 (from rocm[devel,libraries]==7.12.0a20260211) Downloading https://rocm.devreleases.amd.com/v2/gfx94X-dcgpu/rocm-7.12.0a20260211.tar.gz (16 kB) ``` (I think stdout/stderr output are not being interleaved fully, so the new warning won't appear until later in the logs?) ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. --------- Co-authored-by: Claude --- .../build_portable_linux_pytorch_wheels.yml | 4 ---- ...build_portable_linux_pytorch_wheels_ci.yml | 4 ---- external-builds/pytorch/build_prod_wheels.py | 24 +++++++++++-------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_portable_linux_pytorch_wheels.yml b/.github/workflows/build_portable_linux_pytorch_wheels.yml index 6041901b08..2547246c18 100644 --- a/.github/workflows/build_portable_linux_pytorch_wheels.yml +++ b/.github/workflows/build_portable_linux_pytorch_wheels.yml @@ -175,9 +175,6 @@ jobs: ./external-builds/pytorch/pytorch_vision_repo.py checkout --require-related-commit ./external-builds/pytorch/pytorch_triton_repo.py checkout - - name: Create pip cache directory - run: mkdir -p /tmp/pipcache - # Note: determine_version.py sets optional_build_prod_arguments in # GITHUB_ENV, which includes --rocm-sdk-version and --version-suffix. - name: Determine optional arguments passed to `build_prod_wheels.py` @@ -194,7 +191,6 @@ jobs: ./external-builds/pytorch/build_prod_wheels.py \ build \ --install-rocm \ - --pip-cache-dir /tmp/pipcache \ --index-url "${{ inputs.cloudfront_url }}/${{ inputs.amdgpu_family }}/" \ --clean \ --output-dir ${{ env.PACKAGE_DIST_DIR }} ${{ env.optional_build_prod_arguments }} diff --git a/.github/workflows/build_portable_linux_pytorch_wheels_ci.yml b/.github/workflows/build_portable_linux_pytorch_wheels_ci.yml index e1b83d7810..f5d9430a8c 100644 --- a/.github/workflows/build_portable_linux_pytorch_wheels_ci.yml +++ b/.github/workflows/build_portable_linux_pytorch_wheels_ci.yml @@ -108,9 +108,6 @@ jobs: --gitrepo-origin https://github.com/ROCm/pytorch.git \ --repo-hashtag ${{ inputs.pytorch_git_ref }} - - name: Create pip cache directory - run: mkdir -p /tmp/pipcache - # Note: determine_version.py sets optional_build_prod_arguments in # GITHUB_ENV, which includes --rocm-sdk-version and --version-suffix. - name: Determine optional arguments passed to `build_prod_wheels.py` @@ -126,7 +123,6 @@ jobs: build \ --install-rocm \ --find-links "${{ inputs.rocm_package_find_links_url }}" \ - --pip-cache-dir /tmp/pipcache \ --clean \ --output-dir ${{ env.PACKAGE_DIST_DIR }} \ ${{ env.optional_build_prod_arguments }} diff --git a/external-builds/pytorch/build_prod_wheels.py b/external-builds/pytorch/build_prod_wheels.py index 61c89b0e6c..d8fc648113 100755 --- a/external-builds/pytorch/build_prod_wheels.py +++ b/external-builds/pytorch/build_prod_wheels.py @@ -292,17 +292,22 @@ def directory_if_exists(dir: Path) -> Path | None: def do_install_rocm(args: argparse.Namespace): - # Optional cache dir arguments - cache_dir_args = ( - ["--cache-dir", str(args.pip_cache_dir)] if args.pip_cache_dir else [] - ) - # Because the rocm package caches current GPU selection and such, we # always purge it to ensure a clean rebuild. - run_command( - [sys.executable, "-m", "pip", "cache", "remove", "rocm"] + cache_dir_args, - cwd=Path.cwd(), + # + # This can fail in environments where the pip cache is disabled or + # unwritable (e.g. manylinux containers), which is fine — if there's no + # cache, there's nothing stale to purge. + cache_dir_args = ( + ["--cache-dir", str(args.pip_cache_dir)] if args.pip_cache_dir else [] ) + try: + run_command( + [sys.executable, "-m", "pip", "cache", "remove", "rocm"] + cache_dir_args, + cwd=Path.cwd(), + ) + except subprocess.CalledProcessError: + print("Warning: pip cache remove failed (cache may be disabled), continuing") # Do the main pip install. pip_args = [ @@ -319,8 +324,7 @@ def do_install_rocm(args: argparse.Namespace): if args.find_links: pip_args.extend(["--find-links", args.find_links]) if args.pip_cache_dir: - pip_args.extend(["--cache-dir", args.pip_cache_dir]) - pip_args += cache_dir_args + pip_args.extend(["--cache-dir", str(args.pip_cache_dir)]) rocm_sdk_version = args.rocm_sdk_version if args.rocm_sdk_version else "" pip_args.extend([f"rocm[libraries,devel]{rocm_sdk_version}"]) run_command(pip_args, cwd=Path.cwd()) From 4939ee4f2ae6699b829041516a9ec57400fb14b0 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Wed, 11 Feb 2026 11:28:59 -0800 Subject: [PATCH 12/16] [CI] Run CI workflows on changes to external-builds/ (#3380) ## Motivation Following up on https://github.com/ROCm/TheRock/pull/3303#discussion_r2794654138. Progress on https://github.com/ROCm/TheRock/issues/3291. Now that we can build pytorch as part of CI workflows, changes to at least a few files under [`external-builds/pytorch/`](https://github.com/ROCm/TheRock/tree/main/external-builds/pytorch) should no longer be excluded. ## Technical Details * This broadens the scope to also include [`external-builds/jax/`](https://github.com/ROCm/TheRock/tree/main/external-builds/jax) and [`external-builds/uccl/`](https://github.com/ROCm/TheRock/tree/main/external-builds/uccl). Changes to those directories are infrequent and they should aim to get included in CI workflows too. * The initial CI integration only builds torch, not torchaudio, torchvision, apex, etc. It also does not run tests. We could set finer-grained filters until that's all integrated, but we can at least work around extra job triggers by using the `skip-ci` label (https://github.com/ROCm/TheRock/blob/main/docs/development/ci_behavior_manipulation.md) * Along the lines of the deleted comment, changes to _just_ the pytorch scripts will still build all of ROCm first. For that, I think we could do either: * Optimize our null build (zero source files changed) to be faster * Detect when _only_ pytorch sources are changed and set the `*_use_prebuilt_artifacts` options using some automatic choice of artifacts (https://github.com/ROCm/TheRock/blob/main/build_tools/find_latest_artifacts.py or another baseline) ## Test Plan Existing unit tests. ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. --------- Co-authored-by: Claude --- .../github_actions/configure_ci_path_filters.py | 14 ++------------ .../tests/configure_ci_path_filters_test.py | 7 +------ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/build_tools/github_actions/configure_ci_path_filters.py b/build_tools/github_actions/configure_ci_path_filters.py index 81dbfb81ec..37f01a6280 100644 --- a/build_tools/github_actions/configure_ci_path_filters.py +++ b/build_tools/github_actions/configure_ci_path_filters.py @@ -151,18 +151,6 @@ def is_ci_run_required(paths: Optional[Iterable[str]]) -> bool: ".github/dependabot.yml", "*CODEOWNERS", "*LICENSE", - # Changes to 'external-builds/' (e.g. PyTorch) do not affect "CI" workflows. - # At time of writing, workflows run in this sequence: - # `ci.yml` - # `ci_linux.yml` - # `build_linux_artifacts.yml` - # `test_artifacts.yml` - # `test_component.yml` - # If we add external-builds tests there, we can revisit this, maybe leaning - # on options like LINUX_USE_PREBUILT_ARTIFACTS or sufficient caching to keep - # workflows efficient when only nodes closer to the edges of the build graph - # are changed. - "external-builds/*", # Changes to dockerfiles do not currently affect CI workflows directly. # Docker images are built and published after commits are pushed, then # workflows can be updated to use the new image sha256 values. @@ -179,8 +167,10 @@ def is_ci_run_required(paths: Optional[Iterable[str]]) -> bool: "ci*.yml", "multi_arch*.yml", "build*artifact*.yml", + "build*ci.yml", "build*python_packages.yml", "test*artifacts.yml", + "test_rocm_wheels.yml", "test_sanity_check.yml", "test_component.yml", ] diff --git a/build_tools/github_actions/tests/configure_ci_path_filters_test.py b/build_tools/github_actions/tests/configure_ci_path_filters_test.py index 47023422e8..d2b9317f9f 100644 --- a/build_tools/github_actions/tests/configure_ci_path_filters_test.py +++ b/build_tools/github_actions/tests/configure_ci_path_filters_test.py @@ -20,12 +20,7 @@ def test_dont_run_ci_if_only_markdown_files_edited(self): run_ci = is_ci_run_required(paths) self.assertFalse(run_ci) - def test_dont_run_ci_if_only_external_builds_edited(self): - paths = ["external-builds/pytorch/CMakeLists.txt"] - run_ci = is_ci_run_required(paths) - self.assertFalse(run_ci) - - def test_dont_run_ci_if_only_external_builds_edited(self): + def test_dont_run_ci_if_only_experimental_files_edited(self): paths = ["experimental/file.h"] run_ci = is_ci_run_required(paths) self.assertFalse(run_ci) From 748918670f2681e11ddaa5222a80cff1325d31ff Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Wed, 11 Feb 2026 11:29:52 -0800 Subject: [PATCH 13/16] [torch] Refresh aotriton supported archs list and enable gfx101x torch packages (#3355) ## Motivation I'm looking at building off of this `expect_pytorch_failure` code in `build_tools/github_actions/amdgpu_family_matrix.py` and I wanted to check if we could remove some of the xfails now. Net changes: * Disable aotriton for gfx101X * Enable Windows gfx101X pytorch releases * Keep Linux gfx101X pytorch releases disabled until CK works there (might disable on Windows later, once CK is enabled on Windows) * Enable aotriton for gfx1152 and gfx1153 for pytorch versions >= 2.11 * Share `AOTRITON_UNSUPPORTED_ARCHS` between Windows and Linux to make further changes here easier to make uniformly ## Technical Details ### gfx101X history * https://github.com/ROCm/TheRock/issues/1925 * https://github.com/ROCm/TheRock/issues/1926 * https://github.com/ROCm/TheRock/pull/2106 * https://github.com/ROCm/TheRock/pull/3164 ### gfx1152 and gfx1153 history * https://github.com/ROCm/TheRock/issues/2310 * https://github.com/ROCm/TheRock/pull/2709 * https://github.com/ROCm/TheRock/pull/2810 "Add gfx1152 and gfx1153 iGPU support" landed in aotriton as https://github.com/ROCm/aotriton/commit/5cc0b2dc0e35bbaef25739ebe6e9f1341af88a93. PyTorch 'nightly' now includes https://github.com/pytorch/pytorch/commit/b356c81eee8cb9cea30251ae1ff82a5f23db00ee, bumping aotriton to 0.11.2b. I don't see equivalent commits [yet] on any of the release branches in https://github.com/ROCm/pytorch. ## Test Plan and Results Platform | amdgpu family | PyTorch ref | Workflow logs | Result -- | -- | -- | -- | -- Linux | gfx1152 | nightly | https://github.com/ROCm/TheRock/actions/runs/21877171000 | Passed Linux | gfx1153 | nightly | https://github.com/ROCm/TheRock/actions/runs/21877172940 | Passed Linux | gfx101X-dgpu | release/2.10 | https://github.com/ROCm/TheRock/actions/runs/21876725870 | Failed (https://github.com/ROCm/TheRock/issues/1926), so keeping it disabled Windows | gfx101X-dgpu | release/2.10 | https://github.com/ROCm/TheRock/actions/runs/21876893200 | Failed (https://github.com/ROCm/TheRock/issues/3311), unrelated issue so enabling it Dev release of Linux gfx101X: https://github.com/ROCm/TheRock/actions/runs/21881959462 (passed, did not trigger pytorch) ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. --- .../github_actions/amdgpu_family_matrix.py | 5 +---- external-builds/pytorch/build_prod_wheels.py | 20 +++++++++---------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/build_tools/github_actions/amdgpu_family_matrix.py b/build_tools/github_actions/amdgpu_family_matrix.py index b16103ccc0..10471bb3c3 100644 --- a/build_tools/github_actions/amdgpu_family_matrix.py +++ b/build_tools/github_actions/amdgpu_family_matrix.py @@ -147,20 +147,17 @@ }, }, "gfx101x": { - # TODO(#1926): Resolve bgemm kernel hip file generation error, to enable PyTorch builds + # TODO(#1926): Resolve bgemm kernel hip file generation error to enable PyTorch builds "linux": { "test-runs-on": "", "family": "gfx101X-dgpu", - "expect_failure": True, "build_variants": ["release"], "expect_pytorch_failure": True, }, - # TODO(#1925): Enable arch for aotriton to enable PyTorch builds "windows": { "test-runs-on": "", "family": "gfx101X-dgpu", "build_variants": ["release"], - "expect_pytorch_failure": True, }, }, "gfx103x": { diff --git a/external-builds/pytorch/build_prod_wheels.py b/external-builds/pytorch/build_prod_wheels.py index d8fc648113..10e878f800 100755 --- a/external-builds/pytorch/build_prod_wheels.py +++ b/external-builds/pytorch/build_prod_wheels.py @@ -662,8 +662,16 @@ def do_build_pytorch( pytorch_build_version_parsed = parse(pytorch_build_version) print(f" Using PYTORCH_BUILD_VERSION: {pytorch_build_version}") - # Detect exactly PyTorch 2.9.x is_pytorch_2_9 = pytorch_build_version_parsed.release[:2] == (2, 9) + is_pytorch_2_11_or_later = pytorch_build_version_parsed.release[:2] >= (2, 11) + + # aotriton is not supported on certain architectures yet. + # gfx101X/gfx103X: https://github.com/ROCm/TheRock/issues/1925 + AOTRITON_UNSUPPORTED_ARCHS = ["gfx101", "gfx103"] + # gfx1152/53: supported in aotriton 0.11.2b+ (https://github.com/ROCm/aotriton/pull/142), + # which is pinned by pytorch >= 2.11. Older versions don't include it. + if not is_pytorch_2_11_or_later: + AOTRITON_UNSUPPORTED_ARCHS += ["gfx1152", "gfx1153"] ## Enable FBGEMM_GENAI on Linux for PyTorch, as it is available only for 2.9 on rocm/pytorch ## and causes build failures for other PyTorch versions @@ -702,11 +710,6 @@ def do_build_pytorch( # Default behavior — determined by if triton is build use_flash_attention = "ON" if triton_requirement else "OFF" - # no aotriton support for gfx103X - # - # temporarily disable aotriton for gfx1152/53 until pytorch - # uses a commit that enables it ( https://github.com/ROCm/aotriton/pull/142 ) - AOTRITON_UNSUPPORTED_ARCHS = ["gfx103", "gfx1152", "gfx1153"] if any( arch in env["PYTORCH_ROCM_ARCH"] for arch in AOTRITON_UNSUPPORTED_ARCHS ): @@ -763,11 +766,6 @@ def do_build_pytorch( use_flash_attention = "0" - # no aotriton support for gfx103X - # - # temporarily prevent enabling aotriton for gfx1152/53 until pytorch - # uses a commit that enables it ( https://github.com/ROCm/aotriton/pull/142 ) - AOTRITON_UNSUPPORTED_ARCHS = ["gfx103", "gfx1152", "gfx1153"] if args.enable_pytorch_flash_attention_windows and not any( arch in env["PYTORCH_ROCM_ARCH"] for arch in AOTRITON_UNSUPPORTED_ARCHS ): From 9e848c62960fa105e6eb7d7f254b3d1c7dbc4457 Mon Sep 17 00:00:00 2001 From: erman-gurses <99776114+erman-gurses@users.noreply.github.com> Date: Wed, 11 Feb 2026 12:22:40 -0800 Subject: [PATCH 14/16] Reland - Move amdsmi subproject from `base/` to `core/` directory (#2188) and (#2877) (#3305) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Motivation Closes https://github.com/ROCm/TheRock/issues/2954 This pull request re-introduces the relocation of the amdsmi subproject from the base/ directory into the core/ directory of the TheRock repository. This move was originally proposed in PR https://github.com/ROCm/TheRock/pull/2188 and https://github.com/ROCm/TheRock/pull/2877 but were reverted due to test failures exposed in CI and local runs. https://github.com/ROCm/TheRock/pull/2188 - Was failure on `rocm-sdk test` https://github.com/ROCm/TheRock/pull/2877 - Was failure on `Multi-Arch` workflow ## Technical Details 1. `amdsmi` sources and build targets were relocated from `base/amdsmi` → `core/amdsmi`. 2. Packaging updates were applied so that `amd-smi` console script entry points and runtime artifacts are properly included in the Python wheel produced by TheRock’s packaging logic. 3. `core-amdsmi` artifacts are included in the `rocm-sdk-core` package and validation tests exercise `amd-smi` as expected. 4. Fixed the multi-arch build failures by making `amd-smi` an explicit core artifact (`core-amdsmi`) in the build topology and aligning CMake dependencies to treat it as a required/conditional dependency where appropriate. This removed ordering ambiguities and “missing target” errors across math-libs, profiler, and comm-libs, allowing multi-arch builds to resolve dependencies deterministically. ## Testing `rocm-sdk test` now passes the `testConsoleScripts` check for `amd-smi`, which was previously failing with a non-zero exit status. See the details: https://github.com/ROCm/TheRock/issues/2954 ## CI: ### A: Release Workflows Tests 1) Triggered `Release portable Linux packages (gfx94X,gfx110X,gfx950,gfx1151,gfx120X, dev)` from [this ](https://github.com/ROCm/TheRock/pull/3305) PR's branch https://github.com/ROCm/TheRock/actions/runs/21836558832 and it is successful. 2) This automatically triggered workflows below: [Release portable Linux PyTorch Wheels (gfx120X-all, dev, 7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834) #2363 ](https://github.com/ROCm/TheRock/actions/runs/21846577066) [Release portable Linux PyTorch Wheels (gfx950-dcgpu, dev, 7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834) #2364 ](https://github.com/ROCm/TheRock/actions/runs/21852030796) [Release portable Linux PyTorch Wheels (gfx1151, dev, 7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834) #2365 ](https://github.com/ROCm/TheRock/actions/runs/21852717253) [Release portable Linux PyTorch Wheels (gfx110X-all, dev, 7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834) #2367 ](https://github.com/ROCm/TheRock/actions/runs/21853829698) [Release portable Linux PyTorch Wheels (gfx94X-dcgpu, dev, 7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834) #2368 ](https://github.com/ROCm/TheRock/actions/runs/21854299495) See example `testConsoleScripts (rocm_sdk.tests.core_test.ROCmCoreTest.testConsoleScripts) ... ok` https://github.com/ROCm/TheRock/actions/runs/21854299495/job/63070085745#step:11:1 ### B: Multi-Arch Tests Run `Multi-Arch CI`from this PR's [branch ](https://github.com/ROCm/TheRock/tree/users/erman-gurses/move-amd-smi): https://github.com/ROCm/TheRock/actions/runs/21834134481. The issue seen in here https://github.com/ROCm/TheRock/pull/3292 has gone. ## Local: ``` ((.venv) ) TheRock$ .venv/bin/python -m pip install --index-url=https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834 Looking in indexes: https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu Collecting torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834 Downloading https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/torch-2.7.1%2Bdevrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834-cp312-cp312-linux_x86_64.whl (721.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 721.0/721.0 MB 48.1 MB/s eta 0:00:00 Collecting filelock (from torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Using cached https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/filelock-3.20.3-py3-none-any.whl (16 kB) Collecting typing-extensions>=4.10.0 (from torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Using cached https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/typing_extensions-4.15.0-py3-none-any.whl (44 kB) Collecting setuptools (from torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Using cached https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/setuptools-80.9.0-py3-none-any.whl (1.2 MB) Collecting sympy>=1.13.3 (from torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Using cached https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/sympy-1.14.0-py3-none-any.whl (6.3 MB) Collecting networkx (from torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Using cached https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/networkx-3.6.1-py3-none-any.whl (2.1 MB) Collecting jinja2 (from torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Using cached https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/jinja2-3.1.6-py3-none-any.whl (134 kB) Collecting fsspec (from torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Using cached https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/fsspec-2026.1.0-py3-none-any.whl (201 kB) Collecting rocm==7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834 (from rocm[libraries]==7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834->torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Downloading https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/rocm-7.12.0.dev0%2Bab23b96387a5c79111438ea936764dc353773834.tar.gz (16 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting triton==3.3.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834 (from torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Downloading https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/triton-3.3.1%2Bdevrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834-cp312-cp312-linux_x86_64.whl (265.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 265.3/265.3 MB 54.0 MB/s eta 0:00:00 Collecting rocm-sdk-core==7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834 (from rocm==7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834->rocm[libraries]==7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834->torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Downloading https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/rocm_sdk_core-7.12.0.dev0%2Bab23b96387a5c79111438ea936764dc353773834-py3-none-linux_x86_64.whl (284.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 284.1/284.1 MB 61.3 MB/s eta 0:00:00 Collecting rocm-sdk-libraries-gfx94X-dcgpu==7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834 (from rocm[libraries]==7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834->torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Downloading https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/rocm_sdk_libraries_gfx94x_dcgpu-7.12.0.dev0%2Bab23b96387a5c79111438ea936764dc353773834-py3-none-linux_x86_64.whl (1588.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 GB 42.7 MB/s eta 0:00:00 Collecting mpmath<1.4,>=1.1.0 (from sympy>=1.13.3->torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Using cached https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/mpmath-1.3.0-py3-none-any.whl (536 kB) Collecting MarkupSafe>=2.0 (from jinja2->torch==2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834) Using cached https://rocm.devreleases.amd.com/v2-staging/gfx94X-dcgpu/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (22 kB) Building wheels for collected packages: rocm Building wheel for rocm (pyproject.toml) ... done Created wheel for rocm: filename=rocm-7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834-py3-none-any.whl size=20754 sha256=f02d33b63c925fc71cf8b561aaba4478700e388f40c7964a55d7545d5b8a4770 Stored in directory: /home/nod/.cache/pip/wheels/7b/98/96/86d1dd8c6a61cf40f084c7efb9a9267e5d61bfc0fea9f52e81 Successfully built rocm Installing collected packages: rocm-sdk-libraries-gfx94X-dcgpu, rocm-sdk-core, mpmath, typing-extensions, sympy, setuptools, networkx, MarkupSafe, fsspec, filelock, triton, jinja2, rocm, torch Successfully installed MarkupSafe-3.0.3 filelock-3.20.3 fsspec-2026.1.0 jinja2-3.1.6 mpmath-1.3.0 networkx-3.6.1 rocm-7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834 rocm-sdk-core-7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834 rocm-sdk-libraries-gfx94X-dcgpu-7.12.0.dev0+ab23b96387a5c79111438ea936764dc353773834 setuptools-80.9.0 sympy-1.14.0 torch-2.7.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834 triton-3.3.1+devrocm7.12.0.dev0.ab23b96387a5c79111438ea936764dc353773834 typing-extensions-4.15.0 ``` ``` ((.venv) ) TheRock$ rocm-sdk test `testCLI (rocm_sdk.tests.base_test.ROCmBaseTest.testCLI) ... ++ Exec [/home/nod/ergurses/TheRock]$ /home/nod/ergurses/TheRock/.venv/bin/python -P -m rocm_sdk --help ok testTargets (rocm_sdk.tests.base_test.ROCmBaseTest.testTargets) ... ++ Exec [/home/nod/ergurses/TheRock]$ /home/nod/ergurses/TheRock/.venv/bin/python -P -m rocm_sdk targets ok testVersion (rocm_sdk.tests.base_test.ROCmBaseTest.testVersion) ... ++ Exec [/home/nod/ergurses/TheRock]$ /home/nod/ergurses/TheRock/.venv/bin/python -P -m rocm_sdk version ok test_initialize_process_check_version (rocm_sdk.tests.base_test.ROCmBaseTest.test_initialize_process_check_version) ... ok test_initialize_process_check_version_asterisk (rocm_sdk.tests.base_test.ROCmBaseTest.test_initialize_process_check_version_asterisk) ... ok test_initialize_process_check_version_mismatch (rocm_sdk.tests.base_test.ROCmBaseTest.test_initialize_process_check_version_mismatch) ... ok test_initialize_process_check_version_mismatch_warning (rocm_sdk.tests.base_test.ROCmBaseTest.test_initialize_process_check_version_mismatch_warning) ... ok test_initialize_process_check_version_pattern (rocm_sdk.tests.base_test.ROCmBaseTest.test_initialize_process_check_version_pattern) ... ok test_initialize_process_env_preload_1 (rocm_sdk.tests.base_test.ROCmBaseTest.test_initialize_process_env_preload_1) ... ok test_initialize_process_env_preload_2_comma (rocm_sdk.tests.base_test.ROCmBaseTest.test_initialize_process_env_preload_2_comma) ... ok test_initialize_process_env_preload_2_semi (rocm_sdk.tests.base_test.ROCmBaseTest.test_initialize_process_env_preload_2_semi) ... ok test_initialize_process_preload_libraries (rocm_sdk.tests.base_test.ROCmBaseTest.test_initialize_process_preload_libraries) ... ok testConsoleScripts (rocm_sdk.tests.core_test.ROCmCoreTest.testConsoleScripts) ... ok testInstallationLayout (rocm_sdk.tests.core_test.ROCmCoreTest.testInstallationLayout) The `rocm_sdk` and core module must be siblings on disk. ... ok testPreloadLibraries (rocm_sdk.tests.core_test.ROCmCoreTest.testPreloadLibraries) ... ok testSharedLibrariesLoad (rocm_sdk.tests.core_test.ROCmCoreTest.testSharedLibrariesLoad) ... ok testConsoleScripts (rocm_sdk.tests.libraries_test.ROCmLibrariesTest.testConsoleScripts) ... ok testInstallationLayout (rocm_sdk.tests.libraries_test.ROCmLibrariesTest.testInstallationLayout) The `rocm_sdk` and libraries module must be siblings on disk. ... ok testSharedLibrariesLoad (rocm_sdk.tests.libraries_test.ROCmLibrariesTest.testSharedLibrariesLoad) ... ok ---------------------------------------------------------------------- Ran 19 tests in 6.455s OK ``` ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. --- BUILD_TOPOLOGY.toml | 29 ++++++++--- base/CMakeLists.txt | 31 ------------ base/artifact.toml | 16 ------ build_tools/build_python_packages.py | 1 + build_tools/install_rocm_from_artifacts.py | 2 + build_tools/packaging/linux/package.json | 2 +- comm-libs/CMakeLists.txt | 15 +++++- core/CMakeLists.txt | 59 ++++++++++++++++++++-- core/artifact-core-amdsmi.toml | 12 +++++ {base => core}/post_hook_amdsmi.cmake | 0 docs/development/artifacts.md | 1 + docs/development/windows_support.md | 2 +- math-libs/BLAS/CMakeLists.txt | 40 ++++++++------- 13 files changed, 132 insertions(+), 78 deletions(-) create mode 100644 core/artifact-core-amdsmi.toml rename {base => core}/post_hook_amdsmi.cmake (100%) diff --git a/BUILD_TOPOLOGY.toml b/BUILD_TOPOLOGY.toml index a9d4fb5ca6..a894066050 100644 --- a/BUILD_TOPOLOGY.toml +++ b/BUILD_TOPOLOGY.toml @@ -137,6 +137,7 @@ artifact_groups = ["third-party-sysdeps", "base"] description = "Compiler, runtimes, and core profiling" artifact_groups = [ "compiler", + "core-amdsmi", "core-runtime", "third-party-libs", "hip-runtime", @@ -208,6 +209,12 @@ type = "generic" artifact_group_deps = ["base", "third-party-sysdeps"] source_sets = ["rocm-systems"] +[artifact_groups.core-amdsmi] +description = "AMD SMI tool (amdsmi)" +type = "generic" +artifact_group_deps = ["base", "third-party-sysdeps"] +source_sets = ["rocm-systems"] + [artifact_groups.compiler] description = "AMD LLVM toolchain and compiler infrastructure" type = "generic" @@ -267,9 +274,9 @@ source_sets = ["rocm-systems"] # rocprofiler-sdk is in rocm-systems [artifact_groups.dctools-core] description = "Data center management tools with minimal dependencies" type = "generic" -artifact_group_deps = ["core-runtime", "profiler-core"] +artifact_group_deps = ["core-runtime", "core-amdsmi", "profiler-core"] # TODO: rocm-systems included for projects/hip/VERSION (see CMakeLists.txt) -source_sets = ["base", "rocm-systems"] # RDC uses amdsmi from base +source_sets = ["base", "rocm-systems"] # RDC uses amdsmi from core-amdsmi # Future artifact groups # [artifact_groups.dctools-rocm] @@ -280,7 +287,7 @@ source_sets = ["base", "rocm-systems"] # RDC uses amdsmi from base [artifact_groups.profiler-apps] description = "Profiler applications and analysis tools" type = "generic" -artifact_group_deps = ["profiler-core", "compiler"] +artifact_group_deps = ["profiler-core", "compiler", "core-amdsmi"] source_sets = ["rocm-systems", "profiler-extras"] # rocprofiler-systems + trace decoder [artifact_groups.iree-libs] @@ -437,6 +444,14 @@ feature_name = "CORE_RUNTIME" feature_group = "CORE" disable_platforms = ["windows"] +[artifacts.core-amdsmi] +artifact_group = "core-amdsmi" +type = "target-neutral" +artifact_deps = ["base", "sysdeps"] +feature_name = "CORE_AMDSMI" +feature_group = "CORE" +disable_platforms = ["windows"] + [artifacts.core-hip] artifact_group = "hip-runtime" type = "target-neutral" @@ -479,7 +494,7 @@ feature_group = "CORE" # Part of core, enabled by default [artifacts.blas] artifact_group = "math-libs" type = "target-specific" -artifact_deps = ["core-runtime", "core-hip", "host-blas", "host-suite-sparse", "rocprofiler-sdk"] +artifact_deps = ["core-runtime", "core-hip", "core-amdsmi", "host-blas", "host-suite-sparse", "rocprofiler-sdk"] split_databases = ["rocblas", "hipblaslt"] [artifacts.fft] @@ -568,7 +583,7 @@ disable_platforms = ["windows"] [artifacts.rccl] artifact_group = "comm-libs" type = "target-specific" -artifact_deps = ["core-runtime", "core-hip", "hipify", "rocprofiler-sdk"] +artifact_deps = ["core-runtime", "core-hip", "hipify", "rocprofiler-sdk", "core-amdsmi"] disable_platforms = ["windows"] # --- Profiler Tools --- @@ -598,7 +613,7 @@ disable_platforms = ["windows"] [artifacts.rocprofiler-systems] artifact_group = "profiler-apps" type = "target-neutral" -artifact_deps = ["amd-llvm", "core-hip", "rocprofiler-sdk"] +artifact_deps = ["amd-llvm", "core-hip", "rocprofiler-sdk", "core-amdsmi"] feature_name = "ROCPROFSYS" feature_group = "PROFILER" disable_platforms = ["windows"] @@ -608,7 +623,7 @@ disable_platforms = ["windows"] [artifacts.rdc] artifact_group = "dctools-core" type = "target-neutral" -artifact_deps = ["core-hip", "rocprofiler-sdk", "sysdeps"] +artifact_deps = ["core-hip", "rocprofiler-sdk", "sysdeps", "core-amdsmi"] feature_group = "DC_TOOLS" # Part of DC tools, enabled by default via THEROCK_ENABLE_ALL disable_platforms = ["windows"] diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt index 4f31c4e246..0ff96e7b50 100644 --- a/base/CMakeLists.txt +++ b/base/CMakeLists.txt @@ -56,37 +56,6 @@ therock_cmake_subproject_provide_package(rocm-core rocm-core lib/cmake/rocm-core therock_cmake_subproject_activate(rocm-core) -################################################################################ -# amdsmi -################################################################################ - -if(NOT WIN32) # TODO(#36): Enable on Windows and/or make subproject inclusion generally optional - -therock_cmake_subproject_declare(amdsmi - EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/amdsmi" - BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/amdsmi" - USE_DIST_AMDGPU_TARGETS - BACKGROUND_BUILD - CMAKE_ARGS - "-DCMAKE_VERBOSE_MAKEFILE=OFF" - -DBUILD_TESTS=${THEROCK_BUILD_TESTING} - BUILD_DEPS - therock-googletest - RUNTIME_DEPS - rocm-core - ${THEROCK_BUNDLED_LIBDRM} - INSTALL_RPATH_DIRS - lib - INTERFACE_INSTALL_RPATH_DIRS - lib -) -therock_cmake_subproject_provide_package(amdsmi - amd_smi lib/cmake) -therock_cmake_subproject_activate(amdsmi) -list(APPEND _optional_artifact_deps amdsmi) - -endif() - ################################################################################ # rocm_smi_lib diff --git a/base/artifact.toml b/base/artifact.toml index c1d45d32d4..8e1b169b8b 100644 --- a/base/artifact.toml +++ b/base/artifact.toml @@ -2,22 +2,6 @@ [components.dev."base/half/stage"] [components.doc."base/half/stage"] -# amdsmi -[components.dbg."base/amdsmi/stage"] -optional = "windows" -[components.dev."base/amdsmi/stage"] -optional = "windows" -[components.doc."base/amdsmi/stage"] -optional = "windows" -[components.lib."base/amdsmi/stage"] -optional = "windows" -[components.run."base/amdsmi/stage"] -optional = "windows" -include = [ - "bin/**", - "libexec/**", - "share/amd_smi/**", -] # rocm_smi_lib [components.dbg."base/rocm_smi_lib/stage"] diff --git a/build_tools/build_python_packages.py b/build_tools/build_python_packages.py index f02bbd94ae..43921f21a9 100755 --- a/build_tools/build_python_packages.py +++ b/build_tools/build_python_packages.py @@ -86,6 +86,7 @@ def core_artifact_filter(an: ArtifactName) -> bool: core = an.name in [ "amd-llvm", "base", + "core-amdsmi", "core-hip", "core-ocl", "core-hipinfo", diff --git a/build_tools/install_rocm_from_artifacts.py b/build_tools/install_rocm_from_artifacts.py index 24acb9c061..bee5a9e4cc 100644 --- a/build_tools/install_rocm_from_artifacts.py +++ b/build_tools/install_rocm_from_artifacts.py @@ -317,6 +317,8 @@ def retrieve_artifacts_by_run_id(args): "base_lib", "amd-llvm_run", "amd-llvm_lib", + "core-amdsmi_run", + "core-amdsmi_lib", "core-hip_lib", "core-hip_dev", "core-ocl_lib", diff --git a/build_tools/packaging/linux/package.json b/build_tools/packaging/linux/package.json index 0e631cd8f9..05be8718a6 100644 --- a/build_tools/packaging/linux/package.json +++ b/build_tools/packaging/linux/package.json @@ -24,7 +24,7 @@ "Homepage": "https://github.com/ROCm/rocm-systems", "Artifactory": [ { - "Artifact": "base", + "Artifact": "core-amdsmi", "Artifact_Subdir": [ { "Name": "amdsmi", diff --git a/comm-libs/CMakeLists.txt b/comm-libs/CMakeLists.txt index ac9c1f6f60..de3d6663b2 100644 --- a/comm-libs/CMakeLists.txt +++ b/comm-libs/CMakeLists.txt @@ -7,6 +7,18 @@ if(THEROCK_ENABLE_RCCL AND THEROCK_SANITIZER STREQUAL "") list(APPEND optional_profiler_deps roctracer rocprofiler-sdk) endif() + # RCCL can optionally use amdsmi/rocm_smi_lib on Linux, but those may not be + # enabled/declared depending on feature selection. + set(_rccl_optional_runtime_deps) + if(NOT WIN32) + if(TARGET amdsmi) + list(APPEND _rccl_optional_runtime_deps amdsmi) + endif() + if(TARGET rocm_smi_lib) + list(APPEND _rccl_optional_runtime_deps rocm_smi_lib) + endif() + endif() + ############################################################################## # rccl ############################################################################## @@ -35,11 +47,10 @@ if(THEROCK_ENABLE_RCCL AND THEROCK_SANITIZER STREQUAL "") therock-fmt therock-googletest RUNTIME_DEPS - amdsmi hip-clr hipify - rocm_smi_lib rocprofiler-register + ${_rccl_optional_runtime_deps} ${optional_profiler_deps} ) therock_cmake_subproject_glob_c_sources(rccl diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 0ef7650549..75e05f64c6 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -9,6 +9,52 @@ if(WIN32) set(_system_toolchain "") endif() +if(THEROCK_ENABLE_CORE_AMDSMI) + + ################################################################################ + # amdsmi + ################################################################################ + + if(NOT WIN32) # TODO(#36): Enable on Windows and/or make subproject inclusion generally optional + + therock_cmake_subproject_declare(amdsmi + EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/amdsmi" + BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/amdsmi" + USE_DIST_AMDGPU_TARGETS + BACKGROUND_BUILD + CMAKE_ARGS + "-DCMAKE_VERBOSE_MAKEFILE=OFF" + "-DBUILD_TESTS=${THEROCK_BUILD_TESTING}" + BUILD_DEPS + therock-googletest + RUNTIME_DEPS + rocm-core + ${THEROCK_BUNDLED_LIBDRM} + INSTALL_RPATH_DIRS + lib + INTERFACE_INSTALL_RPATH_DIRS + lib + ) + therock_cmake_subproject_provide_package(amdsmi amd_smi lib/cmake) + therock_cmake_subproject_activate(amdsmi) + + therock_provide_artifact(core-amdsmi + TARGET_NEUTRAL + DESCRIPTOR artifact-core-amdsmi.toml + COMPONENTS + dbg + dev + doc + lib + run + SUBPROJECT_DEPS + amdsmi + ) + + endif() # NOT WIN32 +endif(THEROCK_ENABLE_CORE_AMDSMI) + + if(THEROCK_ENABLE_CORE_RUNTIME) ############################################################################## # ROCR-Runtime @@ -374,6 +420,15 @@ endif(THEROCK_ENABLE_OCL_RUNTIME) if(THEROCK_BUILD_TESTING) if(THEROCK_ENABLE_CORE_RUNTIME_TESTS) + # rocrtst may optionally build against amdsmi when available (Linux). + set(_rocrtst_build_deps + amd-llvm + ocl-clr + ) + if(TARGET amdsmi) + list(APPEND _rocrtst_build_deps amdsmi) + endif() + therock_cmake_subproject_declare(rocrtst USE_DIST_AMDGPU_TARGETS EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/rocr-runtime/rocrtst/suites/test_common" @@ -386,9 +441,7 @@ if(THEROCK_BUILD_TESTING) COMPILER_TOOLCHAIN "${_system_toolchain}" BUILD_DEPS - amd-llvm - amdsmi - ocl-clr + ${_rocrtst_build_deps} RUNTIME_DEPS ROCR-Runtime rocprofiler-register diff --git a/core/artifact-core-amdsmi.toml b/core/artifact-core-amdsmi.toml new file mode 100644 index 0000000000..abfe69a661 --- /dev/null +++ b/core/artifact-core-amdsmi.toml @@ -0,0 +1,12 @@ +# amdsmi +[components.dbg."core/amdsmi/stage"] +[components.dev."core/amdsmi/stage"] +[components.doc."core/amdsmi/stage"] +[components.lib."core/amdsmi/stage"] +include = [ "lib/**" ] +[components.run."core/amdsmi/stage"] +include = [ + "bin/**", + "libexec/**", + "share/amd_smi/**", +] diff --git a/base/post_hook_amdsmi.cmake b/core/post_hook_amdsmi.cmake similarity index 100% rename from base/post_hook_amdsmi.cmake rename to core/post_hook_amdsmi.cmake diff --git a/docs/development/artifacts.md b/docs/development/artifacts.md index 386aab4705..e49b465666 100644 --- a/docs/development/artifacts.md +++ b/docs/development/artifacts.md @@ -208,6 +208,7 @@ These artifacts are built if any project features requiring them are enabled: ### Core Artifacts - `base`: Base ROCM tools and structural components. ROCM sub-projects that do not depend on anything outside of this set are included here so that everything can depend on them. +- `core-amdsmi`: AMD System Management Interface (amdsmi) library and tools for GPU and driver management, packaged as a standalone core artifact due to distinct product and usage semantics. - `core-runtime`: Low level runtime components used for interfacing with kernel drivers. - `core-hip`: HIP runtime, compiler interface, and build tools. diff --git a/docs/development/windows_support.md b/docs/development/windows_support.md index 9a33c67013..806b128918 100644 --- a/docs/development/windows_support.md +++ b/docs/development/windows_support.md @@ -26,7 +26,6 @@ mainline, in open source, using MSVC, etc.). | Component subset | Subproject | Supported | Notes | | ------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------- | --------------------------------------------- | | base | aux-overlay | ✅ | | -| base | [amdsmi](https://github.com/ROCm/amdsmi) | ❌ | Unsupported | | base | [rocm-cmake](https://github.com/ROCm/rocm-cmake) | ✅ | | | base | [rocm-core](https://github.com/ROCm/rocm-core) | ✅ | | | base | [rocm_smi_lib](https://github.com/ROCm/rocm_smi_lib) | ❌ | Unsupported | @@ -38,6 +37,7 @@ mainline, in open source, using MSVC, etc.). | compiler | [hipcc](https://github.com/ROCm/llvm-project/tree/amd-staging/amd/hipcc) | ✅ | | | compiler | [hipify](https://github.com/ROCm/HIPIFY) | ✅ | | | | | | | +| core | [amdsmi](https://github.com/ROCm/amdsmi) | ❌ | Unsupported | | core | [ROCR-Runtime](https://github.com/ROCm/ROCR-Runtime) | ❌ | Unsupported | | core | [rocminfo](https://github.com/ROCm/rocminfo) | ❌ | Unsupported | | core | [hipInfo from hip-tests](https://github.com/ROCm/hip-tests) | ✅ | | diff --git a/math-libs/BLAS/CMakeLists.txt b/math-libs/BLAS/CMakeLists.txt index db45573925..559a22c91d 100644 --- a/math-libs/BLAS/CMakeLists.txt +++ b/math-libs/BLAS/CMakeLists.txt @@ -94,13 +94,15 @@ endif() # hipBLASLt ############################################################################## -set(hipBLASLt_optional_deps) +set(hipBLASLt_runtime_deps) if(NOT WIN32) - # hipBLASLt is hard-coded to not expect rocm-smi and amdsmi on Windows. - list(APPEND hipBLASLt_optional_deps - amdsmi - rocm_smi_lib - ) + # Required on Linux. + list(APPEND hipBLASLt_runtime_deps amdsmi) + + # rocm_smi_lib remains optional (guarded). + if(TARGET rocm_smi_lib) + list(APPEND hipBLASLt_runtime_deps rocm_smi_lib) + endif() endif() set(hipBLASLt_rocRoller_deps) @@ -146,11 +148,11 @@ therock_cmake_subproject_declare(hipBLASLt hip-clr therock-host-blas ${hipBLASLt_rocRoller_runtime_deps} - ${hipBLASLt_optional_deps} + ${hipBLASLt_runtime_deps} ${optional_profiler_deps} ) therock_cmake_subproject_glob_c_sources(hipBLASLt -SUBDIRS + SUBDIRS . ) therock_cmake_subproject_provide_package(hipBLASLt hipblaslt lib/cmake/hipblaslt) @@ -165,7 +167,9 @@ list(APPEND _blas_subproject_names hipBLASLt) set(rocBLAS_optional_runtime_deps) if(NOT WIN32) # rocBLAS is hard-coded to not expect rocm-smi. - list(APPEND rocBLAS_optional_runtime_deps rocm_smi_lib) + if(TARGET rocm_smi_lib) + list(APPEND rocBLAS_optional_runtime_deps rocm_smi_lib) + endif() elseif(THEROCK_BUILD_TESTING) list(APPEND rocBLAS_optional_runtime_deps therock-host-blas) endif() @@ -289,13 +293,15 @@ if(THEROCK_ENABLE_SPARSE) ############################################################################## if(NOT WIN32) # Remove this block once hipSPARSELt is supported on Windows - set(hipSPARSELt_optional_deps) - if(NOT WIN32) - # hipSPARSELt is hard-coded to not expect rocm-smi and amdsmi on Windows. - list(APPEND hipSPARSELt_optional_deps - amdsmi - rocm_smi_lib - ) + # hipSPARSELt expects amd_smi on Linux. + set(hipSPARSELt_runtime_deps) + + # Required on Linux. + list(APPEND hipSPARSELt_runtime_deps amdsmi) + + # rocm_smi_lib is optional. + if(TARGET rocm_smi_lib) + list(APPEND hipSPARSELt_runtime_deps rocm_smi_lib) endif() therock_cmake_subproject_declare(hipSPARSELt @@ -320,7 +326,7 @@ if(THEROCK_ENABLE_SPARSE) RUNTIME_DEPS hip-clr therock-host-blas - ${hipSPARSELt_optional_deps} + ${hipSPARSELt_runtime_deps} ${optional_profiler_deps} ) therock_cmake_subproject_glob_c_sources(hipSPARSELt From 660b3ad245505617041965c7f0fe111109bd7ed5 Mon Sep 17 00:00:00 2001 From: Todd tiantuo Li <88386084+lttamd@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:04:19 -0800 Subject: [PATCH 15/16] build ocltst for OpenCL (#2939) ## Motivation build ocltst for OpenCL ## Technical Details add BUILD_TEST flag to ocl-clr to build ocltst ## Test Plan The new files for ocltst are: liboclperf.so liboclruntime.so oclperf.exclude oclruntime.exclude ocltst Dev build: https://github.com/ROCm/TheRock/actions/runs/21651603039 ## Test Result The expected new files are included in the artifacts. Dev build passed. ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. --------- Co-authored-by: Joseph Macaranas <145489236+jayhawk-commits@users.noreply.github.com> --- .../python/templates/rocm/src/rocm_sdk/tests/core_test.py | 4 ++++ .../templates/rocm/src/rocm_sdk/tests/devel_test.py | 4 ++++ core/CMakeLists.txt | 4 ++++ core/artifact-core-ocl.toml | 8 +++++--- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/core_test.py b/build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/core_test.py index 8ed35f54d0..a959006c37 100644 --- a/build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/core_test.py +++ b/build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/core_test.py @@ -112,6 +112,10 @@ def testSharedLibrariesLoad(self): if "libtest_linking_lib" in str(so_path): # rocprim unit tests, not actual library files continue + if "opencl" in str(so_path): + # We use OpenCL ICD from distro rather than TheRock + # and we do not build it + continue with self.subTest(msg="Check shared library loads", so_path=so_path): # Load each in an isolated process because not all libraries in the tree # are designed to load into the same process (i.e. LLVM runtime libs, diff --git a/build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/devel_test.py b/build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/devel_test.py index 38b24097e1..ac23081ec6 100644 --- a/build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/devel_test.py +++ b/build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/devel_test.py @@ -152,6 +152,10 @@ def testSharedLibrariesLoad(self): if "libtest_linking_lib" in str(so_path): # rocprim unit tests, not actual library files continue + if "opencl" in str(so_path): + # We use OpenCL ICD from distro rather than TheRock + # and we do not build it + continue with self.subTest(msg="Check shared library loads", so_path=so_path): # Load each in an isolated process because not all libraries in the tree # are designed to load into the same process (i.e. LLVM runtime libs, diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 75e05f64c6..b7f6fbadd3 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -346,6 +346,9 @@ if(THEROCK_ENABLE_OCL_RUNTIME) rocprofiler-register ROCR-Runtime ) + list(APPEND OCL_CLR_CMAKE_ARGS + "-DBUILD_TESTS=${THEROCK_BUILD_TESTING}" + ) endif() therock_cmake_subproject_declare(ocl-clr @@ -389,6 +392,7 @@ if(THEROCK_ENABLE_OCL_RUNTIME) doc lib run + test SUBPROJECT_DEPS ocl-clr ) diff --git a/core/artifact-core-ocl.toml b/core/artifact-core-ocl.toml index abee8565dd..eedde0fe65 100644 --- a/core/artifact-core-ocl.toml +++ b/core/artifact-core-ocl.toml @@ -3,10 +3,12 @@ [components.dev."core/ocl-clr/stage"] [components.doc."core/ocl-clr/stage"] [components.lib."core/ocl-clr/stage"] -include = [ - "share/ocl/**", -] [components.run."core/ocl-clr/stage"] include = [ "bin/**", ] +[components.test."core/ocl-clr/stage"] +include = [ + "tests/**", + "share/opencl/**", +] From 22d059649046bb95e4bad6f11bb20a6887e44aa1 Mon Sep 17 00:00:00 2001 From: Jessey Harrymanoharan Date: Wed, 11 Feb 2026 16:12:54 -0500 Subject: [PATCH 16/16] Enable sysdeps-hwloc support in rocrtst (#3231) ## Motivation Enable rocrtst to use the bundled hwloc library added in #3020. necessary for https://github.com/ROCm/TheRock/issues/2498 also resolves: https://github.com/ROCm/TheRock/issues/3316 ## Technical Details Changes: - Add `sysdeps-hwloc` to rocrtst's artifact dependencies in BUILD_TOPOLOGY.toml - Add `${THEROCK_BUNDLED_HWLOC}` to rocrtst's RUNTIME_DEPS - Add INTERFACE_LINK_DIRS and INTERFACE_INSTALL_RPATH_DIRS to ensure proper linking Depends on PR #3020 which adds hwloc infrastructure. ## Test Plan Verify that rocrtst builds and links correctly with the bundled hwloc library. ## Test Result Build artifact from this build: On develop from theRock: https://therock-ci-artifacts.s3.amazonaws.com/21842152546-linux/rocrtst_test_generic.tar.xz core\rocrtst\stage\lib\rocrtst\lib: > libhwloc.so.5 > LICENSE https://therock-ci-artifacts.s3.amazonaws.com/21842152546-linux/rocrtst_lib_generic.tar.xz core\rocrtst\stage\lib\rocrtst\lib: > libhwloc.so.5 ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. --- BUILD_TOPOLOGY.toml | 2 +- core/CMakeLists.txt | 5 +++++ core/artifact-core-rocrtst.toml | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/BUILD_TOPOLOGY.toml b/BUILD_TOPOLOGY.toml index a894066050..eeb552b8eb 100644 --- a/BUILD_TOPOLOGY.toml +++ b/BUILD_TOPOLOGY.toml @@ -469,7 +469,7 @@ feature_group = "CORE" # Part of core, enabled by default [artifacts.rocrtst] artifact_group = "rocrtst" type = "target-neutral" -artifact_deps = ["core-runtime", "core-ocl"] +artifact_deps = ["core-runtime", "core-ocl", "sysdeps-hwloc"] feature_name = "CORE_RUNTIME_TESTS" feature_group = "CORE" disable_platforms = ["windows"] diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index b7f6fbadd3..f464a3515d 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -450,8 +450,13 @@ if(THEROCK_BUILD_TESTING) ROCR-Runtime rocprofiler-register ${THEROCK_BUNDLED_ELFUTILS} + ${THEROCK_BUNDLED_HWLOC} ${THEROCK_BUNDLED_LIBDRM} ${THEROCK_BUNDLED_NUMACTL} + INTERFACE_LINK_DIRS + "lib/rocm_sysdeps/lib" + INTERFACE_INSTALL_RPATH_DIRS + "lib/rocm_sysdeps/lib" ) therock_cmake_subproject_glob_c_sources(rocrtst SUBDIRS .) therock_cmake_subproject_activate(rocrtst) diff --git a/core/artifact-core-rocrtst.toml b/core/artifact-core-rocrtst.toml index 24dd542bbe..5c3683f8d6 100644 --- a/core/artifact-core-rocrtst.toml +++ b/core/artifact-core-rocrtst.toml @@ -2,6 +2,9 @@ [components.dbg."core/rocrtst/stage"] [components.dev."core/rocrtst/stage"] [components.doc."core/rocrtst/stage"] -[components.lib."core/rocrtst/stage"] [components.run."core/rocrtst/stage"] [components.test."core/rocrtst/stage"] +exclude = [ + "lib/rocrtst/lib/libhwloc.so*", + "lib/rocrtst/lib/LICENSE", +]