Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for gpu_sharing_config on nodepool #1874

Merged
merged 9 commits into from
May 24, 2024
8 changes: 8 additions & 0 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,14 @@ resource "google_container_node_pool" "windows_pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
apeabody marked this conversation as resolved.
Show resolved Hide resolved
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
apeabody marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
}

Expand Down
16 changes: 16 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,14 @@ resource "google_container_node_pool" "pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down Expand Up @@ -816,6 +824,14 @@ resource "google_container_node_pool" "windows_pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down
16 changes: 16 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
apeabody marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,14 @@ resource "google_container_node_pool" "pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down Expand Up @@ -1008,6 +1016,14 @@ resource "google_container_node_pool" "windows_pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down
16 changes: 16 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,14 @@ resource "google_container_node_pool" "pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down Expand Up @@ -932,6 +940,14 @@ resource "google_container_node_pool" "windows_pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down
16 changes: 16 additions & 0 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,14 @@ resource "google_container_node_pool" "pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down Expand Up @@ -989,6 +997,14 @@ resource "google_container_node_pool" "windows_pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down
16 changes: 16 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,14 @@ resource "google_container_node_pool" "pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down Expand Up @@ -913,6 +921,14 @@ resource "google_container_node_pool" "windows_pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down
16 changes: 16 additions & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,14 @@ resource "google_container_node_pool" "pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down Expand Up @@ -911,6 +919,14 @@ resource "google_container_node_pool" "windows_pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down
16 changes: 16 additions & 0 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,14 @@ resource "google_container_node_pool" "pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down Expand Up @@ -835,6 +843,14 @@ resource "google_container_node_pool" "windows_pools" {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}

dynamic "gpu_sharing_config" {
for_each = lookup(each.value, "gpu_sharing_strategy", "") != "" ? [1] : []
content {
gpu_sharing_strategy = lookup(each.value, "gpu_sharing_strategy", "")
max_shared_clients_per_gpu = lookup(each.value, "max_shared_clients_per_gpu", 2)
}
}
}
}

Expand Down