Skip to content

Commit

Permalink
Add AMD GPU model and gfx code documentation
Browse files Browse the repository at this point in the history
Add a comment documenting supported AMD GPU models and their corresponding LLVM gfx codes, including Navi4, MI300X, and MI350.
  • Loading branch information
petrex committed Feb 25, 2025
1 parent 438f2c5 commit d1e92cf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions torchao/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,13 @@ def fill_defaults(args, n, defaults_tail):
def _torch_version_at_least(min_version):
return is_fbcode() or version("torch") >= min_version

# Supported AMD GPU Models and their LLVM gfx Codes:
#
# | AMD GPU Model | LLVM gfx Code |
# |---------------|------------------------|
# | Navi4 | gfx1200, gfx1201 |
# | MI300X | gfx940, gfx941, gfx942 |
# | MI350 | gfx950 |

def is_MI300():
if torch.cuda.is_available() and torch.version.hip:
Expand Down

0 comments on commit d1e92cf

Please sign in to comment.