Skip to content

[ROCm] Pair gfx1250 support with gfx1250-strict - #3639

Open
BLOrange-AMD wants to merge 1 commit into
release/2.13from
cursor/gfx1250-strict-fd6e
Open

BLOrange-AMD wants to merge 1 commit into
release/2.13from
cursor/gfx1250-strict-fd6e

Conversation

@BLOrange-AMD

Copy link
Copy Markdown

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.

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 naromero77amd left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, 'gfx1250' in gcn_name also works when gcn_name is 'gfx1250-strict'

#endif
#if ROCM_VERSION >= 71400
"gfx1250",
"gfx1250", "gfx1250-strict",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gfx1250-strict is not available in 7.14, will need a separate ROCm version check

#endif
#if ROCM_VERSION >= 71400
"gfx1250",
"gfx1250", "gfx1250-strict",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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__)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets confirm if the compiler is defining the macro - __gfx1250_strict__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants