Method: ComputeUnit::AmdGpu.create_from_path

Defined in:
lib/compute_unit/gpus/amd_gpu.rb

.create_from_path(device_path, index, use_opencl = false) ⇒ Object



311
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/compute_unit/gpus/amd_gpu.rb', line 311

def self.create_from_path(device_path, index, use_opencl = false)
  opts = {
    device_class_id: device_class(device_path),
    device_id: device(device_path),
    device_vendor_id: device_vendor(device_path),
    subsystem_vendor_id: subsystem_vendor(device_path),
    subsystem_device_id: subsystem_device(device_path),
    use_opencl: use_opencl,
    index: index
  }
  new(device_path, opts)
end