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
9 changes: 5 additions & 4 deletions apps/therock.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ CMD_EXEC_DIR=${RCB_APP_SRC_DIR}

CMD_CLEAN=RCB_CALLBACK__DELETE_APP_SRC_SUBDIR build
RCB_CALLBACK__RESET_APP_SRC_REPOSITORY
CMD_PRE_CONFIG = ./rcb_pre_config.sh
CMD_CONFIG = ./rcb_config.sh
CMD_BUILD = ./rcb_build.sh
CMD_PRE_CONFIG = ./rcb_pre_config.py
CMD_CONFIG = ./rcb_config.py
CMD_BUILD = ./rcb_build.py
# this file can be used for verifying that rocm_sdk build is ready
CMD_INSTALL = echo "rockbuilder_therock: ${RCB_APP_VERSION}" > ${RCB_APP_SRC_DIR}/build/dist/rocm/.info/rcb_rocm_sdk_src_version
CMD_INSTALL_LINUX = echo "rockbuilder_therock: ${RCB_APP_VERSION}" > ${RCB_APP_SRC_DIR}/build/dist/rocm/.info/rcb_rocm_sdk_src_version
CMD_INSTALL_WINDOWS = echo set "rockbuilder_therock: ${RCB_APP_VERSION}" > ${RCB_APP_SRC_DIR}\build\dist\rocm\.info\rcb_rocm_sdk_src_version
4 changes: 4 additions & 0 deletions lib_python/repo_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def _exec_subprocess_cmd(self, exec_cmd, exec_dir):
ret = True
if exec_cmd is not None:
exec_dir = self._replace_env_variables(exec_dir)
first_token = exec_cmd.split()[0] if exec_cmd.strip() else ""
if first_token.endswith(".py"):
python_cmd = "python" if self.is_posix == False else "python3"
exec_cmd = python_cmd + " " + exec_cmd
print("exec_cmd: " + exec_cmd + ", exec_dir: " + exec_dir)
# capture_output=True --> can print output after process exist, not possible to see the output during the build time
# capture_output=False --> can print output only during build time
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0d57383e222d54431975788d8ced7b193fdce579 Mon Sep 17 00:00:00 2001
From 093328301924b6425ddf97415e8196b9f7ec6d3b 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, config and build therock
Subject: [PATCH 1/8] helper scripts to init, config and build therock

Signed-off-by: Mika Laitio <mika.laitio@amd.com>
---
Expand Down Expand Up @@ -119,7 +119,7 @@ index 0000000..09a68f8
+python ./build_tools/fetch_sources.py
diff --git a/rcb_pre_config.sh b/rcb_pre_config.sh
new file mode 100755
index 0000000..5bcb0ec
index 0000000..29c47d2
--- /dev/null
+++ b/rcb_pre_config.sh
@@ -0,0 +1,24 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 3080ad06c3954af05ca4ef8b428c1ef11ee3720d Mon Sep 17 00:00:00 2001
From 0122553474cadd3a47067ebf8063c9cbcc9ae6db 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 2/4] clr and hip fixes for compiler warnings
Subject: [PATCH 2/8] clr and hip fixes for compiler warnings

Fix warnings that are showed when building for example
the clr project itself or other projects like miopen
Expand Down Expand Up @@ -31,7 +31,7 @@ Signed-off-by: Mika Laitio <mika.laitio@amd.com>

diff --git a/patches/amd-mainline/rocm-systems/0004-clr-and-hip-fix-various-build-warnings.patch b/patches/amd-mainline/rocm-systems/0004-clr-and-hip-fix-various-build-warnings.patch
new file mode 100644
index 00000000..da185ef2
index 0000000..da185ef
--- /dev/null
+++ b/patches/amd-mainline/rocm-systems/0004-clr-and-hip-fix-various-build-warnings.patch
@@ -0,0 +1,86 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From be0e6aa2ecbc75d14934ec4510812fb4e1afd6fa Mon Sep 17 00:00:00 2001
From dcc97adfea807e1f9b5a29af76129680b6629d7f Mon Sep 17 00:00:00 2001
From: Mika Laitio <mika.laitio@amd.com>
Date: Thu, 27 Nov 2025 03:52:07 +0000
Subject: [PATCH 3/4] set LLVM_DEFAULT_TARGET_TRIPLE if specified
Subject: [PATCH 3/8] set LLVM_DEFAULT_TARGET_TRIPLE if specified

Set target triple when compiling the amd-llvm
if environment variable
Expand All @@ -14,10 +14,10 @@ Signed-off-by: Mika Laitio <mika.laitio@amd.com>
1 file changed, 3 insertions(+)

diff --git a/compiler/CMakeLists.txt b/compiler/CMakeLists.txt
index 9db31320..d31e76c5 100644
index eee0b5d..35224dc 100644
--- a/compiler/CMakeLists.txt
+++ b/compiler/CMakeLists.txt
@@ -10,6 +10,9 @@ if(THEROCK_ENABLE_COMPILER)
@@ -13,6 +13,9 @@ if(THEROCK_ENABLE_COMPILER)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
list(APPEND _extra_llvm_cmake_args "-DLLVM_ENABLE_PEDANTIC=OFF")
endif()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 5bc2ee3b57b152f052742a50e4bd9ba55bc86bc7 Mon Sep 17 00:00:00 2001
From c4ee5a76694504ac0c25a3edda8db651a5819b10 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 4/4] rccl add more amd gpus
Subject: [PATCH 4/8] rccl add more amd gpus

