Repository navigation
[release/2.13] [ROCm] Add hipccl include dir for HIP extension builds (#206478) - #4071
Merged
jeffdaily merged 1 commit intoNov 26, 2026
Merged
Conversation
…ension builds (pytorch#206478) Backport of pytorch#206478 to release/2.13. Plugins (torchaudio, torchvision) and any third-party torch.utils.cpp_extension consumer fail to build because they cannot find libhipcxx. The root cause is that hipCUB and rocThrust now rely on libhipcxx, which is only provided under ${ROCM_HOME}/include/hipccl. CMake-based builds (PyTorch itself) find it through find_package(libhipcxx), but cpp_extension compiles have no such mechanism. This adds the directory to include_paths() for HIP extensions, guarded by an existence check so it is a no-op on ROCm installs that do not ship hipccl. Adapted rather than cherry-picked: include_paths() was refactored on main after this branch point to use a rocm_home_include local with a '/usr/include' guard, so the upstream hunk does not apply here. The added lines are identical; only the anchor differs. Co-authored-by: Nara Prasetya <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
amd-mcieslak
marked this pull request as ready for review
November 25, 2026 16:49
jeffdaily
approved these changes
Nov 26, 2026
jeffdaily
deleted the
amd-mcieslak/cherry-pick/2.13/hipccl-include-dir
branch
November 26, 2026 18:07
3 of 11 tasks
This was referenced Nov 30, 2026
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.
Linked issue or supporting maintainer
Supported by @jeffdaily
BC-breaking?
No. Upcoming changes in ROCm/rocm-libraries (ROCm/rocm-libraries#15610) will likely break ROCm/HIP-based builds of plugins (torchaudio, torchvision, and any third-party
torch.utils.cpp_extensionconsumers) unless they include this patch.Backporting is required, but should be done on ROCm/pytorch.
Summary
${ROCM_HOME}/include/hipccl. CMake-based builds (PyTorch itself) find it throughfind_package(libhipcxx), butcpp_extensioncompiles have no such mechanism.include_paths()for HIP extensions, guarded by an existence check so it is a no-op on ROCm installs that do not ship hipccl.Agent details
Key steps: traced the
Could not find libhipcxx!error to__has_include(<hip/std/version>)probes in rocthrust'sthrust/detail/config/libcxx.h; confirmed the probe path only resolves with-I${ROCM_HOME}/include/hipccl; placed the fix ininclude_paths()so it reaches theCUDAExtension/CppExtensionsetup.py flow, JITload()/load_inline(), and hipify header resolution.Pull Request resolved: pytorch#206478
Approved by: https://github.com/jeffdaily