Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions src/gpuhunt/_internal/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@ def is_nvidia_superchip(gpu_name: str) -> bool:
architecture=AMDArchitecture.CDNA3,
device_ids=(0x74A5,),
),
AMDGPUInfo(
name="MI350X",
memory=288,
architecture=AMDArchitecture.CDNA4,
device_ids=(0x75A0,),
),
AMDGPUInfo(
name="MI355X",
memory=288,
Expand Down
16 changes: 10 additions & 6 deletions src/gpuhunt/providers/cloudrift.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import requests

from gpuhunt import QueryFilter, RawCatalogItem
from gpuhunt._internal.models import AcceleratorVendor
from gpuhunt.providers import AbstractProvider

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -33,13 +34,14 @@ def _get_instance_types(self):

def generate_instances(instance) -> list[RawCatalogItem]:
instance_gpu_brand = instance["brand_short"]
dstack_gpu_name = next(
iter(gpu_record[1] for gpu_record in GPU_MAP if gpu_record[0] in instance_gpu_brand), None
gpu_info = next(
(gpu_record for gpu_record in GPU_MAP if gpu_record[0] in instance_gpu_brand), None
)
if dstack_gpu_name is None:
if gpu_info is None:
logger.warning(f"Failed to find GPU name matching '{instance_gpu_brand}'")
return []

_, dstack_gpu_name, gpu_vendor = gpu_info
instance_types = []
for variant in instance["variants"]:
for location, _count in variant["nodes_per_dc"].items():
Expand All @@ -54,16 +56,18 @@ def generate_instances(instance) -> list[RawCatalogItem]:
gpu_count=variant["gpu_count"],
gpu_name=dstack_gpu_name,
gpu_memory=round(variant["vram"] / 1024**3),
gpu_vendor=gpu_vendor,
)
instance_types.append(raw)

return instance_types


GPU_MAP = [
("RTX 4090", "RTX4090"),
("RTX 5090", "RTX5090"),
("RTX PRO 6000", "RTXPRO6000"),
("MI350X", "MI350X", AcceleratorVendor.AMD),
("RTX 4090", "RTX4090", AcceleratorVendor.NVIDIA),
("RTX 5090", "RTX5090", AcceleratorVendor.NVIDIA),
("RTX PRO 6000", "RTXPRO6000", AcceleratorVendor.NVIDIA),
]


Expand Down
Loading