Skip to content

fix: run_hipcc.cmake spirv platform branch + regression test#1252

Merged
pvelesko merged 2 commits into
mainfrom
seissol-fixes
May 9, 2026
Merged

fix: run_hipcc.cmake spirv platform branch + regression test#1252
pvelesko merged 2 commits into
mainfrom
seissol-fixes

Conversation

@pvelesko
Copy link
Copy Markdown
Collaborator

@pvelesko pvelesko commented May 3, 2026

Summary

Background

When building SeisSol with chipStar, the Device submodule uses the legacy FindHIP cmake integration (hip_add_library(SHARED) + HIP_SOURCE_PROPERTY_FORMAT). This routes per-file compilation through run_hipcc.cmake, which was missing a spirv case and fell into the nvcc branch. For shared libraries that branch appends --shared -Xcompiler '-fPIC'; clang rejects the quoted ''-fPIC'' as an unknown file:

clang++: error: no such file or directory: ''-fPIC''

Changes

  • HIP submodule: bumped to fix: include spirv platform in clang branch of run_hipcc.cmake HIP#13 (one-line condition fix in run_hipcc.cmake)
  • tests/post-install/FindHIPLegacySpirvTarget/: minimal cmake project using hip_add_library(SHARED) + HIP_SOURCE_PROPERTY_FORMAT to reproduce the failure
  • tests/post-install/cmake-tests.bash: new test section that builds the object file and checks for the ''-fPIC'' bad-flag pattern

Test plan

  • check-install target passes with the new FindHIPLegacySpirvTarget test section
  • Test fails without the HIP submodule fix (verified locally by temporarily reverting run_hipcc.cmake)
  • Existing post-install cmake tests (HipDeviceTarget, HipHostTarget, HipDeviceCSource) unaffected

pvelesko added 2 commits May 3, 2026 16:20
When HIP_PLATFORM=spirv (chipStar), FindHIP's run_hipcc.cmake fell through
to the nvcc branch, injecting '--compiler-options -fPIC' which clang rejects
as an unknown file. The test builds a SHARED library (which triggers the fPIC
code path) through the legacy hip_add_library() + HIP_SOURCE_PROPERTY_FORMAT
flow that exercises run_hipcc.cmake.
@pvelesko
Copy link
Copy Markdown
Collaborator Author

pvelesko commented May 7, 2026

/run-aurora-ci

@pvelesko pvelesko merged commit 98f4154 into main May 9, 2026
39 of 42 checks passed
@pvelesko pvelesko deleted the seissol-fixes branch May 9, 2026 08:44
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.

1 participant