shell: gpumean should not report renderD nodes as separate GPUs
This commit is contained in:
parent
fffd6bf5b8
commit
d82e4cd4bd
1 changed files with 3 additions and 1 deletions
|
|
@ -165,7 +165,9 @@ in
|
||||||
# abort the function before the emptiness check below. -L is required —
|
# abort the function before the emptiness check below. -L is required —
|
||||||
# /sys/class/drm/cardN is a symlink, so a plain find never descends into
|
# /sys/class/drm/cardN is a symlink, so a plain find never descends into
|
||||||
# it and silently reports no GPUs at all.
|
# it and silently reports no GPUs at all.
|
||||||
set -l cards (find -L /sys/class/drm -maxdepth 3 -name gpu_busy_percent 2>/dev/null | sort)
|
# cardN only — renderDN is the same physical device under a second name
|
||||||
|
# and would otherwise be reported twice.
|
||||||
|
set -l cards (find -L /sys/class/drm -maxdepth 3 -name gpu_busy_percent 2>/dev/null | grep -E '/card[0-9]+/' | sort)
|
||||||
if test (count $cards) -eq 0
|
if test (count $cards) -eq 0
|
||||||
echo "no gpu_busy_percent found (amdgpu/i915 only — nvidia doesn't expose it)"
|
echo "no gpu_busy_percent found (amdgpu/i915 only — nvidia doesn't expose it)"
|
||||||
return 1
|
return 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue