-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[ROCm] Widen OAI Triton MoE capability range to include gfx12 (RDNA4) #37826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -552,9 +552,9 @@ def _supports_current_device() -> bool: | |||||||||||||
| cap = p.get_device_capability() | ||||||||||||||
| if cap is None: | ||||||||||||||
| return False | ||||||||||||||
| # (9,0) <= cap < (11,0) covers CUDA SM90 (Hopper), SM100+ (Blackwell) | ||||||||||||||
| # and ROCm gfx942/gfx950 (which map to 9.4/9.5). | ||||||||||||||
| return (9, 0) <= (cap.major, cap.minor) < (11, 0) | ||||||||||||||
| # (9,0) <= cap < (13,0) covers CUDA SM90 (Hopper), SM100+ (Blackwell) | ||||||||||||||
| # and ROCm gfx942/gfx950 (9.4/9.5) + gfx1200/gfx1201 (12.0). | ||||||||||||||
| return (9, 0) <= (cap.major, cap.minor) < (13, 0) | ||||||||||||||
|
|
||||||||||||||
| @staticmethod | ||||||||||||||
| def _supports_no_act_and_mul() -> bool: | ||||||||||||||
|
|
@@ -884,9 +884,9 @@ def _supports_current_device() -> bool: | |||||||||||||
| cap = p.get_device_capability() | ||||||||||||||
| if cap is None: | ||||||||||||||
| return False | ||||||||||||||
| # (9,0) <= cap < (11,0) covers CUDA SM90 (Hopper), SM100+ (Blackwell) | ||||||||||||||
| # and ROCm gfx942/gfx950 (which map to 9.4/9.5). | ||||||||||||||
| return (9, 0) <= (cap.major, cap.minor) < (11, 0) | ||||||||||||||
| # (9,0) <= cap < (13,0) covers CUDA SM90 (Hopper), SM100+ (Blackwell) | ||||||||||||||
| # and ROCm gfx942/gfx950 (9.4/9.5) + gfx1200/gfx1201 (12.0). | ||||||||||||||
| return (9, 0) <= (cap.major, cap.minor) < (13, 0) | ||||||||||||||
|
Comment on lines
+887
to
+889
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the previous comment, this change to
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| @staticmethod | ||||||||||||||
| def _supports_no_act_and_mul() -> bool: | ||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -202,7 +202,7 @@ def select_mxfp4_moe_backend( | |
| triton_kernels_supported = has_triton_kernels() and ( | ||
| 9, | ||
| 0, | ||
| ) <= current_platform.get_device_capability() < (11, 0) | ||
| ) <= current_platform.get_device_capability() < (13, 0) | ||
|
Comment on lines
202
to
+205
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This condition is now broad enough to enable Triton kernels for cap = current_platform.get_device_capability()
triton_kernels_supported = has_triton_kernels() and cap and (
(9, 0) <= cap < (11, 0) or cap.major == 12) |
||
|
|
||
| # LoRA: separate experts backend path | ||
| if config.is_lora_enabled: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change to
< (13, 0)enables support for devices with major capability versions 11 and 12. The PR description and updated comment only mentiongfx12(RDNA4). Ifgfx11(RDNA3) is not intended to be supported or has not been tested, it would be safer to use a more specific condition to only enablegfx12. This prevents potential issues for users ongfx11hardware.If
gfx11is also supported, please consider updating the comment to reflect that.