[TEST ONLY] Deprecate HIPCC. Replace calls with amdclang++#6429
Open
david-salinas wants to merge 10 commits into
Open
[TEST ONLY] Deprecate HIPCC. Replace calls with amdclang++#6429david-salinas wants to merge 10 commits into
david-salinas wants to merge 10 commits into
Conversation
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
Add CMAKE_HIP_COMPILER and --rtlib/--unwindlib linker flags to the amd-hip toolchain so all subprojects get the correct HIP compiler without needing hipcc as a wrapper. - cmake/therock_subproject.cmake: set CMAKE_HIP_COMPILER to the built clang++ and add --rtlib=compiler-rt --unwindlib=libgcc to linker flags - core/CMakeLists.txt: remove hipcc from hip-clr RUNTIME_DEPS - math-libs/CMakeLists.txt: remove hipcc from libhipcxx COMPILER_TOOLCHAIN and RUNTIME_DEPS - Rename test_libhipcxx_hipcc.py -> test_libhipcxx_amdclang.py and update it to invoke amdclang++ directly Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
- tests/test_rocm_sanity.py: compile hipcc_check.cpp via amdclang++ with explicit --hip-path, --hip-device-lib-path, and -x hip flags instead of the hipcc wrapper. - fetch_test_configurations.py: rename libhipcxx_hipcc job to libhipcxx_amdclang and point it at test_libhipcxx_amdclang.py. - test_libhipcxx_hiprtc.py: replace HIPCC_BINARY_NAME/HIP_HIPCC_EXECUTABLE with AMDCLANGPP_BINARY_NAME/CMAKE_CXX_COMPILER=amdclang++. Part of the hipcc deprecation effort documented in docs/development/hipcc_deprecation.md.
Patches to replace hipcc with amdclang++ in libhipcxx: - Switch build_common.sh default compiler to amdclang++ - Use hiprtc::hiprtc imported target instead of bare -lhiprtc - Fix -x hip scope via target_compile_options - Replace HIP_HIPCC_EXECUTABLE with direct amdclang++/nvcc selection - Set CMAKE_CUDA_COMPILER_ID based on platform (AMDCLANG/NVIDIA) - Explicitly link amdhip64 for AMDCLANG test path - Fix cmake export tests for amdclang++ build Co-Authored-By: Claude Sonnet 4 (1M context) <noreply@anthropic.com>
roctracer tests use find_package(HIP MODULE) which requires HIP_HIPCC_EXECUTABLE and HIP_HIPCONFIG_EXECUTABLE to be present in the dist. Keep hipcc as a runtime dep until roctracer is updated to use the modern find_package(hip CONFIG) approach. Co-Authored-By: Claude Sonnet 4 (1M context) <noreply@anthropic.com>
Remove changes to cmake/therock_subproject.cmake, tests/test_rocm_sanity.py, and tests/hipcc_check.cpp — these affect components beyond libhipcxx and belong in a separate PR. Co-Authored-By: Claude Sonnet 4 (1M context) <noreply@anthropic.com>
d91fdc1 to
c7ab512
Compare
Patch 0010 description mentioned adding target_compile_options to cmake/test/test_export/CMakeLists.txt but the hunk was missing from the diff. Add it now so version_check.cxx is compiled as HIP source with amdclang++, fixing '__host__ undefined' errors in the cmake export CTest suite. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Patch 0003 already adds target_compile_options(version_check PRIVATE -x hip) to cmake/test/test_export/CMakeLists.txt. Patch 0010 was incorrectly adding the same hunk again causing git am to fail with 'patch does not apply'. Remove the duplicate hunk from patch 0010, leaving only the CMAKE_PREFIX_PATH addition to cmake/test/CMakeLists.txt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
On Windows, amdclang++.exe lives in lib/llvm/bin/ not bin/. Use the correct platform-specific path when setting CMAKE_CXX_COMPILER. Also remove the duplicated -GNinja .. arguments in the cmake command. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tected When no GPU is present (e.g. Windows CI runners), gpu_arch is None. Passing -DCMAKE_HIP_ARCHITECTURES=None causes amdclang++ to fail with 'unsupported HIP gpu architecture: None' during the CMake HIP compiler test. Only pass the flag when a valid architecture was detected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Motivation
The HIPCC Tool will be deprecated, and eventually removed in an upcoming release. Users will be directed to use amdclang++ instead and will be given a migration guide.
closes
Jira: https://amd-hub.atlassian.net/browse/ROCM-8370
Replace the hipcc fallback defaults for HOST_COMPILER and CUDA_COMPILER with amdclang++. hipcc is deprecated in favor of calling amdclang++ directly with explicit --hip-path and --hip-device-lib-path flags.
Callers that set $CXX or $CUDACXX are unaffected.
Technical Details
Replacing all calls to hipcc with calls to amdclang++ with needed clang options like -x hip and --hip-path and hip-device-lib-path, etc ...
Test Plan
Full CI cycle
Test Result
Submission Checklist