Class: Google::Apis::BatchV1::Accelerator

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Accelerator

Returns a new instance of Accelerator.



55
56
57
# File 'lib/google/apis/batch_v1/classes.rb', line 55

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#countFixnum

The number of accelerators of this type. Corresponds to the JSON property count

Returns:

  • (Fixnum)


32
33
34
# File 'lib/google/apis/batch_v1/classes.rb', line 32

def count
  @count
end

#driver_versionString

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. Corresponds to the JSON property driverVersion

Returns:

  • (String)


41
42
43
# File 'lib/google/apis/batch_v1/classes.rb', line 41

def driver_version
  @driver_version
end

#install_gpu_driversBoolean Also known as: install_gpu_drivers?

Deprecated: please use instances[0].install_gpu_drivers instead. Corresponds to the JSON property installGpuDrivers

Returns:

  • (Boolean)


46
47
48
# File 'lib/google/apis/batch_v1/classes.rb', line 46

def install_gpu_drivers
  @install_gpu_drivers
end

#typeString

The accelerator type. For example, "nvidia-tesla-t4". See gcloud compute accelerator-types list. Corresponds to the JSON property type

Returns:

  • (String)


53
54
55
# File 'lib/google/apis/batch_v1/classes.rb', line 53

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



60
61
62
63
64
65
# File 'lib/google/apis/batch_v1/classes.rb', line 60

def update!(**args)
  @count = args[:count] if args.key?(:count)
  @driver_version = args[:driver_version] if args.key?(:driver_version)
  @install_gpu_drivers = args[:install_gpu_drivers] if args.key?(:install_gpu_drivers)
  @type = args[:type] if args.key?(:type)
end