Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_portable_linux_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
permissions:
id-token: write
container:
image: ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:2f3ebd0beb04c449fdb36933e54bdc69483b914fb9005594d3fc9444c206b54b
image: ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:4443d9d710b9471e8ef658d509358bd92602498e67161b9280474bce0bb0decd
options: -v /runner/config:/home/awsconfig/
env:
AWS_SHARED_CREDENTIALS_FILE: /home/awsconfig/credentials.ini
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_portable_linux_python_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
# Note: GitHub-hosted runners run out of disk space for some gpu families
runs-on: ${{ github.repository_owner == 'ROCm' && 'azure-linux-scale-rocm' || 'ubuntu-24.04' }}
env:
BUILD_IMAGE: ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:2f3ebd0beb04c449fdb36933e54bdc69483b914fb9005594d3fc9444c206b54b
BUILD_IMAGE: ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:4443d9d710b9471e8ef658d509358bd92602498e67161b9280474bce0bb0decd
ARTIFACT_RUN_ID: "${{ inputs.artifact_run_id != '' && inputs.artifact_run_id || github.run_id }}"
ARTIFACTS_DIR: "${{ github.workspace }}/artifacts"
PACKAGES_DIR: "${{ github.workspace }}/packages"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_portable_linux_pytorch_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
name: Build | ${{ inputs.amdgpu_family }} | py ${{ inputs.python_version }} | torch ${{ inputs.pytorch_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:2f3ebd0beb04c449fdb36933e54bdc69483b914fb9005594d3fc9444c206b54b
image: ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:4443d9d710b9471e8ef658d509358bd92602498e67161b9280474bce0bb0decd
env:
OUTPUT_DIR: ${{ github.workspace }}/output
PACKAGE_DIST_DIR: ${{ github.workspace }}/output/packages/dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_portable_linux_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
env:
TEATIME_LABEL_GH_GROUP: 1
OUTPUT_DIR: ${{ github.workspace }}/output
BUILD_IMAGE: ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:2f3ebd0beb04c449fdb36933e54bdc69483b914fb9005594d3fc9444c206b54b
BUILD_IMAGE: ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:4443d9d710b9471e8ef658d509358bd92602498e67161b9280474bce0bb0decd
DIST_ARCHIVE: "${{ github.workspace }}/output/therock-dist-linux-${{ matrix.target_bundle.amdgpu_family }}${{ inputs.package_suffix }}-${{ needs.setup_metadata.outputs.version }}.tar.gz"
FILE_NAME: "therock-dist-linux-${{ matrix.target_bundle.amdgpu_family }}${{ inputs.package_suffix }}-${{ needs.setup_metadata.outputs.version }}.tar.gz"
RELEASE_TYPE: "${{ needs.setup_metadata.outputs.release_type }}"
Expand Down
2 changes: 1 addition & 1 deletion build_tools/linux_portable_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def main(argv: list[str]):
p.add_argument("--docker", default="docker", help="Docker or podman binary")
p.add_argument(
"--image",
default="ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:2f3ebd0beb04c449fdb36933e54bdc69483b914fb9005594d3fc9444c206b54b",
default="ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:4443d9d710b9471e8ef658d509358bd92602498e67161b9280474bce0bb0decd",
help="Build docker image",
)
p.add_argument(
Expand Down
4 changes: 2 additions & 2 deletions docs/environment_setup_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ If having trouble building on a system, we will typically want to eliminate envi
Our open-source binaries are typically built within a [manylinux container](https://github.com/pypa/manylinux) (see [the docker file](../dockerfiles/build_manylinux_x86_64.Dockerfile)). These images are versioned by the glibc version they target, and if dependencies are controlled carefully, binaries built on them should work on systems with the same or higher glibc version.

Present version: glibc 2.28
Based on upstream: AlmaLinux 8 with gcc toolset 12
Based on upstream: AlmaLinux 8 with gcc toolset 13

While this generally implies that the project should build on similarly versioned alternative EL distributions, do note that we install several upgraded tools (see dockerfile above) in our standard CI pipelines.

Reference image: `ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:2f3ebd0beb04c449fdb36933e54bdc69483b914fb9005594d3fc9444c206b54b`
Reference image: `ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:4443d9d710b9471e8ef658d509358bd92602498e67161b9280474bce0bb0decd`

### Ubuntu 22.04

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From b58aca008a73e791872fe77858b7e5748f6b1508 Mon Sep 17 00:00:00 2001
From: Joseph Macaranas <[email protected]>
Date: Thu, 9 Oct 2025 23:49:19 -0400
Subject: [PATCH] Add gcc-toolset-13 prefix detection

---
clang/lib/Driver/ToolChains/Gnu.cpp | 1 +
1 file changed, 1 insertion(+)

diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index bf2a444520a2..fe2cb025a86c 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2441,6 +2441,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
D.getVFS().exists("/opt/rh")) {
// TODO: We may want to remove this, since the functionality
// can be achieved using config files.
+ Prefixes.push_back("/opt/rh/gcc-toolset-13/root/usr");
Prefixes.push_back("/opt/rh/gcc-toolset-12/root/usr");
Prefixes.push_back("/opt/rh/gcc-toolset-11/root/usr");
Prefixes.push_back("/opt/rh/gcc-toolset-10/root/usr");
--
2.48.1

7 changes: 3 additions & 4 deletions third-party/host-blas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
CMAKE_ARGS
"-DSOURCE_DIR=${_source_dir}"
-DBUILD_SHARED_LIBS=ON
# TODO: DYNAMIC_ARCH=ON produces illegal elf files
# See: https://github.com/ROCm/TheRock/issues/83
-DDYNAMIC_ARCH=OFF
-DC_LAPACK=ON
-DTARGET=CORE2
-DDYNAMIC_ARCH=ON
-DDYNAMIC_OLDER=ON
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need dynamic_older?

from the changelog:

Version 0.3.1
01-Jul-2018
...
x86_64:
retired some older targets of DYNAMIC_ARCH builds to a new option DYNAMIC_OLDER,
	  this affects PENRYN,DUNNINGTON,OPTERON,OPTERON_SSE3,BOBCAT,ATOM and NANO
	  (which will still be supported via the slower PRESCOTT kernels when this option is not set)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't comment specifically about need, but I picked for breadth of CPU coverage for potential users of TheRock.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MSVC seems to have issues with small matrix optimizations required to support older CPUs, so Windows build compatibility might dictate how far back the build flags can go.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can compile this with [amd]clang instead of msvc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment block has me concerned about trying that. https://github.com/ROCm/TheRock/blob/main/core/CMakeLists.txt#L2C1-L11C10

I'll see if removing DYNAMIC_OLDER fixes the issue. If not, I will try HASWELL which should be a minimum baseline for x86_64 CPUs from Intel and AMD from the past decade. I think I remember one build recipe picking that one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, looks like MSVC's limitation with DYNAMIC_ARCH is known OpenMathLib/OpenBLAS#2826 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My latest set of build flags, which limits DYNAMIC_ARCH to Linux, while still leveraging a TARGET that should support almost all AMD and Intel CPUs from the past decade is able to compile on both our Linux and Windows workflows now.

-DBUILD_TESTING=OFF
EXTRA_DEPENDS
"${_download_stamp}"
Expand Down
Loading