Skip to content

[HIP] Add rocm-libraries and rocprim#416

Open
jplehr wants to merge 1 commit into
llvm:mainfrom
jplehr:feat/add-rocm-libraries-to-hip
Open

[HIP] Add rocm-libraries and rocprim#416
jplehr wants to merge 1 commit into
llvm:mainfrom
jplehr:feat/add-rocm-libraries-to-hip

Conversation

@jplehr
Copy link
Copy Markdown
Contributor

@jplehr jplehr commented Jun 5, 2026

This adds support to build and run tests for rocprim as the intial target library.

We want to be able to use llvm-test-suite to drive the build and test of some HIP libraries from the ROCm stack. Therefore, we parse TheRock submodule info about rocm-libraries version and pull-in the rocm- libraries version as currently tracked by TheRock submodule pointer.

The default for test parallelism is 16 processes which corresponds to the number of VMs allocated by the kernel driver per GPU.

This adds support to build and run tests for rocprim as the intial
target library.

We want to be able to use llvm-test-suite to drive the build and test of
some HIP libraries from the ROCm stack. Therefore, we parse TheRock
submodule info about rocm-libraries version and pull-in the rocm-
libraries version as currently tracked by TheRock submodule pointer.

The default for test parallelism is 16 processes which corresponds to
the number of VMs allocated by the kernel driver per GPU.
include(${CMAKE_CURRENT_LIST_DIR}/HipCatchTests.cmake)

# Get rocm-libraries commit from TheRock (for version alignment)
function(get_therock_rocm_libraries_version OUT_VAR)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why do we need this, just to track the version? Couldn't that just be a variable the CI itself sets?

Copy link
Copy Markdown
Contributor Author

@jplehr jplehr Jun 5, 2026

Choose a reason for hiding this comment

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

This tracks the version of the libraries in TheRock, which is the version we care about.
For now we want to track that version and reconsider when we use this in the upstream bots. This is for downstream right now.
This version can change multiple times a day.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is there not an easier way to manage this than doing it through CMake? Couldn't the CI just look it up and set it at configure time?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess we could have a helper script that does it. But I would prefer that it is not separated across too many places so that it behaves similarly across machines somewhat easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants