Skip to content

fix(rpp): Fix libomp search to include clang target triple directory - #515

Merged
estewart08 merged 2 commits into
amd-stagingfrom
users/estewart/rpp-fix-libomp-search
Sep 3, 2026
Merged

fix(rpp): Fix libomp search to include clang target triple directory#515
estewart08 merged 2 commits into
amd-stagingfrom
users/estewart/rpp-fix-libomp-search

Conversation

@estewart08

Copy link
Copy Markdown
Contributor

With -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON the libomp.so library is moved one level down to something like 'x86_64-unknown-linux-gnu'. This adds a cmake helper file, FindOpenMPHelpers.cmake, which first looks for the openmp-config.cmake via find_package(OpenMP CONFIG) and then falls back to find_library(omp) with the clang target triple added to suffixes.

Updates:
RPP/box_filter
RPP/brightness
RPP/contrast
RPP/flip
RPP/gamma_correction
RPP/resize

Reverts the hard coded path in #513

Motivation

Fix openmp examples search methodology for libomp.so

Technical Details

Adds cmake helper in Common/FindOpenMPHelpers.cmake

Test Plan

Configure/execution of rpp examples.

Test Result

Tests should configure/run with no missing libomp.so errors.

ISSUE ID: ROCM-30536

@estewart08
estewart08 requested a review from a team as a code owner September 3, 2026 16:19

@zichguan-amd zichguan-amd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the comprehensive fix. LGTM with some comments.

Comment thread Common/FindOpenMPHelpers.cmake
Comment thread Common/FindOpenMPHelpers.cmake Outdated
@ronlieb
ronlieb requested a review from nunnikri September 3, 2026 17:06
With -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON the libomp.so library is moved
one level down to something like 'x86_64-unknown-linux-gnu'. This adds a cmake
helper file, FindOpenMPHelpers.cmake, which first looks for the openmp-config.cmake
via find_package(OpenMP CONFIG) and then falls back to find_library(omp) with
the clang target triple added to suffixes.

Updates:
RPP/box_filter
RPP/brightness
RPP/contrast
RPP/flip
RPP/gamma_correction
RPP/resize

Reverts the hard coded path in #513

ISSUE ID: ROCM-30536
@estewart08
estewart08 force-pushed the users/estewart/rpp-fix-libomp-search branch from efa0c84 to 6ce8d4b Compare September 3, 2026 17:14

@zichguan-amd zichguan-amd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks LGTM!

@estewart08

Copy link
Copy Markdown
Contributor Author

@zichguan-amd, I assume this needs moved to amd-mainline? What is the timeline on that?

@zichguan-amd

Copy link
Copy Markdown
Collaborator

@zichguan-amd, I assume this needs moved to amd-mainline? What is the timeline on that?

Mainline promotion happens automatically on Monday, if this is urgent I can manually promote.

@estewart08

Copy link
Copy Markdown
Contributor Author

@zichguan-amd, I assume this needs moved to amd-mainline? What is the timeline on that?

Mainline promotion happens automatically on Monday, if this is urgent I can manually promote.

Monday is fine. Can you confirm if the failures are known/unrelated?

@zichguan-amd

Copy link
Copy Markdown
Collaborator

Yes the rocprofiler-sdk failures are unrelated and being fixed by another PR. You can merge whenever.

@estewart08
estewart08 merged commit c3cae69 into amd-staging Sep 3, 2026
8 of 11 checks passed
@estewart08
estewart08 deleted the users/estewart/rpp-fix-libomp-search branch September 3, 2026 23:20
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