fix: run_hipcc.cmake spirv platform branch + regression test#1252
Merged
Conversation
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.
Collaborator
Author
|
/run-aurora-ci |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HIPsubmodule to include the fix forrun_hipcc.cmake(fix: include spirv platform in clang branch of run_hipcc.cmake HIP#13)run_hipcc.cmakeclang branch on the SPIR-V platform with a shared libraryBackground
When building SeisSol with chipStar, the Device submodule uses the legacy
FindHIPcmake integration (hip_add_library(SHARED)+HIP_SOURCE_PROPERTY_FORMAT). This routes per-file compilation throughrun_hipcc.cmake, which was missing aspirvcase and fell into the nvcc branch. For shared libraries that branch appends--shared -Xcompiler '-fPIC'; clang rejects the quoted''-fPIC''as an unknown file:Changes
HIPsubmodule: bumped to fix: include spirv platform in clang branch of run_hipcc.cmake HIP#13 (one-line condition fix inrun_hipcc.cmake)tests/post-install/FindHIPLegacySpirvTarget/: minimal cmake project usinghip_add_library(SHARED)+HIP_SOURCE_PROPERTY_FORMATto reproduce the failuretests/post-install/cmake-tests.bash: new test section that builds the object file and checks for the''-fPIC''bad-flag patternTest plan
check-installtarget passes with the newFindHIPLegacySpirvTargettest sectionrun_hipcc.cmake)HipDeviceTarget,HipHostTarget,HipDeviceCSource) unaffected