@@ -268,12 +268,18 @@ message JobNotification {
268268// resources should be allocated for the Job.
269269message AllocationPolicy {
270270 message LocationPolicy {
271- // A list of allowed location names represented by internal URLs,
272- // First location in the list must be a region.
273- // for example,
274- // ["regions/us-central1"] allow VMs in region us-central1,
275- // ["regions/us-central1", "zones/us-central1-a"] only allow VMs in zone
276- // us-central1-a.
271+ // A list of allowed location names represented by internal URLs.
272+ // Each location can be a region or a zone.
273+ // Only one region or multiple zones in one region is supported now.
274+ // For example,
275+ // ["regions/us-central1"] allow VMs in any zones in region us-central1.
276+ // ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
277+ // in zones us-central1-a and us-central1-c.
278+ // All locations end up in different regions would cause errors.
279+ // For example,
280+ // ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
281+ // "zones/us-west1-a"] contains 2 regions "us-central1" and
282+ // "us-west1". An error is expected in this case.
277283 repeated string allowed_locations = 1 ;
278284
279285 // A list of denied location names.
@@ -282,7 +288,10 @@ message AllocationPolicy {
282288 repeated string denied_locations = 2 ;
283289 }
284290
285- // A new persistent disk.
291+ // A new persistent disk or a local ssd.
292+ // A VM can only have one local SSD setting but multiple local SSD partitions.
293+ // https://cloud.google.com/compute/docs/disks#pdspecs.
294+ // https://cloud.google.com/compute/docs/disks#localssds.
286295 message Disk {
287296 // A data source from which a PD will be created.
288297 oneof data_source {
@@ -294,15 +303,23 @@ message AllocationPolicy {
294303 }
295304
296305 // Disk type as shown in `gcloud compute disk-types list`
297- // For example, "pd-ssd", "pd-standard", "pd-balanced".
306+ // For example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd" .
298307 string type = 1 ;
299308
300309 // Disk size in GB.
301310 // This field is ignored if `data_source` is `disk` or `image`.
311+ // If `type` is `local-ssd`, size_gb should be a multiple of 375GB,
312+ // otherwise, the final size will be the next greater multiple of 375 GB.
302313 int64 size_gb = 2 ;
314+
315+ // Local SSDs are available through both "SCSI" and "NVMe" interfaces.
316+ // If not indicated, "NVMe" will be the default one for local ssds.
317+ // We only support "SCSI" for persistent disks now.
318+ string disk_interface = 6 ;
303319 }
304320
305- // A new or an existing persistent disk attached to a VM instance.
321+ // A new or an existing persistent disk or a local ssd attached to a VM
322+ // instance.
306323 message AttachedDisk {
307324 oneof attached {
308325 Disk new_disk = 1 ;
@@ -324,6 +341,10 @@ message AllocationPolicy {
324341
325342 // The number of accelerators of this type.
326343 int64 count = 2 ;
344+
345+ // When true, Batch will install the GPU drivers.
346+ // This field will be ignored if specified.
347+ bool install_gpu_drivers = 3 [deprecated = true ];
327348 }
328349
329350 // InstancePolicy describes an instance type and resources attached to each VM
@@ -363,6 +384,8 @@ message AllocationPolicy {
363384 // c++ keyword conflict.
364385 string instance_template = 2 ;
365386 }
387+
388+ bool install_gpu_drivers = 3 ;
366389 }
367390
368391 // A network interface.
0 commit comments