- disable trace_hwreg assembly command
s_getreg_b32 HW_REG_HW_ID for gpus and igpus's that
Expand All @@ -18,7 +18,7 @@ Signed-off-by: Mika Laitio <mika.laitio@amd.com>

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 00000000..d5397916
index 0000000..d539791
--- /dev/null
+++ b/patches/amd-mainline/rccl/0001-rccl-add-more-amd-gpus.patch
@@ -0,0 +1,67 @@
Expand Down
58 changes: 58 additions & 0 deletions patches/therock/release/therock/base/0005-gfx90a-xnack.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
From 36609d5868d2447929aea796dafcb07303fd675b Mon Sep 17 00:00:00 2001
From: Mika Laitio <mika.laitio@amd.com>
Date: Mon, 9 Mar 2026 19:41:21 -0700
Subject: [PATCH 5/8] gfx90a xnack+

Signed-off-by: Mika Laitio <mika.laitio@amd.com>
---
cmake/therock_sanitizers.cmake | 6 +++---
rcb_config.sh | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmake/therock_sanitizers.cmake b/cmake/therock_sanitizers.cmake
index 318ab72..13773e4 100644
--- a/cmake/therock_sanitizers.cmake
+++ b/cmake/therock_sanitizers.cmake
@@ -29,7 +29,7 @@ function(therock_sanitizer_configure
endif()

# Our own toolchains get ASAN enabled consistently.
- # ASAN: Full host+device address sanitizer (xnack+ GPU targets for gfx942, gfx950)
+ # ASAN: Full host+device address sanitizer (xnack+ GPU targets for gfx90a, gfx942, gfx950)
# HOST_ASAN: Host-only address sanitizer (no device-side instrumentation)
set(_stanza)
if(_sanitizer STREQUAL "ASAN" OR _sanitizer STREQUAL "HOST_ASAN")
@@ -51,7 +51,7 @@ function(therock_sanitizer_configure
# Device-side ASAN: Only for full ASAN mode, not HOST_ASAN.
# Filter GPU_TARGETS to enable xnack+ mode only for gfx targets that support it.
if(_sanitizer STREQUAL "ASAN")
- string(APPEND _stanza "list(TRANSFORM GPU_TARGETS REPLACE \"^(gfx942|gfx950)$\" \"\\\\1:xnack+\")\n")
+ string(APPEND _stanza "list(TRANSFORM GPU_TARGETS REPLACE \"^(gfx90a|gfx942|gfx950)$\" \"\\\\1:xnack+\")\n")
string(APPEND _stanza "set(AMDGPU_TARGETS \"\${GPU_TARGETS}\")\n")
string(APPEND _stanza "message(STATUS \"Override ASAN GPU_TARGETS = \${GPU_TARGETS}\")\n")
else()
@@ -77,7 +77,7 @@ function(therock_sanitizer_configure
string(APPEND _stanza "add_link_options($<$<LINK_LANGUAGE:C,CXX>:-fsanitize=thread>\n")
string(APPEND _stanza " $<$<AND:$<LINK_LANGUAGE:C,CXX>,$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>>:-shared-libsan>)\n")
# Filter GPU_TARGETS to enable xnack+ mode only for gfx targets that support it.
- string(APPEND _stanza "list(TRANSFORM GPU_TARGETS REPLACE \"^(gfx942|gfx950)$\" \"\\\\1:xnack+\")\n")
+ string(APPEND _stanza "list(TRANSFORM GPU_TARGETS REPLACE \"^(gfx90a|gfx942|gfx950)$\" \"\\\\1:xnack+\")\n")
string(APPEND _stanza "set(AMDGPU_TARGETS \"\${GPU_TARGETS}\")\n")
string(APPEND _stanza "message(STATUS \"Override TSAN GPU_TARGETS = \${GPU_TARGETS}\")\n")
# Action at a distance: Signal that the sub-project should extend its build and install
diff --git a/rcb_config.sh b/rcb_config.sh
index afd7a6d..5c18937 100755
--- a/rcb_config.sh
+++ b/rcb_config.sh
@@ -7,7 +7,7 @@ echo "rcb_config.sh python activated"
CMAKE_VERSION_OUTPUT=$(cmake --version)
echo "rcb_config.sh CMAKE_VERSION: ${CMAKE_VERSION_OUTPUT}"
echo "rcb_config.sh therock cmake config command started"
-cmake -B build -GNinja -DTHEROCK_AMDGPU_FAMILIES=${RCB_AMDGPU_TARGETS} .
+cmake -B build -GNinja -DTHEROCK_VERBOSE=1 -DTHEROCK_SANITIZER=ASAN -DTHEROCK_AMDGPU_FAMILIES=${RCB_AMDGPU_TARGETS} .
RES=$?
echo "rcb_config.sh therock cmake config command done, res: $RES"
exit $RES
--
2.43.0

Loading
Loading