Skip to content

Add support for building rocgdb from external source directory#4457

Open
lumachad wants to merge 1 commit intomainfrom
users/lumachad/therock-debug-tools/rocgdb/external_source_dir
Open

Add support for building rocgdb from external source directory#4457
lumachad wants to merge 1 commit intomainfrom
users/lumachad/therock-debug-tools/rocgdb/external_source_dir

Conversation

@lumachad
Copy link
Copy Markdown
Contributor

This enables developers to build rocgdb from a custom source location while preserving the TheRock wrapper infrastructure, supporting local development and testing of rocgdb modifications.

@lumachad lumachad requested review from geomin12 and marbre April 10, 2026 08:08
@lumachad lumachad self-assigned this Apr 10, 2026
@lumachad lumachad requested a review from a team as a code owner April 10, 2026 08:08
Copy link
Copy Markdown
Member

@marbre marbre left a comment

Choose a reason for hiding this comment

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

This could use the therock_enable_external_source functions or follow how we handle it for rocm-systems as well as rocm-libraries:

TheRock/CMakeLists.txt

Lines 139 to 151 in fc07dec

# Use the rocm-libraries superrepo tracked in TheRock's `.gitmodules` or
# allow to specify an alternative source location.
set(THEROCK_ROCM_LIBRARIES_SOURCE_DIR_DEFAULT "${THEROCK_SOURCE_DIR}/rocm-libraries")
set(THEROCK_ROCM_LIBRARIES_SOURCE_DIR "${THEROCK_ROCM_LIBRARIES_SOURCE_DIR_DEFAULT}" CACHE STRING "Path to rocm-libraries superrepo")
cmake_path(ABSOLUTE_PATH THEROCK_ROCM_LIBRARIES_SOURCE_DIR NORMALIZE)
set(THEROCM_ROCM_SYSTEMS_SOURCE_DIR_DEFAULT "${THEROCK_SOURCE_DIR}/rocm-systems")
set(THEROCK_ROCM_SYSTEMS_SOURCE_DIR "${THEROCM_ROCM_SYSTEMS_SOURCE_DIR_DEFAULT}" CACHE STRING "Path to rocm-systems superrepo")
cmake_path(ABSOLUTE_PATH THEROCK_ROCM_SYSTEMS_SOURCE_DIR NORMALIZE)
# Allow to specify alternative source locations instead of using
# repositories tracked in TheRock's `.gitmodules`.
therock_enable_external_source("composable-kernel" "${THEROCK_SOURCE_DIR}/ml-libs/composable_kernel" OFF)

Commit 5523139 removes the function use for rccl (which was moved into rocm-systems) but that might give you an idea how this works. Happy to jump on a call if needed.

@lumachad
Copy link
Copy Markdown
Contributor Author

This could use the therock_enable_external_source functions or follow how we handle it for rocm-systems as well as rocm-libraries:

TheRock/CMakeLists.txt

Lines 139 to 151 in fc07dec

# Use the rocm-libraries superrepo tracked in TheRock's `.gitmodules` or
# allow to specify an alternative source location.
set(THEROCK_ROCM_LIBRARIES_SOURCE_DIR_DEFAULT "${THEROCK_SOURCE_DIR}/rocm-libraries")
set(THEROCK_ROCM_LIBRARIES_SOURCE_DIR "${THEROCK_ROCM_LIBRARIES_SOURCE_DIR_DEFAULT}" CACHE STRING "Path to rocm-libraries superrepo")
cmake_path(ABSOLUTE_PATH THEROCK_ROCM_LIBRARIES_SOURCE_DIR NORMALIZE)
set(THEROCM_ROCM_SYSTEMS_SOURCE_DIR_DEFAULT "${THEROCK_SOURCE_DIR}/rocm-systems")
set(THEROCK_ROCM_SYSTEMS_SOURCE_DIR "${THEROCM_ROCM_SYSTEMS_SOURCE_DIR_DEFAULT}" CACHE STRING "Path to rocm-systems superrepo")
cmake_path(ABSOLUTE_PATH THEROCK_ROCM_SYSTEMS_SOURCE_DIR NORMALIZE)
# Allow to specify alternative source locations instead of using
# repositories tracked in TheRock's `.gitmodules`.
therock_enable_external_source("composable-kernel" "${THEROCK_SOURCE_DIR}/ml-libs/composable_kernel" OFF)

Commit 5523139 removes the function use for rccl (which was moved into rocm-systems) but that might give you an idea how this works. Happy to jump on a call if needed.

Let me adjust this then.

@lumachad lumachad force-pushed the users/lumachad/therock-debug-tools/rocgdb/external_source_dir branch from c09172c to e437624 Compare April 10, 2026 14:08
@lumachad
Copy link
Copy Markdown
Contributor Author

Updated to use a similar scheme to rocm-systems.

This enables developers to build rocgdb from a custom source location while
preserving the TheRock wrapper infrastructure, supporting local development and
testing of rocgdb modifications.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lumachad lumachad force-pushed the users/lumachad/therock-debug-tools/rocgdb/external_source_dir branch from e437624 to 26589d7 Compare April 11, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

2 participants