Skip to content

OpenCode Defaults to CPU Instead of GPU #46607

Description

@van-thieu

Description

For local models through Ollama, OpenCode uses CPU processing instead of GPU on Linux (Ubuntu). Running Ollama standalone, it uses GPU, is there a way to force GPU usage when using command opencode serve?

Plugins

No response

OpenCode version

No response

Steps to reproduce

  1. opencode serve
  2. enter prompt
  3. select local model through provider Ollama
  4. press enter to initiate processing

OpenCode then defaults to CPU processing instead of GPU.

Screenshot and/or share link

No response

Operating System

Ubuntu 26.04

Terminal

Terminal

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions