Skip to content

Commit fe89c6c

Browse files
Resolve conflicts
1 parent c4d56f9 commit fe89c6c

9 files changed

+47
-67
lines changed

math-libs/BLAS/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,14 @@ therock_cmake_subproject_declare(hipBLASLt
6262
-DHIPBLASLT_ENABLE_MARKER=OFF
6363
-DBUILD_CLIENTS_TESTS=${THEROCK_BUILD_TESTING}
6464
-DBUILD_CLIENTS_BENCHMARKS=${THEROCK_BUILD_TESTING}
65+
# TODO(#376): rocRoller is broken
66+
-DUSE_ROCROLLER=OFF
6567
COMPILER_TOOLCHAIN
6668
amd-hip
6769
BUILD_DEPS
6870
hipBLAS-common
6971
rocm-cmake
72+
therock-boost
7073
therock-msgpack-cxx
7174
RUNTIME_DEPS
7275
hip-clr

patches/amd-mainline/hipBLASLt/0001-Update-find_package-for-msgpack-to-work-with-5.x-and.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From e148639debe62686b3572b5aeccb50608464120a Mon Sep 17 00:00:00 2001
1+
From 28d221b97cf54db4b88bfbb923d6569a7065dd9f Mon Sep 17 00:00:00 2001
22
From: Stella Laurenzo <stellaraccident@gmail.com>
33
Date: Mon, 3 Feb 2025 20:28:58 -0800
4-
Subject: [PATCH 1/5] Update find_package for msgpack to work with 5.x and 6.x.
4+
Subject: [PATCH 1/7] Update find_package for msgpack to work with 5.x and 6.x.
55

66
Adapted from: https://github.com/msgpack/msgpack-c/wiki/Q%26A#how-to-support-both-msgpack-c-c-version-5x-and-6x-
77

@@ -11,10 +11,10 @@ Note that 6.x also defines compile definitions that must be respected.
1111
1 file changed, 13 insertions(+), 15 deletions(-)
1212

1313
diff --git a/tensilelite/Tensile/Source/lib/CMakeLists.txt b/tensilelite/Tensile/Source/lib/CMakeLists.txt
14-
index d055b635..a8a98690 100644
14+
index d6ad1df3..813f4848 100644
1515
--- a/tensilelite/Tensile/Source/lib/CMakeLists.txt
1616
+++ b/tensilelite/Tensile/Source/lib/CMakeLists.txt
17-
@@ -96,22 +96,20 @@ if(TENSILE_USE_LLVM OR TENSILE_USE_MSGPACK)
17+
@@ -105,22 +105,20 @@ if(TENSILE_USE_LLVM OR TENSILE_USE_MSGPACK)
1818
endif()
1919

2020
if(TENSILE_USE_MSGPACK)
@@ -51,5 +51,5 @@ index d055b635..a8a98690 100644
5151

5252
if(TENSILE_USE_LLVM)
5353
--
54-
2.34.1
54+
2.43.0
5555

patches/amd-mainline/hipBLASLt/0002-Do-not-hard-code-hipBLASLt-to-find-tools-in-opt-rocm.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 0a1aa2f63c351b748af1ae3878ab29f24b6a4e28 Mon Sep 17 00:00:00 2001
1+
From aba1654c5317edcfcef22166f3e5073016627eeb Mon Sep 17 00:00:00 2001
22
From: Stella Laurenzo <stellaraccident@gmail.com>
33
Date: Fri, 7 Mar 2025 12:13:41 -0800
4-
Subject: [PATCH 2/8] Do not hard-code hipBLASLt to find tools in /opt/rocm and
4+
Subject: [PATCH 2/7] Do not hard-code hipBLASLt to find tools in /opt/rocm and
55
propagate configure time PATH.
66

77
* Makes gen_assembly.sh and compile_code_object.sh scripts fail on error vs silently succeeding (`set -e`). These scripts have a suspect design overall, but making them error on failure is a minimal thing that is needed.
@@ -126,5 +126,5 @@ index d542c584..1d57885f 100644
126126
)
127127

128128
--
129-
2.49.0
129+
2.43.0
130130

patches/amd-mainline/hipBLASLt/0003-Find-rocm_smi-via-config-files.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From d150c267b4808eb0abab141116add579158d482d Mon Sep 17 00:00:00 2001
1+
From a50ba02dda81965d094aded79852b0d06fb5a8d6 Mon Sep 17 00:00:00 2001
22
From: Marius Brehler <marius.brehler@amd.com>
33
Date: Wed, 12 Mar 2025 22:39:56 +0000
4-
Subject: [PATCH 3/5] Find `rocm_smi` via config files
4+
Subject: [PATCH 3/7] Find `rocm_smi` via config files
55

66
Use the config files provided by upstream instead of a custom finder.
77
---
@@ -11,7 +11,7 @@ Use the config files provided by upstream instead of a custom finder.
1111
delete mode 100644 tensilelite/Tensile/Source/cmake/FindROCmSMI.cmake
1212

1313
diff --git a/clients/CMakeLists.txt b/clients/CMakeLists.txt
14-
index 02ae47d3..6b662094 100755
14+
index 31a72fe8..96d908e4 100755
1515
--- a/clients/CMakeLists.txt
1616
+++ b/clients/CMakeLists.txt
1717
@@ -97,8 +97,8 @@ if( BUILD_CLIENTS_BENCHMARKS OR BUILD_CLIENTS_TESTS)
@@ -88,5 +88,5 @@ index a6fa375a..00000000
8888
-
8989
-#set(rocm_smi_root "${hip_LIB_INSTALL_DIR}/../../rocm_smi")
9090
--
91-
2.34.1
91+
2.43.0
9292

patches/amd-mainline/hipBLASLt/0004-Fix-finding-BLAS-and-LAPACK.patch

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From c92ac8d8319a6820b3d30f6bef7d70a4bcc64571 Mon Sep 17 00:00:00 2001
1+
From 88f840418f8421862fb83411f8c2eeb85cc8800e Mon Sep 17 00:00:00 2001
22
From: Marius Brehler <marius.brehler@amd.com>
33
Date: Wed, 12 Mar 2025 22:41:27 +0000
4-
Subject: [PATCH 4/5] Fix finding BLAS and LAPACK
4+
Subject: [PATCH 4/7] Fix finding BLAS and LAPACK
55

66
So far it is assumed that NETLIB BLAS and LAPACK are avilable without
77
checking. If they are nore, the build fails when trying to link.
@@ -14,7 +14,7 @@ OpenBLAS.
1414
3 files changed, 7 insertions(+), 5 deletions(-)
1515

1616
diff --git a/clients/CMakeLists.txt b/clients/CMakeLists.txt
17-
index 6b662094..b24ca1c3 100755
17+
index 96d908e4..f69dee9f 100755
1818
--- a/clients/CMakeLists.txt
1919
+++ b/clients/CMakeLists.txt
2020
@@ -92,7 +92,9 @@ if( BUILD_CLIENTS_BENCHMARKS OR BUILD_CLIENTS_TESTS)
@@ -29,10 +29,10 @@ index 6b662094..b24ca1c3 100755
2929

3030
# Find the package ROCmSMI
3131
diff --git a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
32-
index 99ec31f3..0d70d528 100644
32+
index e05b1f09..39aa4e8c 100644
3333
--- a/clients/benchmarks/CMakeLists.txt
3434
+++ b/clients/benchmarks/CMakeLists.txt
35-
@@ -76,9 +76,9 @@ endif()
35+
@@ -80,9 +80,9 @@ endif()
3636
# target_compile_options does not go to linker like CMAKE_CXX_FLAGS does, so manually add
3737
if (NOT WIN32)
3838
if (BUILD_CUDA)
@@ -45,10 +45,10 @@ index 99ec31f3..0d70d528 100644
4545
list( APPEND COMMON_LINK_LIBS "-lm -lstdc++fs")
4646

