Merge pull request #1813 from ewojtach/fix/ai-models-support

empty gpu sharing config fix
This commit is contained in:
Wiktor Niesiobędzki 2023-10-27 11:49:34 +02:00 committed by GitHub
commit 86d7ac1227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -168,7 +168,10 @@ resource "google_container_node_pool" "nodepool" {
gpu_partition_size = var.node_config.guest_accelerator.gpu_driver == null ? null : var.node_config.guest_accelerator.gpu_driver.partition_size
dynamic "gpu_sharing_config" {
for_each = var.node_config.guest_accelerator.gpu_driver != null ? [""] : []
for_each = lookup(
lookup(var.node_config.guest_accelerator, "gpu_driver", {}),
"max_shared_clients_per_gpu"
) != null ? [""] : []
content {
gpu_sharing_strategy = var.node_config.guest_accelerator.gpu_driver.max_shared_clients_per_gpu != null ? "TIME_SHARING" : null
max_shared_clients_per_gpu = var.node_config.guest_accelerator.gpu_driver.max_shared_clients_per_gpu

View File

@ -29,9 +29,7 @@ values:
gpu_driver_installation_config:
- gpu_driver_version: LATEST
gpu_partition_size: null
gpu_sharing_config:
- gpu_sharing_strategy: null
max_shared_clients_per_gpu: null
gpu_sharing_config: null
type: nvidia-tesla-a100
gvnic: []
machine_type: a2-highgpu-1g