# Google Cloud Container V1 Client - Class AcceleratorConfig (2.10.0)

2.10.0 (latest) 2.9.0 2.8.1 2.7.0 2.6.1 2.5.0 2.4.0 2.3.4 2.2.1 2.1.0 2.0.0 1.33.0 1.32.0 1.31.0 1.30.3 1.24.0 1.23.0 1.22.0 1.21.1 1.20.0 1.19.0 1.18.0 1.17.1 1.16.0 1.15.0 1.14.0 1.13.1 1.12.1 1.10.3 1.9.1 Reference documentation and code samples for the Google Cloud Container V1 Client class AcceleratorConfig.

AcceleratorConfig represents a Hardware Accelerator request.

Generated from protobuf message `google.container.v1.AcceleratorConfig`

## Namespace

Google \\ Cloud \\ Container \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ accelerator_count` | `int|string` The number of the accelerator cards exposed to an instance. |
| `↳ accelerator_type` | `string` The accelerator type resource name. List of supported accelerators [here](https://cloud.google.com/compute/docs/gpus) |
| `↳ gpu_partition_size` | `string` Size of partitions to create on the GPU. Valid values are described in the NVIDIA [mig user guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). |
| `↳ gpu_sharing_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.GPUSharingConfig` The configuration for GPU sharing options. |
| `↳ gpu_driver_installation_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.GPUDriverInstallationConfig` The configuration for auto installation of GPU driver. |

### getAcceleratorCount

The number of the accelerator cards exposed to an instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setAcceleratorCount

The number of the accelerator cards exposed to an instance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAcceleratorType

The accelerator type resource name. List of supported accelerators
[here](https://cloud.google.com/compute/docs/gpus)

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setAcceleratorType

The accelerator type resource name. List of supported accelerators
[here](https://cloud.google.com/compute/docs/gpus)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getGpuPartitionSize

Size of partitions to create on the GPU. Valid values are described in the
NVIDIA [mig user
guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setGpuPartitionSize

Size of partitions to create on the GPU. Valid values are described in the
NVIDIA [mig user
guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getGpuSharingConfig

The configuration for GPU sharing options.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.GPUSharingConfig|null` |   |

### hasGpuSharingConfig

### clearGpuSharingConfig

### setGpuSharingConfig

The configuration for GPU sharing options.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.GPUSharingConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getGpuDriverInstallationConfig

The configuration for auto installation of GPU driver.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.GPUDriverInstallationConfig|null` |   |

### hasGpuDriverInstallationConfig

### clearGpuDriverInstallationConfig

### setGpuDriverInstallationConfig

The configuration for auto installation of GPU driver.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.GPUDriverInstallationConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |