open-nomad/devices/gpu/nvidia
Mahmood Ali c5de71a424 Allow nullable fields in StatValues
In state values, we need to be able to distinguish between zero values
(e.g. `false`) and unset values (e.g. `nil`).

We can alternatively use protobuf `oneOf` and nested map to ensure
consistency of fields that are set together, but the golang
representation does not represent that well and introducing a mismatch
between representations.  Thus, I opted not to use it.
2018-11-14 14:41:19 -05:00
..
cmd nvidia package restructue + build non-linux 2018-10-05 13:56:04 -07:00
nvml nvidia package restructue + build non-linux 2018-10-05 13:56:04 -07:00
device.go remove unused struct field 2018-11-07 11:55:06 -08:00
device_test.go nvidia package restructue + build non-linux 2018-10-05 13:56:04 -07:00
fingerprint.go Device manager 2018-11-07 10:43:15 -08:00
fingerprint_test.go Use Attribute in device fingerprinting 2018-10-13 11:43:06 -07:00
README.md Device manager 2018-11-07 10:43:15 -08:00
stats.go Allow nullable fields in StatValues 2018-11-14 14:41:19 -05:00
stats_test.go Allow nullable fields in StatValues 2018-11-14 14:41:19 -05:00

This package provides an implementation of nvidia device plugin

Behavior

Nvidia device plugin uses NVML bindings to get data regarding available nvidia devices and will expose them via Fingerprint RPC. GPUs can be excluded from fingerprinting by setting the ignored_gpu_ids field. Plugin sends statistics for fingerprinted devices every stats_period period.

Config

The configuration should be passed via an HCL file that begins with a top level config stanza:

config {
  ignored_gpu_ids = ["uuid1", "uuid2"]
  fingerprint_period = "5s"
}

The valid configuration options are:

  • ignored_gpu_ids (list(string): []): list of GPU UUIDs strings that should not be exposed to nomad
  • fingerprint_period (string: "5s"): The interval to repeat fingerprint process to identify possible changes.