From fe92ce2ab09413d2dfc38366e6b35a78127dee0c Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Wed, 12 Nov 2025 19:41:18 -0800 Subject: [PATCH] therock update to 7.10-dev from 20251113 Signed-off-by: Mika Laitio --- apps/therock.cfg | 2 +- ...r-scripts-to-init-and-config-therock.patch | 4 +- .../base/0002-rccl-add-more-amd-gpus.patch | 25 +++++---- .../base/0003-build-rccl-on-igpus.patch | 41 --------------- .../0003-enable-rccl-build-on-igpus.patch | 38 ++++++++++++++ ...-and-hip-fixes-for-compiler-warnings.patch | 51 +++++++++---------- 6 files changed, 78 insertions(+), 83 deletions(-) delete mode 100644 patches/therock/release/therock/base/0003-build-rccl-on-igpus.patch create mode 100644 patches/therock/release/therock/base/0003-enable-rccl-build-on-igpus.patch diff --git a/apps/therock.cfg b/apps/therock.cfg index 2129760..d59d76a 100644 --- a/apps/therock.cfg +++ b/apps/therock.cfg @@ -1,6 +1,6 @@ [app_info] APP_NAME=therock -APP_VERSION=cd0270b8be590be0f536121834bfe14c8ea9cc6b +APP_VERSION=e44d9ab59717c12123ee3bcef79f5c7455edc207 PATCH_DIR=release REPO_URL=https://github.com/rocm/therock # PROP_FETCH_REPO_TAGS=YES --> download source code with full history and tags diff --git a/patches/therock/release/therock/base/0001-helper-scripts-to-init-and-config-therock.patch b/patches/therock/release/therock/base/0001-helper-scripts-to-init-and-config-therock.patch index 6fabd7a..4e36393 100644 --- a/patches/therock/release/therock/base/0001-helper-scripts-to-init-and-config-therock.patch +++ b/patches/therock/release/therock/base/0001-helper-scripts-to-init-and-config-therock.patch @@ -1,4 +1,4 @@ -From d11e81f21142b37abed4ea734933020bb588df28 Mon Sep 17 00:00:00 2001 +From 9d70b15efb3219c8bcf5590831ee6789482191ea Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Tue, 16 Sep 2025 17:02:28 -0700 Subject: [PATCH 1/4] helper scripts to init and config therock @@ -111,5 +111,5 @@ index 0000000..9e07727 +pip install "dvc[s3]" +python ./build_tools/fetch_sources.py -- -2.49.0.windows.1 +2.41.3 diff --git a/patches/therock/release/therock/base/0002-rccl-add-more-amd-gpus.patch b/patches/therock/release/therock/base/0002-rccl-add-more-amd-gpus.patch index e91f71c..5e44aba 100644 --- a/patches/therock/release/therock/base/0002-rccl-add-more-amd-gpus.patch +++ b/patches/therock/release/therock/base/0002-rccl-add-more-amd-gpus.patch @@ -1,4 +1,4 @@ -From 914f060e7e1d23c4e66eaf772050aba25ff4f145 Mon Sep 17 00:00:00 2001 +From 337dc3f06b08541e09f94bb66933d0c15bcc0688 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Thu, 25 Sep 2025 13:34:38 -0700 Subject: [PATCH 2/4] rccl add more amd gpus @@ -12,16 +12,16 @@ Subject: [PATCH 2/4] rccl add more amd gpus Signed-off-by: Mika Laitio --- - .../rccl/0001-rccl-add-more-amd-gpus.patch | 67 +++++++++++++++++++ - 1 file changed, 67 insertions(+) + .../rccl/0001-rccl-add-more-amd-gpus.patch | 66 +++++++++++++++++++ + 1 file changed, 66 insertions(+) create mode 100644 patches/amd-mainline/rccl/0001-rccl-add-more-amd-gpus.patch diff --git a/patches/amd-mainline/rccl/0001-rccl-add-more-amd-gpus.patch b/patches/amd-mainline/rccl/0001-rccl-add-more-amd-gpus.patch new file mode 100644 -index 0000000..d539791 +index 0000000..7d8ea14 --- /dev/null +++ b/patches/amd-mainline/rccl/0001-rccl-add-more-amd-gpus.patch -@@ -0,0 +1,67 @@ +@@ -0,0 +1,66 @@ +From da85566834579cfff0a2ab91b2d9a419c944fde7 Mon Sep 17 00:00:00 2001 +From: Mika Laitio +Date: Mon, 22 Sep 2025 01:25:44 -0700 @@ -47,7 +47,7 @@ index 0000000..d539791 +@@ -26,7 +26,8 @@ + { __atomic_store_n((DST), (SRC), __ATOMIC_SEQ_CST); } + #endif -+ ++ +-#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1200__) || defined(__gfx1201__) ++#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || \ ++ defined(__gfx1150__) || defined(__gfx1151__) || defined(__gfx1200__) || defined(__gfx1201__) @@ -60,7 +60,7 @@ index 0000000..d539791 ++++ b/src/include/rccl_float8.h +@@ -41,7 +41,11 @@ typedef struct + } rccl_bfloat8; -+ ++ + // __cplusplus < 201103L || (!defined(__HIP_PLATFORM_AMD__) && !defined(__HIPCC__)) +-#elif HIP_VERSION >= 60300000 && !(defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1030__)) ++#elif HIP_VERSION >= 60300000 && \ @@ -68,16 +68,16 @@ index 0000000..d539791 ++ defined(__gfx1150__) || defined(__gfx1151__) || \ ++ defined(__gfx1030__) || defined(__gfx1031__) || defined(__gfx1032__) || defined(__gfx1034__) || \ ++ defined(__gfx1035__) || defined(__gfx1036__) ) -+ ++ + #include -+ ++ +diff --git a/tools/JitterBench/Common.hpp b/tools/JitterBench/Common.hpp +index bad12a1b..7489e18f 100644 +--- a/tools/JitterBench/Common.hpp ++++ b/tools/JitterBench/Common.hpp +@@ -43,7 +43,9 @@ THE SOFTWARE. + #endif -+ ++ + // Macro for collecting HW_REG_HW_ID +-#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__NVCC__) ++#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || \ @@ -86,9 +86,8 @@ index 0000000..d539791 + #define GetHwId(val) \ + val = 0 + #else -+-- ++-- +2.43.0 -+ -- -2.49.0.windows.1 +2.41.3 diff --git a/patches/therock/release/therock/base/0003-build-rccl-on-igpus.patch b/patches/therock/release/therock/base/0003-build-rccl-on-igpus.patch deleted file mode 100644 index 62bd007..0000000 --- a/patches/therock/release/therock/base/0003-build-rccl-on-igpus.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 317d7444f04d8b2d4d81c621a5aa7c91207e459c Mon Sep 17 00:00:00 2001 -From: Mika Laitio -Date: Tue, 30 Sep 2025 05:56:14 +0000 -Subject: [PATCH 3/4] build rccl on igpus - -Signed-off-by: Mika Laitio ---- - cmake/therock_amdgpu_targets.cmake | 15 +++------------ - 1 file changed, 3 insertions(+), 12 deletions(-) - -diff --git a/cmake/therock_amdgpu_targets.cmake b/cmake/therock_amdgpu_targets.cmake -index a72016c..a43e120 100644 ---- a/cmake/therock_amdgpu_targets.cmake -+++ b/cmake/therock_amdgpu_targets.cmake -@@ -98,20 +98,11 @@ therock_add_amdgpu_target(gfx1102 "AMD RX 7700S/Framework Laptop 16" FAMILY dgpu - EXCLUDE_TARGET_PROJECTS - hipBLASLt # https://github.com/ROCm/TheRock/issues/1062 - ) --therock_add_amdgpu_target(gfx1103 "AMD Radeon 780M Laptop iGPU" FAMILY igpu-all gfx110X-all gfx110X-igpu -- EXCLUDE_TARGET_PROJECTS -- rccl # https://github.com/ROCm/TheRock/issues/150 --) -+therock_add_amdgpu_target(gfx1103 "AMD Radeon 780M Laptop iGPU" FAMILY igpu-all gfx110X-all gfx110X-igpu) - - # gfx115X family --therock_add_amdgpu_target(gfx1150 "AMD Strix Point iGPU" FAMILY igpu-all gfx115X-all gfx115X-igpu -- EXCLUDE_TARGET_PROJECTS -- rccl # https://github.com/ROCm/TheRock/issues/150 --) --therock_add_amdgpu_target(gfx1151 "AMD Strix Halo iGPU" FAMILY igpu-all gfx115X-all gfx115X-igpu -- EXCLUDE_TARGET_PROJECTS -- rccl # https://github.com/ROCm/TheRock/issues/150 --) -+therock_add_amdgpu_target(gfx1150 "AMD Strix Point iGPU" FAMILY igpu-all gfx115X-all gfx115X-igpu) -+therock_add_amdgpu_target(gfx1151 "AMD Strix Halo iGPU" FAMILY igpu-all gfx115X-all gfx115X-igpu) - - # gfx120X family - therock_add_amdgpu_target(gfx1200 "AMD RX 9060 / XT" FAMILY dgpu-all gfx120X-all) --- -2.49.0.windows.1 - diff --git a/patches/therock/release/therock/base/0003-enable-rccl-build-on-igpus.patch b/patches/therock/release/therock/base/0003-enable-rccl-build-on-igpus.patch new file mode 100644 index 0000000..5f5e4bb --- /dev/null +++ b/patches/therock/release/therock/base/0003-enable-rccl-build-on-igpus.patch @@ -0,0 +1,38 @@ +From 29f60d88e26b92a12f35c0d18daa067614e038ef Mon Sep 17 00:00:00 2001 +From: Mika Laitio +Date: Wed, 12 Nov 2025 20:41:36 -0800 +Subject: [PATCH 3/4] enable rccl build on igpus + +Signed-off-by: Mika Laitio +--- + cmake/therock_amdgpu_targets.cmake | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/cmake/therock_amdgpu_targets.cmake b/cmake/therock_amdgpu_targets.cmake +index d19c04c..f8cc742 100644 +--- a/cmake/therock_amdgpu_targets.cmake ++++ b/cmake/therock_amdgpu_targets.cmake +@@ -130,7 +130,6 @@ therock_add_amdgpu_target(gfx1102 "AMD RX 7700S/Framework Laptop 16" FAMILY dgpu + therock_add_amdgpu_target(gfx1103 "AMD Radeon 780M Laptop iGPU" FAMILY igpu-all gfx110X-all gfx110X-igpu + EXCLUDE_TARGET_PROJECTS + hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 +- rccl # https://github.com/ROCm/TheRock/issues/150 + rocWMMA # https://github.com/ROCm/TheRock/issues/1944 + ) + +@@ -138,12 +137,10 @@ therock_add_amdgpu_target(gfx1103 "AMD Radeon 780M Laptop iGPU" FAMILY igpu-all + therock_add_amdgpu_target(gfx1150 "AMD Strix Point iGPU" FAMILY igpu-all gfx115X-all gfx115X-igpu + EXCLUDE_TARGET_PROJECTS + hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 +- rccl # https://github.com/ROCm/TheRock/issues/150 + ) + therock_add_amdgpu_target(gfx1151 "AMD Strix Halo iGPU" FAMILY igpu-all gfx115X-all gfx115X-igpu + EXCLUDE_TARGET_PROJECTS + hipSPARSELt # https://github.com/ROCm/TheRock/issues/2042 +- rccl # https://github.com/ROCm/TheRock/issues/150 + ) + + # gfx120X family +-- +2.41.3 + diff --git a/patches/therock/release/therock/base/0004-clr-and-hip-fixes-for-compiler-warnings.patch b/patches/therock/release/therock/base/0004-clr-and-hip-fixes-for-compiler-warnings.patch index a86f9ee..cf02c81 100644 --- a/patches/therock/release/therock/base/0004-clr-and-hip-fixes-for-compiler-warnings.patch +++ b/patches/therock/release/therock/base/0004-clr-and-hip-fixes-for-compiler-warnings.patch @@ -1,4 +1,4 @@ -From ea8be5ff1ef4752589618ebdd079cc08ed723f97 Mon Sep 17 00:00:00 2001 +From 0846f1c8ab014ed0ad6f9bd1f01c691dbaf1f4bd Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Wed, 8 Oct 2025 00:14:39 +0000 Subject: [PATCH 4/4] clr and hip fixes for compiler warnings @@ -21,16 +21,16 @@ include/hip/linker_types.h:138:42: warning: no newline at end of file [-Wnewline Signed-off-by: Mika Laitio --- - ...r-and-hip-fix-various-build-warnings.patch | 188 ++++++++++++++++++ - 1 file changed, 188 insertions(+) + ...r-and-hip-fix-various-build-warnings.patch | 187 ++++++++++++++++++ + 1 file changed, 187 insertions(+) create mode 100644 patches/amd-mainline/rocm-systems/0009-clr-and-hip-fix-various-build-warnings.patch diff --git a/patches/amd-mainline/rocm-systems/0009-clr-and-hip-fix-various-build-warnings.patch b/patches/amd-mainline/rocm-systems/0009-clr-and-hip-fix-various-build-warnings.patch new file mode 100644 -index 0000000..73c499b +index 0000000..e781615 --- /dev/null +++ b/patches/amd-mainline/rocm-systems/0009-clr-and-hip-fix-various-build-warnings.patch -@@ -0,0 +1,188 @@ +@@ -0,0 +1,187 @@ +From 5179496efaa930eb7b266d9ae7476ef819ff02a7 Mon Sep 17 00:00:00 2001 +From: Mika Laitio +Date: Tue, 7 Oct 2025 23:31:11 +0000 @@ -69,9 +69,9 @@ index 0000000..73c499b +--- a/projects/clr/hipamd/include/hip/amd_detail/host_defines.h ++++ b/projects/clr/hipamd/include/hip/amd_detail/host_defines.h +@@ -232,7 +232,7 @@ typedef __hip_internal::int64_t __hip_int64_t; -+ ++ + #define __forceinline__ inline __attribute__((always_inline)) -+ ++ +-#if __HIP_NO_IMAGE_SUPPORT ++#if defined(__HIP_NO_IMAGE_SUPPORT) && __HIP_NO_IMAGE_SUPPORT + #define __hip_img_chk__ \ @@ -93,43 +93,43 @@ index 0000000..73c499b ++ hipError_t OpenHandle(ihipIpcEventHandle_t* handle) override; ++ hipError_t synchronize() override; ++ hipError_t query() override; -+ ++ +- hipError_t streamWait(hip::Stream* stream, uint flags); ++ hipError_t streamWait(hip::Stream* stream, uint flags) override; -+ ++ + hipError_t recordCommand(amd::Command*& command, amd::HostQueue* queue, uint32_t flags = 0, + bool batch_flush = true) override; +- hipError_t enqueueRecordCommand(hip::Stream* stream, amd::Command* command); ++ hipError_t enqueueRecordCommand(hip::Stream* stream, amd::Command* command) override; + }; -+ -+ ++ ++ +diff --git a/projects/clr/hipamd/src/hip_graph_internal.hpp b/projects/clr/hipamd/src/hip_graph_internal.hpp +index 0d212e3..a0d22e2 100644 +--- a/projects/clr/hipamd/src/hip_graph_internal.hpp ++++ b/projects/clr/hipamd/src/hip_graph_internal.hpp +@@ -2689,7 +2689,7 @@ class hipGraphExternalSemSignalNode : public GraphNode { -+ ++ + GraphNode* clone() const override { return new hipGraphExternalSemSignalNode(*this); } -+ ++ +- hipError_t CreateCommand(hip::Stream* stream) { ++ hipError_t CreateCommand(hip::Stream* stream) override { + hipError_t status = GraphNode::CreateCommand(stream); + if (status != hipSuccess) { + return status; +@@ -2742,7 +2742,7 @@ class hipGraphExternalSemWaitNode : public GraphNode { -+ ++ + GraphNode* clone() const override { return new hipGraphExternalSemWaitNode(*this); } -+ ++ +- hipError_t CreateCommand(hip::Stream* stream) { ++ hipError_t CreateCommand(hip::Stream* stream) override { + hipError_t status = GraphNode::CreateCommand(stream); + if (status != hipSuccess) { + return status; +@@ -2794,7 +2794,7 @@ class hipGraphBatchMemOpNode : public GraphNode { -+ ++ + GraphNode* clone() const override { return new hipGraphBatchMemOpNode(*this); } -+ ++ +- hipError_t CreateCommand(hip::Stream* stream) { ++ hipError_t CreateCommand(hip::Stream* stream) override { + hipError_t status = GraphNode::CreateCommand(stream); @@ -155,7 +155,7 @@ index 0000000..73c499b +@@ -536,7 +536,7 @@ def generate_prof_header(f, api_map, callback_ids, opts_map): + f.write('#define INIT_'+ name + '_CB_ARGS_DATA(cb_data) {};\n') + f.write('\n#define INIT_NONE_CB_ARGS_DATA(cb_data) {};\n') -+ ++ +- f.write('\n#if HIP_PROF_HIP_API_STRING\n') ++ f.write('\n#if defined(HIP_PROF_HIP_API_STRING) && HIP_PROF_HIP_API_STRING\n') + # Generating the method for the API args filling @@ -168,7 +168,7 @@ index 0000000..73c499b +@@ -502,7 +502,7 @@ class OneMemoryArgCommand : public Command { + memory_->retain(); + } -+ ++ +- virtual void releaseResources() { ++ virtual void releaseResources() override { + memory_->release(); @@ -176,7 +176,7 @@ index 0000000..73c499b + Command::releaseResources(); +@@ -510,14 +510,14 @@ class OneMemoryArgCommand : public Command { + } -+ ++ + //! Release all pinned memory for this command +- virtual void ReleasePinnedMemory() { ++ virtual void ReleasePinnedMemory() override { @@ -188,7 +188,7 @@ index 0000000..73c499b + //! Release all pinned memory for this command +- virtual bool IsMemoryPinned() const { return !pinned_memory_.empty(); } ++ virtual bool IsMemoryPinned() const override { return !pinned_memory_.empty(); } -+ ++ + //! Adds pinned memory, used in this command for later release + virtual void AddPinnedMemory(Memory* pinned) override { pinned_memory_.push_back(pinned); } +diff --git a/projects/hip/include/hip/hip_common.h b/projects/hip/include/hip/hip_common.h @@ -198,7 +198,7 @@ index 0000000..73c499b +@@ -62,7 +62,7 @@ THE SOFTWARE. + #define HIP_INTERNAL_EXPORTED_API + #endif -+ ++ +-#if __HIP_DEVICE_COMPILE__ == 0 ++#if !defined(__HIP_DEVICE_COMPILE__) || ( __HIP_DEVICE_COMPILE__ == 0) + // 32-bit Atomics @@ -211,14 +211,13 @@ index 0000000..73c499b +@@ -135,4 +135,5 @@ typedef enum hipLibraryOption_e { + #error ("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__"); + #endif -+ ++ +-#endif // HIP_INCLUDE_HIP_LINKER_TYPES_H +\ No newline at end of file ++#endif // HIP_INCLUDE_HIP_LINKER_TYPES_H ++ -+-- ++-- +2.43.0 -+ -- -2.49.0.windows.1 +2.41.3