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.



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

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

#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)


37
38
39
# File 'lib/google/apis/batch_v1/classes.rb', line 37

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)


44
45
46
# File 'lib/google/apis/batch_v1/classes.rb', line 44

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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