Skip to content

Commit

Permalink
add support for gpu_driver_installation_config
Browse files Browse the repository at this point in the history
  • Loading branch information
umeshkumhar committed Oct 11, 2023
1 parent 7c28e82 commit 9432d5b
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 @@ -846,6 +846,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 @@ -734,6 +734,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 @@ -962,6 +969,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 @@ -640,6 +640,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 @@ -867,6 +874,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 @@ -715,6 +715,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 @@ -943,6 +950,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 @@ -621,6 +621,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 @@ -848,6 +855,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 @@ -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 @@ -830,6 +837,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 9432d5b

Please sign in to comment.