Skip to content
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion unsloth/kernels/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,22 @@ def is_cdna():

@functools.lru_cache(1)
def is_rdna():
"""Detect ROCm-supported RDNA consumer/workstation GPUs (RDNA3, RDNA4)."""
"""Detect RDNA consumer/workstation GPUs (RDNA2, RDNA3, RDNA3.5, RDNA4)."""
return is_hip() and triton.runtime.driver.active.get_current_target().arch in (
# RDNA2
"gfx1030",
"gfx1031",
"gfx1032",
# RDNA3
Comment on lines +94 to +97

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add missing RDNA2 gfx IDs to is_rdna allowlist

The RDNA2 section in is_rdna() currently ends at gfx1032, so RDNA2 targets gfx1033gfx1036 still evaluate as non-RDNA and miss RDNA-gated behavior (for example, the Gemma3 ROCm compile workaround that calls is_rdna()). This leaves part of the stated RDNA2 support path disabled for affected GPUs.

Useful? React with 👍 / 👎.

Comment on lines +94 to +97

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add missing RDNA2 gfx1033-gfx1036 targets

The new is_rdna() allowlist claims RDNA2 coverage but the RDNA2 block ends at gfx1032, so HIP devices reporting gfx1033 through gfx1036 still return False and remain excluded from RDNA-gated Triton paths. This means part of the intended RDNA2 expansion in this commit is still non-functional for affected GPUs.

Useful? React with 👍 / 👎.

"gfx1100",
"gfx1101",
"gfx1102",
"gfx1103",
# RDNA3.5
"gfx1150",
"gfx1151",
"gfx1152",
# RDNA4
"gfx1200",
"gfx1201",
)
Expand Down