[PR #13463] ggml: fix mem_hip reporting zero GPU memory on AMD APUs (MI300A) #60917

Open
opened 2026-04-29 16:01:50 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13463
Author: @javicacheiro
Created: 12/14/2025
Status: 🔄 Open

Base: mainHead: fix-amd-apu-wrong-memory


📝 Commits (1)

  • cfa6102 ggml: fix mem_hip incorrectly reporting zero memory for AMD APUs (#8735)

📊 Changes

1 file changed (+26 additions, -2 deletions)

View changed files

📝 ml/backend/ggml/ggml/src/mem_hip.cpp (+26 -2)

📄 Description

AMD APUs (e.g. MI300A) use unified CPU/GPU memory and therefore report zero VRAM.

This regression affects MI300A starting in v0.13.0. (v0.12.11 works fine). As a result the MI300A GPU can't be used with newer ollama versions as reported in issue #8735.

The issue is caused by relying on mem_info_vram_total to determine total GPU memory. On AMD APUs such as MI300A GPU-accessible memory is only exposed via GTT (mem_info_gtt_total), which represents the unified memory pool available to the GPU.

This PR updates mem_hip to take this into account.

Tested on MI300A.

Fixes #8735


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/13463 **Author:** [@javicacheiro](https://github.com/javicacheiro) **Created:** 12/14/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-amd-apu-wrong-memory` --- ### 📝 Commits (1) - [`cfa6102`](https://github.com/ollama/ollama/commit/cfa6102c54ee0e4e7c839878b61586ddb2b5b92e) ggml: fix mem_hip incorrectly reporting zero memory for AMD APUs (#8735) ### 📊 Changes **1 file changed** (+26 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `ml/backend/ggml/ggml/src/mem_hip.cpp` (+26 -2) </details> ### 📄 Description AMD APUs (e.g. MI300A) use unified CPU/GPU memory and therefore report zero VRAM. This regression affects MI300A starting in v0.13.0. (v0.12.11 works fine). As a result the MI300A GPU can't be used with newer ollama versions as reported in issue #8735. The issue is caused by relying on `mem_info_vram_total` to determine total GPU memory. On AMD APUs such as MI300A GPU-accessible memory is only exposed via GTT (`mem_info_gtt_total`), which represents the unified memory pool available to the GPU. This PR updates `mem_hip` to take this into account. Tested on MI300A. Fixes #8735 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-29 16:01:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#60917