Method: ComputeUnit::AmdGpu#debug_dri_dir
- Defined in:
- lib/compute_unit/gpus/amd_gpu.rb
#debug_dri_dir ⇒ String
ie. “/sys/kernel/debug/dri/0”
345 346 347 348 349 350 351 352 353 |
# File 'lib/compute_unit/gpus/amd_gpu.rb', line 345 def debug_dri_dir @debug_dri_dir ||= begin # if the user does not have permission the path will be nil path = Dir.glob(File.join(SYS_DEBUG_PATH, '*', 'name')).find { |file| File.read(file).include?(pci_loc) } raise Errno::EACCES.new("Permission denied #{SYS_DEBUG_PATH}") unless path File.dirname(path) end end |