Skip to content

[AMD/Windows] Document ROCm 7.x DLL dependencies and HIP SDK troubleshooting #3

Open

Description

@dkspwndj

Windows ROCm 7.x DLL dependencies and HIP SDK troubleshooting

English

Background

While testing AMD INT8 ConvRot support for Rust Image Studio on a Radeon RX 7900 XTX (gfx1100), I encountered a DLL compatibility issue with the official Windows ROCm engine.

The bundled HIP 7 runtime was combined with ROCm 6.4 hipBLAS libraries from the host environment, resulting in a hipblasSetStream error.

The problem was resolved by prioritizing compatible ROCm 7 BLAS library directories in the child process's PATH, without modifying the system-wide environment.

Current documentation

The AMD Radeon section of the README currently states that the Windows ROCm ZIP includes HIP runtime DLLs and only requires the AMD Adrenalin driver.

Although this may work in a clean environment, users with existing ROCm installations or incomplete library dependencies could encounter DLL loading errors.

Suggested improvements

  1. Document ROCm library requirements: Clarify which HIP, hipBLAS, and rocBLAS components are provided by the application and which dependencies may need to be installed separately.

  2. Add an official installation link: Provide a link to the AMD HIP SDK 7.x installation guide as a troubleshooting option for missing or incompatible runtime libraries.

  3. Warn about version mixing: Explain that mixing ROCm 6.x and 7.x DLLs may cause initialization errors, even when the GPU and driver are supported.

  4. Prefer process-local DLL paths: If necessary, configure the engine child process to load compatible ROCm libraries without changing the system-wide PATH.

  5. Improve startup error messages: When a required ROCm library fails to load, display a clear message suggesting that users verify their HIP SDK and library versions.

Expected benefit

These changes would help Radeon users diagnose startup failures without requiring the application to bundle the entire HIP SDK.

This is primarily a documentation and deployment improvement, separate from the INT8 eligibility changes in PR #2.

A full HIP SDK installation should not be declared mandatory unless testing confirms that the bundled runtime is insufficient.

References


한국어 — 개발자 참고용

문제 발생 배경

Radeon RX 7900 XTX(gfx1100) 환경에서 Rust Image Studio의 AMD INT8 ConvRot 지원을 테스트하던 중 Windows ROCm 엔진의 DLL 호환성 문제가 발생했습니다.

공식 배포본에 포함된 HIP 7 런타임과 기존 PC에 설치되어 있던 ROCm 6.4의 hipBLAS 라이브러리가 혼용되면서 hipblasSetStream 오류가 발생했습니다.

이후 호환되는 ROCm 7 BLAS 라이브러리 경로를 엔진 자식 프로세스의 PATH에 우선 적용하여 정상 실행했습니다. 시스템 전체 환경변수는 수정하지 않았습니다.

현재 README 안내의 문제점

현재 AMD Radeon 안내에는 Windows ROCm ZIP에 HIP 런타임 DLL이 포함되어 있어 AMD Adrenalin 드라이버만 있으면 된다고 설명되어 있습니다.

깨끗한 Windows 환경에서는 정상 작동할 수 있지만, 기존 ROCm 설치 이력이 있거나 DLL 의존성이 불완전한 환경에서는 실행 오류가 발생할 가능성이 있습니다.

특히 일반 사용자는 그래픽카드가 지원 목록에 있는데도 프로그램이 실행되지 않으면 원인을 파악하기 어렵습니다.

개선 제안

  1. ROCm 라이브러리 요구사항 명시: 앱에 포함된 HIP 런타임과 별도 설치가 필요할 수 있는 hipBLAS·rocBLAS 구성 요소를 구분해 안내하면 좋겠습니다.

  2. AMD 공식 설치 안내 링크 추가: DLL 누락이나 버전 충돌이 발생할 경우 참고할 수 있도록 Windows HIP SDK 7.x 설치 문서를 연결하면 좋겠습니다.

  3. 버전 혼용 주의사항: ROCm 6.x와 7.x DLL이 섞이면 정상 지원 GPU에서도 초기화 오류가 발생할 수 있다는 점을 안내하면 좋겠습니다.

  4. 프로세스별 DLL 경로 설정: 필요한 경우 시스템 전체 PATH를 변경하기보다는 Rust Image Studio가 실행하는 엔진 프로세스에만 호환되는 ROCm 라이브러리 경로를 우선 적용하는 방식이 안전합니다.

  5. 실행 오류 안내 개선: HIP 또는 BLAS DLL 로딩에 실패하면 단순한 실행 실패 메시지보다 HIP SDK 설치 여부와 라이브러리 버전을 확인하라는 안내를 표시하면 좋겠습니다.

기대 효과 및 적용 범위

이 개선은 AMD 사용자에게 HIP SDK 전체를 무조건 설치하도록 요구하는 것이 아니라, 런타임 문제가 발생했을 때 해결 방법을 명확하게 제공하는 데 목적이 있습니다.

공식 배포 ZIP만으로 정상 동작하는 환경은 기존 설치 방식을 유지하면 됩니다.

현재 제출된 PR #2는 INT8 모델 선택 기능을 확장하는 변경이므로, 이번 DLL 의존성 문제는 별도의 문서 및 배포 환경 개선 사항으로 관리하는 것이 적절하겠습니다.

참고 자료

Activity

  1. dkspwndj commented on Nov 9, 2026

    @dkspwndj
    ContributorAuthor

    Additional clarification — First-run experience for AMD users

    My successful RX 7900 XTX tests used a custom launcher that explicitly prepended compatible ROCm 7 library directories from an existing Python environment to the child process PATH.

    A regular user downloading the official Rust Image Studio release will not necessarily have those libraries or the custom launcher.

    The concern is therefore not only documenting ROCm dependencies, but preventing a first-run failure for ordinary AMD users.

    I suggest automatically detecting compatible ROCm 7 libraries and configuring the engine process environment when available. If dependencies are missing or incompatible, the application could display a clear installation message with a link to the official AMD HIP SDK documentation.

    This would preserve the existing automatic installation experience without requiring users to configure DLL paths manually.

    한국어 추가 설명 — 일반 AMD 사용자의 최초 실행 문제

    제가 RX 7900 XTX에서 정상 실행한 환경은 Codex가 작성한 별도 BAT 파일을 통해 기존 Python 환경에 설치된 ROCm 7 라이브러리 경로를 엔진 프로세스에 우선 적용한 것입니다.

    하지만 일반 사용자가 공식 Rust Image Studio를 다운로드하면 해당 Python 환경이나 별도 실행 BAT 파일이 없으므로 같은 결과를 보장할 수 없습니다.

    따라서 단순히 ROCm 설치 링크를 README에 추가하는 것뿐 아니라, 앱에서 호환되는 ROCm 라이브러리를 자동 탐색하고 자식 프로세스의 DLL 검색 경로를 설정해 주면 좋겠습니다.

    필요한 라이브러리가 없거나 버전이 맞지 않을 경우에는 실행 실패 대신 AMD 공식 HIP SDK 설치 안내를 표시하면 됩니다.

    이렇게 하면 앱 배포 용량을 크게 늘리지 않으면서도 일반 AMD 사용자의 최초 실행 문제를 줄일 수 있습니다.

  2. hid276 commented on Nov 10, 2026

    @hid276
    Owner

    Thanks for the detailed report. You were right, and it was more than a documentation gap.

    I checked the upstream Windows ROCm zip (sd-master-f5df5f8-bin-win-rocm-10.1.0-x64.zip): stable-diffusion.dll imports hipblas.dll statically, and the zip only ships amdhip64_7.dll, amd_comgr.dll and rocm_kpack.dll. So with only the graphics driver the engine cannot start, and the README line saying the driver was enough was wrong.

    Fixed in v1.2.5. The release build is running right now, so the files will be on the Releases page shortly:

    • Automatic picks ROCm on Windows only when a hipblas.dll for the bundled HIP 7 runtime is found (engine folder, System32, PATH, HIP_PATH\bin). Otherwise it uses Vulkan, which needs only the driver.
    • The folder found is put first on the engine process's own PATH. The system PATH is not changed.
    • A ROCm 6 folder is recognised by the HIP runtime its DLLs import (amdhip64_6.dll) and skipped, even when it comes first on PATH. That is the hipblasSetStream case you hit.
    • Choosing AMD ROCm without the libraries now says what is missing and links AMD's install guide, instead of failing at start.
    • README and guide list the requirement and the version-mixing warning.

    Two limits. I have no AMD hardware, so the lookup is unit-tested with stand-in DLLs but has not run against a real ROCm 7 install. And ROCm 7 inside a Python environment is found only if its bin folder is on PATH; the app does not search Python environments.

    If you can try v1.2.5 once it is up, the ROCm libraries: ... line in the engine log would tell me whether detection works on a real install.

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

Metadata

Metadata

Assignees

No one assigned

    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