Skip to content

Commit 7c2db9d

Browse files
[GCP] Support G4 instance type GA (#3213)
Co-authored-by: Jvst Me <[email protected]>
1 parent 44c46ea commit 7c2db9d

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

src/dstack/_internal/core/backends/base/offers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"oci-spot",
2424
"lambda-arm",
2525
"gcp-a4",
26-
"gcp-g4-preview",
26+
"gcp-g4",
2727
"gcp-dws-calendar-mode",
2828
]
2929

src/dstack/_internal/core/backends/gcp/compute.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,13 @@ def get_all_offers_with_availability(self) -> List[InstanceOfferWithAvailability
146146
offer_keys_to_offers = {}
147147
offers_with_availability = []
148148
for offer in offers:
149-
preview = False
150-
if offer.instance.name.startswith("g4-standard-"):
151-
if self.config.preview_features and "g4" in self.config.preview_features:
152-
preview = True
153-
else:
154-
continue
155149
region = offer.region[:-2] # strip zone
156150
key = (_unique_instance_name(offer.instance), region)
157151
if key in offer_keys_to_offers:
158152
offer_keys_to_offers[key].availability_zones.append(offer.region)
159153
continue
160154
availability = InstanceAvailability.NO_QUOTA
161-
if preview or _has_gpu_quota(quotas[region], offer.instance.resources):
155+
if _has_gpu_quota(quotas[region], offer.instance.resources):
162156
availability = InstanceAvailability.UNKNOWN
163157
# todo quotas: cpu, memory, global gpu, tpu
164158
offer_with_availability = InstanceOfferWithAvailability(
@@ -1027,8 +1021,8 @@ def _has_gpu_quota(quotas: Dict[str, float], resources: Resources) -> bool:
10271021
gpu = resources.gpus[0]
10281022
if _is_tpu(gpu.name):
10291023
return True
1030-
if gpu.name in ["B200", "H100"]:
1031-
# B200, H100 and H100_MEGA quotas are not returned by `regions_client.list`
1024+
if gpu.name in ["B200", "H100", "RTXPRO6000"]:
1025+
# B200, H100, H100_MEGA, and RTXPRO6000 quotas are not returned by `regions_client.list`
10321026
return True
10331027
quota_name = f"NVIDIA_{gpu.name}_GPUS"
10341028
if gpu.name == "A100" and gpu.memory_mib == 80 * 1024:

src/dstack/_internal/core/backends/gcp/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ class GCPBackendConfig(CoreModel):
9292
preview_features: Annotated[
9393
Optional[List[Literal["g4"]]],
9494
Field(
95-
description=("The list of preview GCP features to enable. Supported values: `g4`"),
95+
description=(
96+
"The list of preview GCP features to enable."
97+
" There are currently no preview features"
98+
),
9699
max_items=1,
97100
),
98101
] = None

0 commit comments

Comments
 (0)