Description
LocalAI version:
master
branch (latest commit)
Environment, CPU architecture, OS, and Version:
linux 6.15.4-100.fc41.x86_64
on a system with an AMD Strix Halo APU.
Describe the bug
The All-in-One (AIO) container's entrypoint script (aio/entrypoint.sh
) fails to detect modern AMD GPUs/APUs that are identified as a "Display controller" by lspci
. The script currently only checks for devices labeled as "VGA" or "3D controller", causing it to miss newer hardware like the AMD Strix Halo series.
To Reproduce
- Run the LocalAI AIO container on a system with a modern AMD APU (e.g., AMD Strix Halo).
- The automatic GPU detection will fail for the AMD device.
- The script will fall back to CPU mode, even though a capable GPU is present.
The problematic code is within the check_amd
function in aio/entrypoint.sh
:
function check_amd() {
if lspci | grep -E 'VGA|3D' | grep -iq amd; then
echo "AMD GPU detected"
# ...
Expected behavior
The script should correctly detect the presence of the AMD GPU and enable GPU acceleration within the container. The lspci
filter should be updated to recognize "Display controller" as a valid identifier for a GPU.
A suggested fix is to modify the grep
pattern:
# aio/entrypoint.sh line 36
if lspci | grep -E 'VGA|3D|Display' | grep -iq amd; then
Logs
The relevant output from lspci
on the affected system shows the GPU is listed as a Display controller
:
c5:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Strix Halo [Radeon Graphics / Radeon 8050S Graphics / Radeon 8060S Graphics] (rev c1)
Additional context
This issue likely affects a growing number of new systems using modern AMD APUs where the integrated graphics are not classified under the older "VGA" or "3D" labels. Updating the detection script will improve hardware compatibility for many users.