4747
diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
48-
index cbedcfa4..eec47b6f 100644
48+
index 694670a3..64cd576a 100644
4949
--- a/clients/gtest/CMakeLists.txt
5050
+++ b/clients/gtest/CMakeLists.txt
51-
@@ -85,9 +85,9 @@ target_compile_options(hipblaslt-test PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${COMMON
51+
@@ -90,9 +90,9 @@ target_compile_options(hipblaslt-test PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${COMMON
5252
# target_compile_options does not go to linker like CMAKE_CXX_FLAGS does, so manually add
5353

5454
if (BUILD_CUDA)
@@ -61,5 +61,5 @@ index cbedcfa4..eec47b6f 100644
6161

6262
list( APPEND COMMON_LINK_LIBS "-lm -lstdc++fs")
6363
--
64-
2.34.1
64+
2.43.0
6565

patches/amd-mainline/hipBLASLt/0005-Update-packaging-in-pip-venv-to-stabilize-setuptools.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
From 4311b6c3ec948bd819a3413d83435307378ccaa8 Mon Sep 17 00:00:00 2001
1+
From a6becad02a9019ebef81ca4a5f451cab3e36b9c9 Mon Sep 17 00:00:00 2001
22
From: Scott Todd <scott.todd0@gmail.com>
33
Date: Thu, 6 Mar 2025 15:17:08 -0800
4-
Subject: [PATCH 5/5] Update 'packaging' in pip venv to stabilize setuptools.
4+
Subject: [PATCH 5/7] Update 'packaging' in pip venv to stabilize setuptools.
55

66
When using setuptools>=71.0.0 and packaging<22.0, setuptools may fail with `TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'`.
77
---
88
cmake/virtualenv.cmake | 4 ++++
99
1 file changed, 4 insertions(+)
1010

1111
diff --git a/cmake/virtualenv.cmake b/cmake/virtualenv.cmake
12-
index 82bb6d94..a80fb337 100644
12+
index 7b4a78fe..96531ad2 100644
1313
--- a/cmake/virtualenv.cmake
1414
+++ b/cmake/virtualenv.cmake
1515
@@ -35,6 +35,10 @@ function(virtualenv_install)
@@ -24,5 +24,5 @@ index 82bb6d94..a80fb337 100644
2424
COMMAND ${VIRTUALENV_BIN_DIR}/${VIRTUALENV_PYTHON_EXENAME} -m pip install ${ARGN}
2525
COMMAND_ECHO STDOUT
2626
--
27-
2.34.1
27+
2.43.0
2828

patches/amd-mainline/hipBLASLt/0006-Build-hipblas-sequence-on-non-Ubuntu-systems.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 6a0725acc8e9b74679904f77502019881857174e Mon Sep 17 00:00:00 2001
1+
From 294d4db2ad360dd6603cf7358d3410ad19f75e72 Mon Sep 17 00:00:00 2001
22
From: Marius Brehler <marius.brehler@amd.com>
33
Date: Tue, 18 Mar 2025 12:14:21 +0000
44
Subject: [PATCH 6/7] Build `hipblas-sequence` on non-Ubuntu systems
@@ -8,7 +8,7 @@ Subject: [PATCH 6/7] Build `hipblas-sequence` on non-Ubuntu systems
88
1 file changed, 30 insertions(+), 34 deletions(-)
99

1010
diff --git a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
11-
index 39aa4e8c..6b5532f5 100644
11+
index 39aa4e8c..1e0f8940 100644
1212
--- a/clients/benchmarks/CMakeLists.txt
1313
+++ b/clients/benchmarks/CMakeLists.txt
1414
@@ -118,42 +118,38 @@ add_executable( hipblaslt-bench-extop-matrixtransform client_extop_matrixtransfo
@@ -57,15 +57,15 @@ index 39aa4e8c..6b5532f5 100644
5757
+ if(NOT LLVM_FOUND)
5858
+ find_package(LLVM REQUIRED CONFIG)
5959
+ endif()
60-
+ endif()
60+
endif()
6161
+ find_library(LLVMObjectYAML_LIBRARY
6262
+ NAMES LLVMObjectYAML
6363
+ PATHS ${LLVM_LIBRARY_DIR})
6464
+ if(LLVMObjectYAML_LIBRARY)
6565
+ target_link_libraries(hipblaslt-sequence PRIVATE LLVMObjectYAML )
6666
+ else()
6767
+ target_link_libraries(hipblaslt-sequence PRIVATE LLVM )
68-
endif()
68+
+ endif()
6969
+ target_include_directories(hipblaslt-sequence PRIVATE ${LLVM_INCLUDE_DIRS})
7070
+ set(ext_bench_list_all ${ext_bench_list_all} hipblaslt-sequence)
7171
+ set( HIPBLASLT_SEQUENCE_YAML "${PROJECT_BINARY_DIR}/staging/sequence.yaml")
@@ -85,5 +85,5 @@ index 39aa4e8c..6b5532f5 100644
8585

8686
foreach( exe ${ext_bench_list_all} )
8787
--
88-
2.49.0
88+
2.43.0
8989

patches/amd-mainline/hipBLASLt/0007-Disable-Boost-detection-and-RocRoller-support.patch

Lines changed: 0 additions & 27 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
From d62d29eaaab3346c619edc33dbec66db9139f2a3 Mon Sep 17 00:00:00 2001
2-
From: Scott Tsai <scottt.tw@gmail.com>
3-
Date: Tue, 8 Apr 2025 04:28:51 +0800
4-
Subject: [PATCH 8/8] tensilelite: make roc-smi binary optional during build
1+
From 121342dcded7994a5fdf19d3256b50ae86f92454 Mon Sep 17 00:00:00 2001
2+
From: Stella Laurenzo <stellaraccident@gmail.com>
3+
Date: Tue, 8 Apr 2025 14:34:29 -0700
4+
Subject: [PATCH 7/7] Skip clock reset if rocm-smi is not available.
55

6+
* Pinning clocks was already conditioned on this, so the cleanup logic should also be.
67
---
7-
tensilelite/Tensile/Common/GlobalParameters.py | 10 +++++++---
8-
1 file changed, 7 insertions(+), 3 deletions(-)
8+
tensilelite/Tensile/Common/GlobalParameters.py | 12 +++++++++---
9+
1 file changed, 9 insertions(+), 3 deletions(-)
910

1011
diff --git a/tensilelite/Tensile/Common/GlobalParameters.py b/tensilelite/Tensile/Common/GlobalParameters.py
11-
index 8ec5f326..5d38fec8 100644
12+
index 8ec5f326..58dd69f4 100644
1213
--- a/tensilelite/Tensile/Common/GlobalParameters.py
1314
+++ b/tensilelite/Tensile/Common/GlobalParameters.py
1415
@@ -549,7 +549,10 @@ def assignGlobalParameters(config, isaInfoMap: Dict[IsaVersion, IsaInfo]):
@@ -19,22 +20,25 @@ index 8ec5f326..5d38fec8 100644
1920
+ try:
2021
+ globalParameters["ROCmSMIPath"] = locateExe(globalParameters["ROCmBinPath"], "rocm-smi")
2122
+ except OSError:
22-
+ pass
23+
+ printWarning("Could not find rocm-smi: features relying on it will be ignored")
2324
globalParameters["ROCmLdPath"] = locateExe(
2425
os.path.join(globalParameters["ROCmPath"], "llvm/bin"), "ld.lld"
2526
)
26-
@@ -625,8 +628,9 @@ def setupRestoreClocks():
27+
@@ -624,9 +627,12 @@ def setupRestoreClocks():
28+
2729
def restoreClocks():
2830
if globalParameters["PinClocks"]:
31+
+ # Clocks will only be pinned if rocm-smi is available, therefore
32+
+ # we only need to restore if found.
2933
rsmi = globalParameters["ROCmSMIPath"]
3034
- subprocess.call([rsmi, "-d", "0", "--resetclocks"])
3135
- subprocess.call([rsmi, "-d", "0", "--setfan", "50"])
32-
+ if rsmi:
36+
+ if rsmi is not None:
3337
+ subprocess.call([rsmi, "-d", "0", "--resetclocks"])
3438
+ subprocess.call([rsmi, "-d", "0", "--setfan", "50"])
3539

3640
atexit.register(restoreClocks)
3741

3842
--
39-
2.49.0
43+
2.43.0
4044

0 commit comments

Comments
 (0)