[PR #25299] Add support for gfx1151 (Ryzen AI Max+) (Strix Halo) #18155

Open
opened 2026-02-05 16:33:35 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/25299
Author: @boyvanamstel
Created: 1/16/2026
Status: 🔄 Open

Base: mainHead: feat/support-gfx1151-strix-halo


📝 Commits (3)

📊 Changes

3 files changed (+8 additions, -188 deletions)

View changed files

📝 machine-learning/Dockerfile (+5 -6)
machine-learning/patches/0001-disable-rocm-conv-algo-caching.patch (+0 -179)
📝 machine-learning/patches/0002-install-system-deps.patch (+3 -3)

📄 Description

Description

Maybe I'm oversimplifying this but adding gfx1151 CMAKE_HIP_ARCHITECTURES allows the machine learning image to run on my Ryzen AI Max+ 395 without throwing errors.

How Has This Been Tested?

Previously the image would throw an error when I enabled my GPU. Now when I add this value and set HSA_OVERRIDE_GFX_VERSION=11.5.1 it appears to be working as expected:

immich_machine_learning  | [01/16/26 10:54:39] INFO     Loading detection model 'buffalo_l' to memory
immich_machine_learning  | [01/16/26 10:54:39] INFO     Setting execution providers to
immich_machine_learning  |                              ['CPUExecutionProvider'], in descending order of
immich_machine_learning  |                              preference
immich_machine_learning  | [01/16/26 10:54:39] INFO     Loading visual model 'ViT-B-32__openai' to memory
immich_machine_learning  | [01/16/26 10:54:39] INFO     Setting execution providers to
immich_machine_learning  |                              ['CPUExecutionProvider'], in descending order of
immich_machine_learning  |                              preference
immich_machine_learning  | [01/16/26 10:54:39] INFO     Loading detection model 'PP-OCRv5_mobile' to memory
immich_machine_learning  | [01/16/26 10:54:39] INFO     Setting execution providers to
immich_machine_learning  |                              ['CPUExecutionProvider'], in descending order of
immich_machine_learning  |                              preference
immich_machine_learning  | [01/16/26 10:54:39] INFO     Loading recognition model 'buffalo_l' to memory
immich_machine_learning  | [01/16/26 10:54:39] INFO     Setting execution providers to
immich_machine_learning  |                              ['CPUExecutionProvider'], in descending order of
immich_machine_learning  |                              preference
immich_machine_learning  | [01/16/26 10:54:39] INFO     Loading recognition model 'PP-OCRv5_mobile' to
immich_machine_learning  |                              memory
immich_machine_learning  | [01/16/26 10:54:39] INFO     Setting execution providers to
immich_machine_learning  |                              ['CPUExecutionProvider'], in descending order of
immich_machine_learning  |                              preference
immich_machine_learning  | [INFO] 2026-01-16 10:54:39,967 [RapidOCR] base.py:22: Using engine_name: onnxruntime

I've not yet ran it through a large set of images to see if it spiked my GPU usage. Tried a larger number of images and saw some activity. Hard to determine with certainty that it's caused by the machine learning image.

Triggered the Smart Search job and I see more activity on my CPU.

Machine learning part of my config:

// docker-compose.yml

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: immich-machine-learning-gfx1151:latest
    extends: # uncomment this section for hardware acceleration - see https://docs.immich.app/features/ml-hardware-acceleration
      file: hwaccel.ml.yml
      service: rocm # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false
    environment:
      - HSA_OVERRIDE_GFX_VERSION=11.5.1
      - HSA_USE_SVM=0

And the hwaccel.ml config:

// hwaccel.ml.yml

  rocm:
    group_add:
      - video
    devices:
      - /dev/dri:/dev/dri
      - /dev/kfd:/dev/kfd

Running through docker-compose.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

Not used.


🔄 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/immich-app/immich/pull/25299 **Author:** [@boyvanamstel](https://github.com/boyvanamstel) **Created:** 1/16/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/support-gfx1151-strix-halo` --- ### 📝 Commits (3) - [`78ff32b`](https://github.com/immich-app/immich/commit/78ff32bb7446fda06f271e19b6d59c7daf6a5fb3) Add support for gfx1151 - [`8f809c5`](https://github.com/immich-app/immich/commit/8f809c55a01274ee5909e7cc8a6f5e54cfffdaed) Fix build - [`b93b0a6`](https://github.com/immich-app/immich/commit/b93b0a60f582294a9e12116491222e2a985faaf7) Remove debug statement ### 📊 Changes **3 files changed** (+8 additions, -188 deletions) <details> <summary>View changed files</summary> 📝 `machine-learning/Dockerfile` (+5 -6) ➖ `machine-learning/patches/0001-disable-rocm-conv-algo-caching.patch` (+0 -179) 📝 `machine-learning/patches/0002-install-system-deps.patch` (+3 -3) </details> ### 📄 Description ## Description Maybe I'm oversimplifying this but adding gfx1151 `CMAKE_HIP_ARCHITECTURES` allows the machine learning image to run on my Ryzen AI Max+ 395 without throwing errors. ## How Has This Been Tested? Previously the image would throw an error when I enabled my GPU. Now when I add this value and set `HSA_OVERRIDE_GFX_VERSION=11.5.1` it appears to be working as expected: ``` immich_machine_learning | [01/16/26 10:54:39] INFO Loading detection model 'buffalo_l' to memory immich_machine_learning | [01/16/26 10:54:39] INFO Setting execution providers to immich_machine_learning | ['CPUExecutionProvider'], in descending order of immich_machine_learning | preference immich_machine_learning | [01/16/26 10:54:39] INFO Loading visual model 'ViT-B-32__openai' to memory immich_machine_learning | [01/16/26 10:54:39] INFO Setting execution providers to immich_machine_learning | ['CPUExecutionProvider'], in descending order of immich_machine_learning | preference immich_machine_learning | [01/16/26 10:54:39] INFO Loading detection model 'PP-OCRv5_mobile' to memory immich_machine_learning | [01/16/26 10:54:39] INFO Setting execution providers to immich_machine_learning | ['CPUExecutionProvider'], in descending order of immich_machine_learning | preference immich_machine_learning | [01/16/26 10:54:39] INFO Loading recognition model 'buffalo_l' to memory immich_machine_learning | [01/16/26 10:54:39] INFO Setting execution providers to immich_machine_learning | ['CPUExecutionProvider'], in descending order of immich_machine_learning | preference immich_machine_learning | [01/16/26 10:54:39] INFO Loading recognition model 'PP-OCRv5_mobile' to immich_machine_learning | memory immich_machine_learning | [01/16/26 10:54:39] INFO Setting execution providers to immich_machine_learning | ['CPUExecutionProvider'], in descending order of immich_machine_learning | preference immich_machine_learning | [INFO] 2026-01-16 10:54:39,967 [RapidOCR] base.py:22: Using engine_name: onnxruntime ``` ~I've not yet ran it through a large set of images to see if it spiked my GPU usage. Tried a larger number of images and saw some activity. Hard to determine with certainty that it's caused by the machine learning image.~ Triggered the Smart Search job and I see more activity on my CPU. Machine learning part of my config: ``` // docker-compose.yml immich-machine-learning: container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: immich-machine-learning-gfx1151:latest extends: # uncomment this section for hardware acceleration - see https://docs.immich.app/features/ml-hardware-acceleration file: hwaccel.ml.yml service: rocm # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable volumes: - model-cache:/cache env_file: - .env restart: always healthcheck: disable: false environment: - HSA_OVERRIDE_GFX_VERSION=11.5.1 - HSA_USE_SVM=0 ``` And the hwaccel.ml config: ``` // hwaccel.ml.yml rocm: group_add: - video devices: - /dev/dri:/dev/dri - /dev/kfd:/dev/kfd ``` Running through `docker-compose`. ## Checklist: - [X] I have performed a self-review of my own code - [X] I have made corresponding changes to the documentation if applicable - [X] I have no unrelated changes in the PR. - [X] I have confirmed that any new dependencies are strictly necessary. - [ ] I have written tests for new code (if applicable) - [X] I have followed naming conventions/patterns in the surrounding code - [ ] All code in `src/services/` uses repositories implementations for database calls, filesystem operations, etc. - [ ] All code in `src/repositories/` is pretty basic/simple and does not have any immich specific logic (that belongs in `src/services/`) ## Please describe to which degree, if any, an LLM was used in creating this pull request. Not used. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 16:33:35 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#18155