Skip to content

Commit

Permalink
Normalize AMD Instinct accelerator names (#1817)
Browse files Browse the repository at this point in the history
Closes: #1815
  • Loading branch information
un-def authored Oct 15, 2024
1 parent f49a808 commit eebd572
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/dstack/_internal/utils/gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def convert_nvidia_gpu_name(name: str) -> str:

def convert_amd_gpu_name(name: str) -> str:
"""Convert asic.market_name from amd-smi to short version"""
name = name.replace("Instinct ", "")
# https://github.com/ROCm/amdsmi/blob/52b3947/src/amd_smi/amd_smi_utils.cc#L558-L593
if name == "MI300X-O":
return "MI300X"
Expand Down
1 change: 1 addition & 0 deletions src/tests/_internal/utils/test_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def test_convert_nvidia_gpu_name(self, test_input, expected):
["test_input", "expected"],
[
("MI300X-O", "MI300X"),
("Instinct MI210", "MI210"),
("MI300A", "MI300A"),
],
)
Expand Down

0 comments on commit eebd572

Please sign in to comment.