Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 apps/therock.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <mika.laitio@amd.com>
Date: Tue, 16 Sep 2025 17:02:28 -0700
Subject: [PATCH 1/4] helper scripts to init and config therock
Expand Down Expand Up @@ -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

Original file line number Diff line number Diff line change
@@ -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 <mika.laitio@amd.com>
Date: Thu, 25 Sep 2025 13:34:38 -0700
Subject: [PATCH 2/4] rccl add more amd gpus
Expand All @@ -12,16 +12,16 @@ Subject: [PATCH 2/4] rccl add more amd gpus

Signed-off-by: Mika Laitio <mika.laitio@amd.com>
---
.../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 <mika.laitio@amd.com>
+Date: Mon, 22 Sep 2025 01:25:44 -0700
Expand All @@ -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__)
Expand All @@ -60,24 +60,24 @@ 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 && \
++ !(defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || \
++ defined(__gfx1150__) || defined(__gfx1151__) || \
++ defined(__gfx1030__) || defined(__gfx1031__) || defined(__gfx1032__) || defined(__gfx1034__) || \
++ defined(__gfx1035__) || defined(__gfx1036__) )
+
+
+ #include <hip/hip_fp8.h>
+
+
+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__) || \
Expand All @@ -86,9 +86,8 @@ index 0000000..d539791
+ #define GetHwId(val) \
+ val = 0
+ #else
+--
+--
+2.43.0
+
--
2.49.0.windows.1
2.41.3

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 29f60d88e26b92a12f35c0d18daa067614e038ef Mon Sep 17 00:00:00 2001
From: Mika Laitio <lamikr@gmail.com>
Date: Wed, 12 Nov 2025 20:41:36 -0800
Subject: [PATCH 3/4] enable rccl build on igpus

Signed-off-by: Mika Laitio <lamikr@gmail.com>
---
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

Original file line number Diff line number Diff line change
@@ -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 <mika.laitio@amd.com>
Date: Wed, 8 Oct 2025 00:14:39 +0000
Subject: [PATCH 4/4] clr and hip fixes for compiler warnings
Expand All @@ -21,16 +21,16 @@ include/hip/linker_types.h:138:42: warning: no newline at end of file [-Wnewline

Signed-off-by: Mika Laitio <mika.laitio@amd.com>
---
...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 <mika.laitio@amd.com>
+Date: Tue, 7 Oct 2025 23:31:11 +0000
Expand Down Expand Up @@ -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__ \
Expand All @@ -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);
Expand All @@ -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
Expand All @@ -168,15 +168,15 @@ index 0000000..73c499b
+@@ -502,7 +502,7 @@ class OneMemoryArgCommand : public Command {
+ memory_->retain();
+ }
+
+
+- virtual void releaseResources() {
++ virtual void releaseResources() override {
+ memory_->release();
+ DEBUG_ONLY(memory_ = NULL);
+ Command::releaseResources();
+@@ -510,14 +510,14 @@ class OneMemoryArgCommand : public Command {
+ }
+
+
+ //! Release all pinned memory for this command
+- virtual void ReleasePinnedMemory() {
++ virtual void ReleasePinnedMemory() override {
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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