Repository navigation
[JIT] [Bugfix] Add hipccl include path for libhipcxx - #8864
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: Reviews: |
WAITING ON AUTHORPR Self-ReviewRevision Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision. Questions to answer in the PR description
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
(cherry picked from commit 2791c05) Co-authored-by: Di Nguyen <[email protected]>
module_topk_plain is expected to fail on ROCm 10.3 right now (the torch_exclude path never gets the ROCm#8864 hipccl include fix). Match the failure against that known signature so the smoke test can tell apart three states: the gap is still open (xfail, don't block CI), the gap got fixed upstream (loud PASS notice to clean up the xfail), or something unrelated broke (real failure, re-raise with the original error).
Summary
Add the ROCm
include/hipccldirectory to the include paths that the AITER JITuses for HIP extensions. Add it only when the directory exists.
Motivation
In newer ROCm releases, rocThrust and hipCUB require libhipcxx
(
<hip/std/...>). ROCm supplies libhipcxx only in${ROCM_HOME}/include/hipccl.The AITER JIT does not add this directory, so a build that includes rocThrust
headers fails. Example from the vLLM nightly build (ROCm 10.3.0a20261127,
torch 2.14.0, Python 3.14), while it compiles
module_attention:PyTorch has the same fix in ROCm/pytorch#4071. AITER uses its own copy of
torch.utils.cpp_extension(aiter/jit/utils/cpp_extension.py), so thePyTorch fix does not apply to AITER builds.
Changes
include_paths()inaiter/jit/utils/cpp_extension.py: for HIP extensions,add
<rocm_include>/hipccland<devel_include>/hipcclwhen each directoryexists.
include_paths()supplies the include directories for setuptoolsextensions, JIT ninja builds and hipify header lookup. This one change
applies to all of them.
includeand_rocm_sdk_devel/includepaths do not change.On ROCm installs without
hipccl, the behavior does not change.Testing
No unit test is added: this change is to a build path. The real test is a
successful JIT build on a ROCm release that ships
include/hipccl.Documentation
This is an internal build fix. Users do not see a change.
Dependencies
Breaking Changes
None.
PR Self-Review
Reviewed revision
56f7c7d
Behavior and intent
Before: JIT builds of HIP extensions that include rocThrust or hipCUB headers
fail on newer ROCm with
Could not find libhipcxx!. Theinclude/hipccldirectory is not on the include path.
After:
include_paths()addsinclude/hipcclfrom the ROCm include tree andfrom the
_rocm_sdk_develinclude tree when each exists. Older ROCm installssee no change.
Validation and unverified scope
Using this mini build
test.py:Reproducing error step
Error observed:
Showing fix step
Build completes
PR-specific question
need to include hipccl in order to include rocthrust and hipcub. Current code does not do this correctly
I validated the error comes from the existing code base and validated the changes fixes the error. This was done by reproducing the CI pipeline. Nothing should be unverified based on these experiments.
see validation section for detailed steps
None
Changed op tests
None.