[opus] backport #4056: gate TDM/named-barrier on clang>=22 for ROCm 7.0/7.1 (release/v0.1.17)#4078
Open
carlushuang wants to merge 1 commit into
Conversation
…builds (ROCm#4056) The gfx1250 TDM section (tdm_desc/tdm_window/__builtin_amdgcn_tensor_load_to_lds) and the named-barrier / cluster-sync block (__amdgpu_named_workgroup_barrier_t, s_barrier_init) only exist on clang>=22 (ROCm>=7.2). Their host-pass branch (!defined(__HIP_DEVICE_COMPILE__)) was compiled unconditionally, so clang-20 (ROCm 7.1) CI failed with "use of undeclared identifier '__builtin_amdgcn_tensor_load_to_lds'". Add && (__clang_major__ >= 22) to those guards (opus.hpp x2) and the matching tdm_window WindowA/WindowB aliases in the traits header so the whole block compiles out on clang-20. (cherry picked from commit e2ff4b3)
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.
Backport of #4056 into
release/v0.1.17to fix #4077.release/v0.1.17HEAD (68b5f7be) fails to build on ROCm 7.0/7.1 (clang-20) forgfx942;gfx950because the gfx1250-only TDM section (tdm_desc/tdm_window/__builtin_amdgcn_tensor_load_to_lds) and the named-barrier / cluster-sync block (__amdgpu_named_workgroup_barrier_t,s_barrier_init) inopus.hpphad their host-pass branch (!defined(__HIP_DEVICE_COMPILE__)) compiled unconditionally. Those builtins only exist on clang>=22 (ROCm>=7.2), so any.cupulling inopus.hpp(e.g.module_activation) failed withuse of undeclared identifier '__builtin_amdgcn_tensor_load_to_lds'.This cherry-picks the fix already merged to
main(#4056), adding&& (__clang_major__ >= 22)to both guards inopus.hppand the matchingWindowA/WindowBaliases inopus_gemm_traits_a16w16_gfx1250.cuh, so the whole block compiles out on clang-20 while remaining active on ROCm 7.2.Cherry-pick applied cleanly (no conflicts). Verified guard counts after cherry-pick:
opus.hpp= 2, traits header = 1 (matchingmain).Fixes #4077.