Google Cloud Batch V1 Client - Class Accelerator (0.14.0)

Reference documentation and code samples for the Google Cloud Batch V1 Client class Accelerator.

Accelerator describes Compute Engine accelerators to be attached to the VM.

Generated from protobuf message google.cloud.batch.v1.AllocationPolicy.Accelerator

Namespace

Google \ Cloud \ Batch \ V1 \ AllocationPolicy

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ type string

The accelerator type. For example, "nvidia-tesla-t4". See gcloud compute accelerator-types list.

↳ count int|string

The number of accelerators of this type.

↳ install_gpu_drivers bool

Deprecated: please use instances[0].install_gpu_drivers instead.

↳ driver_version string

Optional. The NVIDIA GPU driver version that should be installed for this type. You can define the specific driver version such as "470.103.01", following the driver version requirements in https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. Batch will install the specific accelerator driver if qualified.

getType

The accelerator type. For example, "nvidia-tesla-t4".

See gcloud compute accelerator-types list.

Returns
TypeDescription
string

setType

The accelerator type. For example, "nvidia-tesla-t4".

See gcloud compute accelerator-types list.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCount

The number of accelerators of this type.

Returns
TypeDescription
int|string

setCount

The number of accelerators of this type.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getInstallGpuDrivers

Deprecated: please use instances[0].install_gpu_drivers instead.

Returns
TypeDescription
bool

setInstallGpuDrivers

Deprecated: please use instances[0].install_gpu_drivers instead.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getDriverVersion

Optional. The NVIDIA GPU driver version that should be installed for this type.

You can define the specific driver version such as "470.103.01", following the driver version requirements in https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. Batch will install the specific accelerator driver if qualified.

Returns
TypeDescription
string

setDriverVersion

Optional. The NVIDIA GPU driver version that should be installed for this type.

You can define the specific driver version such as "470.103.01", following the driver version requirements in https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. Batch will install the specific accelerator driver if qualified.

Parameter
NameDescription
var string
Returns
TypeDescription
$this