Skip to content

(fix) rocthrust: cherry pick benchmark build fix into ROCm 10.0 - #10967

Merged
marbre merged 1 commit into
release/therock-10.0from
users/stanleytsang-amd/cp-thrust-bench-fix-10
Aug 18, 2026
Merged

marbre merged 1 commit into
release/therock-10.0from
users/stanleytsang-amd/cp-thrust-bench-fix-10

Conversation

@stanleytsang-amd

Copy link
Copy Markdown
Contributor

See #10956.

An oversight from the inclusion of the rocRAND dependency into rocThrust is that they both share common CMake options. When building rocThrust benchmarks, BUILD_BENCHMARK=ON must be set. This same CMake option is present in rocRAND. Thus, anytime rocThrust must download/clone rocRAND as a dependency and builds benchmarks, it also causes the local copy of rocRAND to build its benchmarks as well. This, in combination with the recent 5.0.0 version bump of rocRAND in rocThrust's dependencies, triggered a primbench.hpp not found error.

JIRA ID: ROCM-29174

Technical Details

FetchContent runs in-process, so rocthrust's BUILD_BENCHMARK=ON leaks into rocrand and causes its benchmarks to build. I've suppressed that in rocThrust via an explicit set(BUILD_BENCHMARK OFF) immediatley before FetchContent_Declare(rocrand). Then turn BUILD_BENCHMARK=ON immediately after so that rocThrust's benchmarks build.

Test Plan

Ran the rocThrust benchmark build locally. CI ran on #10956

Test Result

CI passed, benchmark build worked.

Submission Checklist

…ust benchmarks (#10956)

An oversight from the inclusion of the rocRAND dependency into rocThrust
is that they both share common CMake options. When building rocThrust
benchmarks, `BUILD_BENCHMARK=ON` must be set. This same CMake option is
present in rocRAND. Thus, anytime rocThrust must download/clone rocRAND
as a dependency and builds benchmarks, it also causes the local copy of
rocRAND to build its benchmarks as well. This, in combination with the
recent 5.0.0 version bump of rocRAND in rocThrust's dependencies,
triggered a primbench.hpp not found error.

FetchContent runs in-process, so rocthrust's BUILD_BENCHMARK=ON leaks
into rocrand and causes its benchmarks to build. I've suppressed that in
rocThrust via an explicit `set(BUILD_BENCHMARK OFF)` immediatley before
`FetchContent_Declare(rocrand)`. Then turn BUILD_BENCHMARK=ON
immediately after so that rocThrust's benchmarks build.

Ran the rocThrust benchmark build locally.

it no longer build the rocRAND benchmark. The rocthrust benchmark build
works.

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.

JIRA ID: ROCM-29174
@stanleytsang-amd
stanleytsang-amd requested review from a team August 18, 2026 21:55
@stanleytsang-amd
stanleytsang-amd requested a review from a team as a code owner August 18, 2026 21:55

@amd-jmahovsky amd-jmahovsky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Same as #10956

@marbre

marbre commented Aug 18, 2026

Copy link
Copy Markdown
Member

The CI signal on the original commit is enough to be confident enough to ignore CI signal here.

@marbre
marbre enabled auto-merge (squash) August 18, 2026 22:09
@marbre
marbre disabled auto-merge August 18, 2026 22:21
@marbre
marbre merged commit d5c7a48 into release/therock-10.0 Aug 18, 2026
17 of 21 checks passed
@marbre
marbre deleted the users/stanleytsang-amd/cp-thrust-bench-fix-10 branch August 18, 2026 22:21
stanleytsang-amd added a commit that referenced this pull request Aug 19, 2026
## Motivation

Further investigation revealed some bugs in the fetch_dep call that is
used to get rocPRIM and/or rocRAND as dependencies. Hardcoded references
to rocPRIM were used, which obviously breaks when trying to fetch
rocRAND. This was causing rocRAND installs not being found, specifically
in [TheRock CI for ROCm
10](https://github.com/ROCm/TheRock/actions/runs/32192515118/job/95906621978?pr=7330),
which in turn triggered rocThrust to download rocRAND, which in turn
triggers #10967 and #10956, and also other behaviour that will soon be
undesired, specifically the packaging of duplicate files in separate
library packages. Unfortunately for this last behaviour, the fix is
beyond the scope of ROCm 10.

## Technical Details

Fix the `fetch_dep` function in cmake/Dependencies.cmake to properly
handle both rocPRIM and rocRAND.

## Test Plan

Run ROCm/TheRock#7475 in advance to see if
TheRock CI passes completely.

## Test Result

While it is still running at the time of writing, the Validate Artifact
Structure job passed, which is what this PR aims to fix. I will check in
the morning on the status.

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
marbre added a commit that referenced this pull request Aug 19, 2026
… 10.0 (#10991)

This PR cherry picks #10978 to the 10.0 release branch.

## Motivation

Further investigation revealed some bugs in the fetch_dep call that is
used to get rocPRIM and/or rocRAND as dependencies. Hardcoded references
to rocPRIM were used, which obviously breaks when trying to fetch
rocRAND. This was causing rocRAND installs not being found, specifically
in [TheRock CI for ROCm
10](https://github.com/ROCm/TheRock/actions/runs/32192515118/job/95906621978?pr=7330),
which in turn triggered rocThrust to download rocRAND, which in turn
triggers #10967 and #10956, and also other behaviour that will soon be
undesired, specifically the packaging of duplicate files in separate
library packages. Unfortunately for this last behaviour, the fix is
beyond the scope of ROCm 10.

## Technical Details

Fix the `fetch_dep` function in cmake/Dependencies.cmake to properly
handle both rocPRIM and rocRAND.

## Test Plan

Run ROCm/TheRock#7475 in advance to see if
TheRock CI passes completely.

## Test Result

While it is still running at the time of writing, the Validate Artifact
Structure job passed, which is what this PR aims to fix. The windows
jobs seem stuck but everything else passes.

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.

JIRA ID: ROCM-29174

---------

Co-authored-by: Marius Brehler <marius.brehler@amd.com>
marbre added a commit to ROCm/TheRock that referenced this pull request Aug 19, 2026
Bumps rocm-libraries to include cherry-picks for JIRA ID AIRDEL-36

* ROCm/rocm-libraries#10637
* ROCm/rocm-libraries#10879
* ROCm/rocm-libraries#10967
* ROCm/rocm-libraries#10991
marbre added a commit to ROCm/TheRock that referenced this pull request Aug 20, 2026
stanleytsang-amd added a commit that referenced this pull request Sep 18, 2026
## Motivation

Further investigation revealed some bugs in the fetch_dep call that is
used to get rocPRIM and/or rocRAND as dependencies. Hardcoded references
to rocPRIM were used, which obviously breaks when trying to fetch
rocRAND. This was causing rocRAND installs not being found, specifically
in [TheRock CI for ROCm
10](https://github.com/ROCm/TheRock/actions/runs/32192515118/job/95906621978?pr=7330),
which in turn triggered rocThrust to download rocRAND, which in turn
triggers #10967 and #10956, and also other behaviour that will soon be
undesired, specifically the packaging of duplicate files in separate
library packages. Unfortunately for this last behaviour, the fix is
beyond the scope of ROCm 10.

## Technical Details

Fix the `fetch_dep` function in cmake/Dependencies.cmake to properly
handle both rocPRIM and rocRAND.

## Test Plan

Run ROCm/TheRock#7475 in advance to see if
TheRock CI passes completely.

## Test Result

While it is still running at the time of writing, the Validate Artifact
Structure job passed, which is what this PR aims to fix. I will check in
the morning on the status.

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
illsilin pushed a commit to igorluppi/rocm-libraries that referenced this pull request Oct 1, 2026
## Motivation

Further investigation revealed some bugs in the fetch_dep call that is
used to get rocPRIM and/or rocRAND as dependencies. Hardcoded references
to rocPRIM were used, which obviously breaks when trying to fetch
rocRAND. This was causing rocRAND installs not being found, specifically
in [TheRock CI for ROCm
10](https://github.com/ROCm/TheRock/actions/runs/32192515118/job/95906621978?pr=7330),
which in turn triggered rocThrust to download rocRAND, which in turn
triggers ROCm#10967 and ROCm#10956, and also other behaviour that will soon be
undesired, specifically the packaging of duplicate files in separate
library packages. Unfortunately for this last behaviour, the fix is
beyond the scope of ROCm 10.

## Technical Details

Fix the `fetch_dep` function in cmake/Dependencies.cmake to properly
handle both rocPRIM and rocRAND.

## Test Plan

Run ROCm/TheRock#7475 in advance to see if
TheRock CI passes completely.

## Test Result

While it is still running at the time of writing, the Validate Artifact
Structure job passed, which is what this PR aims to fix. I will check in
the morning on the status.

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants