Skip to content

[TEST ONLY] Deprecate HIPCC. Replace calls with amdclang++#6429

Open
david-salinas wants to merge 10 commits into
mainfrom
users/dsalinas/deprecate-hipcc-clean
Open

[TEST ONLY] Deprecate HIPCC. Replace calls with amdclang++#6429
david-salinas wants to merge 10 commits into
mainfrom
users/dsalinas/deprecate-hipcc-clean

Conversation

@david-salinas

Copy link
Copy Markdown

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

@therock-pr-bot

therock-pr-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ❌ Fail Error: Title does not follow Conventional Commits style.
Expected: start with a valid type (feat, fix, docs, …).
Desired format: type(optional-scope): short description
───
Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
JIRA ID : TESTAUTO-6039
JIRA ID - #330
JIRA ID #330
ISSUE ID : TESTUTO-3334
ISSUE ID #3334
ISSUE ID - TESTAUTO-3433
ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
Closes #10
Fixes octo-org/octo-repo#100
Resolves: #123
#123
https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
Forbidden Files ✅ Pass
🧪 Unit Test ✅ Pass
🔎 pre-commit ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled

⚠️ 1 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Title/Description

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@david-salinas david-salinas requested a review from monoatamd July 8, 2026 22:11
@therock-pr-bot therock-pr-bot Bot added the Not ready to Review PR has unresolved policy failures — reviews blocked label Jul 8, 2026
@therock-pr-bot

therock-pr-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Title/Description

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

david-salinas and others added 6 commits July 9, 2026 18:06
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>
@david-salinas david-salinas force-pushed the users/dsalinas/deprecate-hipcc-clean branch from d91fdc1 to c7ab512 Compare July 9, 2026 22:06
david-salinas and others added 4 commits July 9, 2026 20:59
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not ready to Review PR has unresolved policy failures — reviews blocked

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

1 participant