Repository navigation
[ROCm] Pair gfx1250 support with gfx1250-strict - #3639
BLOrange-AMD wants to merge 1 commit into
Conversation
gfx1250-strict is a distinct LLVM/HIP offload target with the same CDNA5 ISA as gfx1250. Runtime equality checks against "gfx1250" alone miss it, and CMAKE HIP_ARCHITECTURES / CK GEMM filtering must treat both names as the same unsupported-CK family. Add gfx1250-strict next to gfx1250 in arch lists, hipBLASLt/hipSparseLt gates, shared-memory and workspace sizing, device preprocessor checks, wheel PYTORCH_ROCM_ARCH, and tests. Keep using the existing amd-gfx1250 AOTriton image, whose regex already matches gfx1250-strict. Test Plan: - rg gfx1250 to confirm remaining references include gfx1250-strict where they are architecture identifiers (AOTriton image name excluded). - No local ROCm gfx1250-strict hardware in this environment; unit tests that key off gcnArchName were updated in lockstep with CUDAHooks. Authored with an AI assistant. Co-authored-by: Bo Li <BLOrange-AMD@users.noreply.github.com>
naromero77amd
left a comment
There was a problem hiding this comment.
Nice first steps.
Right now we have gfx1250-strict for ROCm >=7.14. Most likely this will have to ROCm >= 10.1 or even 10.2.
| gcn_name = torch.cuda.get_device_properties(0).gcnArchName | ||
| return 'gfx950' in gcn_name or ('gfx1250' in gcn_name and ROCM_VERSION >= (7, 14)) | ||
| return 'gfx950' in gcn_name or ( | ||
| ('gfx1250' in gcn_name or 'gfx1250-strict' in gcn_name) and ROCM_VERSION >= (7, 14) |
There was a problem hiding this comment.
nitpick, 'gfx1250' in gcn_name also works when gcn_name is 'gfx1250-strict'
| #endif | ||
| #if ROCM_VERSION >= 71400 | ||
| "gfx1250", | ||
| "gfx1250", "gfx1250-strict", |
There was a problem hiding this comment.
gfx1250-strict is not available in 7.14, will need a separate ROCm version check
| #endif | ||
| #if ROCM_VERSION >= 71400 | ||
| "gfx1250", | ||
| "gfx1250", "gfx1250-strict", |
There was a problem hiding this comment.
gfx1250-strict is not available in 7.14, will need a separate ROCm version check
| { | ||
| __atomic_signal_fence(__ATOMIC_SEQ_CST); | ||
| #ifdef __gfx1250__ | ||
| #if defined(__gfx1250__) || defined(__gfx1250_strict__) |
There was a problem hiding this comment.
Lets confirm if the compiler is defining the macro - __gfx1250_strict__
There was a problem hiding this comment.
Yes, a recent version of LLVM will define that when compiling for gfx1250-strict
gfx1250-strict is a distinct LLVM/HIP offload target with the same CDNA5 ISA as gfx1250. Runtime equality checks against "gfx1250" alone miss it, and CMAKE HIP_ARCHITECTURES / CK GEMM filtering must treat both names as the same unsupported-CK family.
Add gfx1250-strict next to gfx1250 in arch lists, hipBLASLt/hipSparseLt gates, shared-memory and workspace sizing, device preprocessor checks, wheel PYTORCH_ROCM_ARCH, and tests. Keep using the existing amd-gfx1250 AOTriton image, whose regex already matches gfx1250-strict.
Test Plan: