Skip to content

Commit

Permalink
Merge pull request #3656 from annuay-google/annuay/fix-guest-accelerator
Browse files Browse the repository at this point in the history
Fix guest accelerator (broken for GKE)
  • Loading branch information
annuay-google authored Feb 10, 2025
2 parents ef76a1d + f0766dd commit 0107923
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/internal/gpu-definition/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ No resources.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_guest_accelerator"></a> [guest\_accelerator](#input\_guest\_accelerator) | List of the type and count of accelerator cards attached to the instance. | <pre>list(object({<br/> type = string,<br/> count = number<br/> }))</pre> | `[]` | no |
| <a name="input_guest_accelerator"></a> [guest\_accelerator](#input\_guest\_accelerator) | List of the type and count of accelerator cards attached to the instance. | <pre>list(object({<br/> type = string<br/> count = number<br/> gpu_driver_installation_config = optional(object({<br/> gpu_driver_version = string<br/> }), { gpu_driver_version = "DEFAULT" })<br/> gpu_partition_size = optional(string)<br/> gpu_sharing_config = optional(object({<br/> gpu_sharing_strategy = string<br/> max_shared_clients_per_gpu = number<br/> }))<br/> }))</pre> | `[]` | no |
| <a name="input_machine_type"></a> [machine\_type](#input\_machine\_type) | Machine type to use for the instance creation | `string` | n/a | yes |

## Outputs
Expand Down
10 changes: 9 additions & 1 deletion modules/internal/gpu-definition/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@ variable "machine_type" {
variable "guest_accelerator" {
description = "List of the type and count of accelerator cards attached to the instance."
type = list(object({
type = string,
type = string
count = number
gpu_driver_installation_config = optional(object({
gpu_driver_version = string
}), { gpu_driver_version = "DEFAULT" })
gpu_partition_size = optional(string)
gpu_sharing_config = optional(object({
gpu_sharing_strategy = string
max_shared_clients_per_gpu = number
}))
}))
default = []
nullable = false
Expand Down

0 comments on commit 0107923

Please sign in to comment.