Class: Google::Apis::BatchV1::Accelerator
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::Accelerator
- 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
-
#count ⇒ Fixnum
The number of accelerators of this type.
-
#driver_version ⇒ String
Optional.
-
#install_gpu_drivers ⇒ Boolean
(also: #install_gpu_drivers?)
Deprecated: please use instances[0].install_gpu_drivers instead.
-
#type ⇒ String
The accelerator type.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Accelerator
constructor
A new instance of Accelerator.
-
#update!(**args) ⇒ Object
Update properties of this object.
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
#count ⇒ Fixnum
The number of accelerators of this type.
Corresponds to the JSON property count
32 33 34 |
# File 'lib/google/apis/batch_v1/classes.rb', line 32 def count @count end |
#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.
Corresponds to the JSON property driverVersion
41 42 43 |
# File 'lib/google/apis/batch_v1/classes.rb', line 41 def driver_version @driver_version end |
#install_gpu_drivers ⇒ Boolean Also known as: install_gpu_drivers?
Deprecated: please use instances[0].install_gpu_drivers instead.
Corresponds to the JSON property installGpuDrivers
46 47 48 |
# File 'lib/google/apis/batch_v1/classes.rb', line 46 def install_gpu_drivers @install_gpu_drivers end |
#type ⇒ String
The accelerator type. For example, "nvidia-tesla-t4". See gcloud compute
accelerator-types list
.
Corresponds to the JSON property type
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 |