Skip to content

Commit

Permalink
feat: add support for gpu_driver_installation_config on nodepool (#1767)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Peabody <[email protected]>
  • Loading branch information
umeshkumhar and apeabody authored Oct 27, 2023
1 parent 3181f6c commit f43a241
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 0 deletions.
7 changes: 7 additions & 0 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,13 @@ resource "google_container_node_pool" "windows_pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down
14 changes: 14 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,13 @@ resource "google_container_node_pool" "pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down Expand Up @@ -716,6 +723,13 @@ resource "google_container_node_pool" "windows_pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down
14 changes: 14 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,13 @@ resource "google_container_node_pool" "pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down Expand Up @@ -944,6 +951,13 @@ resource "google_container_node_pool" "windows_pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down
14 changes: 14 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,13 @@ resource "google_container_node_pool" "pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down Expand Up @@ -868,6 +875,13 @@ resource "google_container_node_pool" "windows_pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down
14 changes: 14 additions & 0 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,13 @@ resource "google_container_node_pool" "pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down Expand Up @@ -925,6 +932,13 @@ resource "google_container_node_pool" "windows_pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down
14 changes: 14 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,13 @@ resource "google_container_node_pool" "pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down Expand Up @@ -849,6 +856,13 @@ resource "google_container_node_pool" "windows_pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down
14 changes: 14 additions & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,13 @@ resource "google_container_node_pool" "pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down Expand Up @@ -811,6 +818,13 @@ resource "google_container_node_pool" "windows_pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down
14 changes: 14 additions & 0 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,13 @@ resource "google_container_node_pool" "pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down Expand Up @@ -735,6 +742,13 @@ resource "google_container_node_pool" "windows_pools" {
type = lookup(each.value, "accelerator_type", "")
count = lookup(each.value, "accelerator_count", 0)
gpu_partition_size = lookup(each.value, "gpu_partition_size", null)

dynamic "gpu_driver_installation_config" {
for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : []
content {
gpu_driver_version = lookup(each.value, "gpu_driver_version", "")
}
}
}
}

Expand Down

0 comments on commit f43a241

Please sign in to comment.