Skip to content

fix issue 23977#24172

Open
zihaomu wants to merge 1 commit into
ggml-org:masterfrom
zihaomu:fix/hip-integrated-device-prop
Open

fix issue 23977#24172
zihaomu wants to merge 1 commit into
ggml-org:masterfrom
zihaomu:fix/hip-integrated-device-prop

Conversation

@zihaomu
Copy link
Copy Markdown

@zihaomu zihaomu commented Jun 5, 2026

Overview

This solution is taken from #23977. Credits to @mapatel-amd for identifying the root cause and proposing the fix.

Test Hard ware env:

Strix Halo 128G

Test Software env:

  Local environment:
  - OS: Ubuntu 24.04.4 LTS, Linux 6.17.0-23-generic, x86_64
  - Hardware: AMD Ryzen AI MAX+ 395 with Radeon 8060S Graphics
  - ROCm device: gfx1151 / Radeon 8060S Graphics
  - Reported ROCm memory: 122880 MiB
  - HIP: 7.12.60610-2bd1678d3d
  - AMD clang: 22.0.0git
  - CMake: 3.28.3
  - Ninja: 1.11.1
  - Base commit: 59917d392
  - Test branch commit: 1bf74b70e

Build configuration:

  PATH=/opt/rocm/core-7.12/bin:$PATH \
  HIPCXX=/opt/rocm/core-7.12/lib/llvm/bin/clang \
  HIP_PATH=/opt/rocm/core-7.12 \
  cmake -S . -B build-hip-issue23977 -G Ninja \
    -DGGML_HIP=ON \
    -DGPU_TARGETS=gfx1151 \
    -DCMAKE_BUILD_TYPE=Release \
    -DLLAMA_BUILD_TESTS=ON
  cmake --build build-hip-issue23977 --target llama-bench -j 16
  cmake --build build-hip-issue23977 --target test-backend-ops -j 16

A/B validation method:

I used a small local probe, not committed to the repo, to query:

  • ggml_backend_cuda_host_buffer_type()
  • ggml_backend_dev_supports_buft(dev, ROCm_Host)

The same machine and same HIP build configuration were used before and after the patch.

A/B result:

Before:

  device=0 name=ROCm0 type=2 host_buft=ROCm_Host supports_host_buft=0

After:

  device=0 name=ROCm0 type=2 host_buft=ROCm_Host supports_host_buft=1

@zihaomu zihaomu requested a review from a team as a code owner June 5, 2026 10:05
@github-actions github-actions Bot added Nvidia GPU Issues specific to Nvidia GPUs ggml changes relating to the ggml tensor library for machine learning labels Jun 5, 2026
@ggml-gh-bot
Copy link
Copy Markdown

ggml-gh-bot Bot commented Jun 5, 2026

Hi @zihaomu, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

  • Multiple open PRs from a new contributor: We limit new contributors (those without a previously merged PR) to 1 open PR at a time. You currently have 2 open PRs.

Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning Nvidia GPU Issues specific to Nvidia GPUs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant