feat: add AMD GPU detection for ROCm backend in LocalAGI installation scripts

This commit is contained in:
John Doe
2026-03-04 00:04:07 -05:00
parent 7e897f4e93
commit f9755d1102
2 changed files with 8 additions and 0 deletions

View File

@@ -43,6 +43,10 @@ resolve_backend() {
backend="cu128"
elif [[ -e /dev/kfd ]]; then
backend="rocm7.2"
elif lspci 2>/dev/null | grep -qiE 'AMD|Radeon'; then
backend="rocm7.2"
elif grep -qEi '0x1002|0x1022' /sys/class/drm/renderD*/device/vendor /sys/class/drm/card*/device/vendor 2>/dev/null; then
backend="rocm7.2"
fi
fi
;;

View File

@@ -40,6 +40,10 @@ resolve_backend() {
backend="cu128"
elif [[ -e /dev/kfd ]]; then
backend="rocm7.2"
elif lspci 2>/dev/null | grep -qiE 'AMD|Radeon'; then
backend="rocm7.2"
elif grep -qEi '0x1002|0x1022' /sys/class/drm/renderD*/device/vendor /sys/class/drm/card*/device/vendor 2>/dev/null; then
backend="rocm7.2"
fi
fi
;;