ollama - 💡(How to fix) Fix 有显卡有驱动就是无法调用 [17 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#14731Fetched 2026-04-08 00:32:23
View on GitHub
Comments
17
Participants
3
Timeline
18
Reactions
0
Timeline (top)
commented ×17labeled ×1

Code Example

(base) root@kittyzero:~# ollama ps
NAME              ID              SIZE      PROCESSOR    CONTEXT    UNTIL              
qwen3.5:latest    6488c96fa5fa    8.5 GB    100% CPU     4096       3 minutes from now  

(base) root@kittyzero:~# rocminfo | grep gfx
  Name:                    gfx1100                            
      Name:                    amdgcn-amd-amdhsa--gfx1100         
      Name:                    amdgcn-amd-amdhsa--gfx11-generic   
(base) root@kittyzero:~# dpkg -l|grep rocm
ii  rocm                                             7.2.0.70200-43~24.04                     amd64        Radeon Open Compute (ROCm) software stack meta package
ii  rocm-cmake                                       0.14.0.70200-43~24.04                    amd64        rocm-cmake built using CMake
ii  rocm-core                                        7.2.0.70200-43~24.04                     amd64        ROCm Runtime software stack
ii  rocm-dbgapi                                      0.77.4.70200-43~24.04                    amd64        Library to provide AMD GPU debugger API
ii  rocm-debug-agent                                 2.1.0.70200-43~24.04                     amd64        Radeon Open Compute Debug Agent (ROCdebug-agent)
ii  rocm-developer-tools                             7.2.0.70200-43~24.04                     amd64        Radeon Open Compute (ROCm) Runtime software stack
ii  rocm-device-libs                                 1.0.0.70200-43~24.04                     amd64        Radeon Open Compute - device libraries
ii  rocm-gdb                                         16.3.70200-43~24.04                      amd64        ROCgdb
ii  rocm-hip                                         7.2.0.70200-43~24.04                     amd64        Radeon Open Compute (ROCm) Runtime software stack
ii  rocm-llvm                                        22.0.0.26014.70200-43~24.04              amd64        ROCm core compiler
ii  rocm-opencl                                      2.0.0.70200-43~24.04                     amd64        clr built using CMake
ii  rocm-opencl-dev                                  2.0.0.70200-43~24.04                     amd64        clr built using CMake
ii  rocm-opencl-sdk                                  7.2.0.70200-43~24.04                     amd64        Radeon Open Compute (ROCm) Runtime software stack
ii  rocm-openmp                                      7.2.0.70200-43~24.04                     amd64        Radeon Open Compute (ROCm) OpenMP Software development Kit.
ii  rocm-smi-lib                                     7.8.0.70200-43~24.04                     amd64        AMD System Management libraries
ii  rocminfo
RAW_BUFFERClick to expand / collapse

What is the issue?

无法调用显卡

Relevant log output

(base) root@kittyzero:~# ollama ps
NAME              ID              SIZE      PROCESSOR    CONTEXT    UNTIL              
qwen3.5:latest    6488c96fa5fa    8.5 GB    100% CPU     4096       3 minutes from now  

(base) root@kittyzero:~# rocminfo | grep gfx
  Name:                    gfx1100                            
      Name:                    amdgcn-amd-amdhsa--gfx1100         
      Name:                    amdgcn-amd-amdhsa--gfx11-generic   
(base) root@kittyzero:~# dpkg -l|grep rocm
ii  rocm                                             7.2.0.70200-43~24.04                     amd64        Radeon Open Compute (ROCm) software stack meta package
ii  rocm-cmake                                       0.14.0.70200-43~24.04                    amd64        rocm-cmake built using CMake
ii  rocm-core                                        7.2.0.70200-43~24.04                     amd64        ROCm Runtime software stack
ii  rocm-dbgapi                                      0.77.4.70200-43~24.04                    amd64        Library to provide AMD GPU debugger API
ii  rocm-debug-agent                                 2.1.0.70200-43~24.04                     amd64        Radeon Open Compute Debug Agent (ROCdebug-agent)
ii  rocm-developer-tools                             7.2.0.70200-43~24.04                     amd64        Radeon Open Compute (ROCm) Runtime software stack
ii  rocm-device-libs                                 1.0.0.70200-43~24.04                     amd64        Radeon Open Compute - device libraries
ii  rocm-gdb                                         16.3.70200-43~24.04                      amd64        ROCgdb
ii  rocm-hip                                         7.2.0.70200-43~24.04                     amd64        Radeon Open Compute (ROCm) Runtime software stack
ii  rocm-llvm                                        22.0.0.26014.70200-43~24.04              amd64        ROCm core compiler
ii  rocm-opencl                                      2.0.0.70200-43~24.04                     amd64        clr built using CMake
ii  rocm-opencl-dev                                  2.0.0.70200-43~24.04                     amd64        clr built using CMake
ii  rocm-opencl-sdk                                  7.2.0.70200-43~24.04                     amd64        Radeon Open Compute (ROCm) Runtime software stack
ii  rocm-openmp                                      7.2.0.70200-43~24.04                     amd64        Radeon Open Compute (ROCm) OpenMP Software development Kit.
ii  rocm-smi-lib                                     7.8.0.70200-43~24.04                     amd64        AMD System Management libraries
ii  rocminfo

OS

Linux

GPU

AMD

CPU

Intel

Ollama version

v0.17.7

extent analysis

Fix Plan

To resolve the issue of being unable to call the graphics card, we need to ensure that the ROCm (Radeon Open Compute) software stack is properly installed and configured. Here are the steps:

  • Verify ROCm Installation: Check if ROCm is correctly installed by running rocminfo. If it's not installed, install it using the official AMD ROCm installation guide.
  • Update ROCm: Ensure you are running the latest version of ROCm. You can update ROCm by running sudo apt update && sudo apt upgrade.
  • Configure ROCm: Run sudo apt install rocm-dev to install the ROCm development package, which includes the necessary headers and libraries for development.
  • Restart Services: Restart the ROCm services by running sudo systemctl restart rocm-smi and sudo systemctl restart rocminfo.

Example Code

To test if the graphics card is accessible, you can use the following Python code with the pyopencl library:

import pyopencl as cl

# Create a context
ctx = cl.create_some_context()

# Print the device information
print(ctx.devices)

This code should print information about the available OpenCL devices, including the AMD graphics card.

Verification

To verify that the fix worked, run the ollama ps command again to check if the graphics card is being utilized. You should see the GPU being used by the process.

Extra Tips

  • Ensure that your system meets the minimum requirements for ROCm.
  • If you encounter issues with the rocminfo command, try running it with elevated privileges using sudo.
  • For more information on ROCm and its configuration, refer to the official AMD ROCm documentation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

ollama - 💡(How to fix) Fix 有显卡有驱动就是无法调用 [17 comments, 3 participants]