Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion src/dstack/_internal/core/backends/base/offers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"oci-spot",
"lambda-arm",
"gcp-a4",
"gcp-g4-preview",
"gcp-dws-calendar-mode",
]

Expand Down
12 changes: 3 additions & 9 deletions src/dstack/_internal/core/backends/gcp/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,13 @@ def get_all_offers_with_availability(self) -> List[InstanceOfferWithAvailability
offer_keys_to_offers = {}
offers_with_availability = []
for offer in offers:
preview = False
if offer.instance.name.startswith("g4-standard-"):
if self.config.preview_features and "g4" in self.config.preview_features:
preview = True
else:
continue
Comment thread
jvstme marked this conversation as resolved.
region = offer.region[:-2] # strip zone
key = (_unique_instance_name(offer.instance), region)
if key in offer_keys_to_offers:
offer_keys_to_offers[key].availability_zones.append(offer.region)
continue
availability = InstanceAvailability.NO_QUOTA
if preview or _has_gpu_quota(quotas[region], offer.instance.resources):
if _has_gpu_quota(quotas[region], offer.instance.resources):
availability = InstanceAvailability.UNKNOWN
# todo quotas: cpu, memory, global gpu, tpu
offer_with_availability = InstanceOfferWithAvailability(
Expand Down Expand Up @@ -1027,8 +1021,8 @@ def _has_gpu_quota(quotas: Dict[str, float], resources: Resources) -> bool:
gpu = resources.gpus[0]
if _is_tpu(gpu.name):
return True
if gpu.name in ["B200", "H100"]:
# B200, H100 and H100_MEGA quotas are not returned by `regions_client.list`
if gpu.name in ["B200", "H100", "RTXPRO6000"]:
# B200, H100, H100_MEGA, and RTXPRO6000 quotas are not returned by `regions_client.list`
return True
quota_name = f"NVIDIA_{gpu.name}_GPUS"
if gpu.name == "A100" and gpu.memory_mib == 80 * 1024:
Expand Down