vosen/ZLUDA · error

MIOpen.dll could not be found. Please install HIP SDK: https

Error message

MIOpen.dll could not be found. Please install HIP SDK: https://zluda.readthedocs.io/latest/hip_sdk.html

What it means

ZLUDA maps its cuDNN-compatible API (zluda_dnn) onto AMD's MIOpen. On Windows, when a cuDNN call fails because the underlying MIOpen.dll is absent, get_error_string (zluda_dnn/src/impl.rs:1484) detects that the status matches the error cached when MIOpen failed to load and returns this message instead of a generic cuDNN status name. It means the AMD HIP SDK, which ships MIOpen.dll, is not installed, so no cuDNN-style neural-network operations can run.

Source

Thrown at zluda_dnn/src/impl.rs:1484

            grad_desc,
            requested_algo_count,
            returned_algo_count,
            perf_results.cast(),
        )?;
        Ok(())
    }
}

pub mod dnn9 {
    use cuda_types::cudnn9::*;
    use zluda_common::FromCuda;

    pub(crate) fn get_version() -> usize {
        return cuda_types::cudnn9::CUDNN_VERSION as usize;
    }

    pub(crate) fn get_error_string(status: cudnnStatus_t) -> *const ::core::ffi::c_char {
        if cfg!(windows) && status.is_err() && status.err() == super::miopen().err().map(Into::into)
        {
            return c"MIOpen.dll could not be found. Please install HIP SDK: https://zluda.readthedocs.io/latest/hip_sdk.html".as_ptr();
        }
        match status {
            Ok(()) => c"CUDNN_STATUS_SUCCESS",
            Err(err) => match err {
                cudnnError_t::NOT_INITIALIZED => c"CUDNN_STATUS_NOT_INITIALIZED",
                cudnnError_t::SUBLIBRARY_VERSION_MISMATCH => {
                    c"CUDNN_STATUS_SUBLIBRARY_VERSION_MISMATCH"
                }
                cudnnError_t::SERIALIZATION_VERSION_MISMATCH => {
                    c"CUDNN_STATUS_SERIALIZATION_VERSION_MISMATCH"
                }
                cudnnError_t::DEPRECATED => c"CUDNN_STATUS_DEPRECATED",
                cudnnError_t::LICENSE_ERROR => c"CUDNN_STATUS_LICENSE_ERROR",
                cudnnError_t::RUNTIME_IN_PROGRESS => c"CUDNN_STATUS_RUNTIME_IN_PROGRESS",
                cudnnError_t::RUNTIME_FP_OVERFLOW => c"CUDNN_STATUS_RUNTIME_FP_OVERFLOW",
                cudnnError_t::SUBLIBRARY_LOADING_FAILED => {

View on GitHub (pinned to 9c8b43f242)

Solutions

  1. Install the AMD HIP SDK from https://zluda.readthedocs.io/latest/hip_sdk.html (choose the SDK version matching your ZLUDA build)
  2. Ensure the HIP SDK bin directory (e.g. C:\Program Files\AMD\ROCm\<version>\bin) is on PATH so MIOpen.dll resolves
  3. Verify MIOpen.dll exists in that directory; if the SDK install omitted MIOpen, repair/reinstall the SDK
  4. If the SDK is installed but the app still fails, check the app is 64-bit and that no stale cudnn64_*.dll from CUDA is being picked up instead

Example fix

// before (HIP SDK installed but not on PATH)
// app.exe -> CUDNN_STATUS_NOT_INITIALIZED / 'MIOpen.dll could not be found'
// after (PowerShell, persist PATH for user)
$env:Path += ";C:\Program Files\AMD\ROCm\6.2\bin"
[Environment]::SetEnvironmentVariable('Path', $env:Path, 'User')
Defensive patterns

Strategy: fallback

Validate before calling

// PowerShell pre-flight: verify MIOpen.dll is resolvable before launching
$dll = Get-ChildItem 'C:\Program Files\AMD\ROCm\*\bin\MIOpen.dll' -ErrorAction SilentlyContinue
if (-not $dll) { throw 'HIP SDK / MIOpen.dll missing - install from https://zluda.readthedocs.io/latest/hip_sdk.html' }
if (-not ($env:Path -split ';' | Where-Object { (Split-Path $dll.FullName) -eq $_ })) { throw 'HIP SDK bin directory not on PATH' }

Type guard

// Rust-style guard used by ZLUDA itself: probe the library before use
fn miopen_available() -> bool {
    // super::miopen() returns Err when the DLL fails to load
    unsafe { super::miopen() }.is_ok()
}

Try / catch

// Wrap the first cuDNN call and surface the install URL
match cudnnCreate(&mut handle) {
    Ok(()) => {},
    Err(status) if miopen_unavailable_status(status) =>
        eprintln!("MIOpen.dll could not be found. Please install HIP SDK: https://zluda.readthedocs.io/latest/hip_sdk.html"),
    Err(status) => return Err(status),
}

Prevention

When it happens

Trigger: Any zluda_dnn/cuDNN API call on Windows where MIOpen.dll is not on the DLL search path: HIP SDK not installed, installed without the MIOpen component, or the SDK's bin directory not in PATH.

Common situations: Running ZLUDA on Windows with only the GPU driver installed (no HIP SDK); installing HIP SDK but forgetting to add C:\Program Files\AMD\ROCm\<ver>\bin to PATH; using an older ZLUDA/HIP SDK pairing where MIOpen was not bundled; migrating CUDA apps that expect cudnn64_*.dll and never installing the AMD equivalent.

Understand the failure class

Background: "X is not installed. Please install it with pip install Y": missing optional dependency errors — ImportError/ValueError raised when a library's optional extra was never installed — this error's family across 22 libraries.

Related errors


AI-assisted analysis of vosen/ZLUDA@9c8b43f242 (2026-09-06). Data as JSON: /api/errors/5cc3011d5d4aef75. Report an issue: GitHub.