anomalyco / anomalyco/opencode

OpenCode Defaults to CPU Instead of GPU

Open
#46,607 1 comment 0 reactions 1 assignee View on GitHub

@neriousy is already working on this.

Since Sep 1, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.