Class: Google::Apis::DataprocV1::AcceleratorConfig

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

Overview

Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/ docs/gpus/).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AcceleratorConfig

Returns a new instance of AcceleratorConfig.



50
51
52
# File 'lib/google/apis/dataproc_v1/classes.rb', line 50

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

Instance Attribute Details

#accelerator_countFixnum

The number of the accelerator cards of this type exposed to this instance. Corresponds to the JSON property acceleratorCount

Returns:

  • (Fixnum)


34
35
36
# File 'lib/google/apis/dataproc_v1/classes.rb', line 34

def accelerator_count
  @accelerator_count
end

#accelerator_type_uriString

Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud. google.com/compute/docs/reference/v1/acceleratorTypes).Examples: https://www. googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/ nvidia-tesla-t4 projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia- tesla-t4 nvidia-tesla-t4Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/ configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla- t4. Corresponds to the JSON property acceleratorTypeUri

Returns:

  • (String)


48
49
50
# File 'lib/google/apis/dataproc_v1/classes.rb', line 48

def accelerator_type_uri
  @accelerator_type_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

def update!(**args)
  @accelerator_count = args[:accelerator_count] if args.key?(:accelerator_count)
  @accelerator_type_uri = args[:accelerator_type_uri] if args.key?(:accelerator_type_uri)
end