{"record":{"id":"5cc3011d5d4aef75","repo":"vosen/ZLUDA","slug":"miopen-dll-could-not-be-found-please-install-hip","errorCode":null,"errorMessage":"MIOpen.dll could not be found. Please install HIP SDK: https://zluda.readthedocs.io/latest/hip_sdk.html","messagePattern":"MIOpen\\.dll could not be found\\. Please install HIP SDK: https://zluda\\.readthedocs\\.io/latest/hip_sdk\\.html","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"zluda_dnn/src/impl.rs","lineNumber":1484,"sourceCode":"            grad_desc,\n            requested_algo_count,\n            returned_algo_count,\n            perf_results.cast(),\n        )?;\n        Ok(())\n    }\n}\n\npub mod dnn9 {\n    use cuda_types::cudnn9::*;\n    use zluda_common::FromCuda;\n\n    pub(crate) fn get_version() -> usize {\n        return cuda_types::cudnn9::CUDNN_VERSION as usize;\n    }\n\n    pub(crate) fn get_error_string(status: cudnnStatus_t) -> *const ::core::ffi::c_char {\n        if cfg!(windows) && status.is_err() && status.err() == super::miopen().err().map(Into::into)\n        {\n            return c\"MIOpen.dll could not be found. Please install HIP SDK: https://zluda.readthedocs.io/latest/hip_sdk.html\".as_ptr();\n        }\n        match status {\n            Ok(()) => c\"CUDNN_STATUS_SUCCESS\",\n            Err(err) => match err {\n                cudnnError_t::NOT_INITIALIZED => c\"CUDNN_STATUS_NOT_INITIALIZED\",\n                cudnnError_t::SUBLIBRARY_VERSION_MISMATCH => {\n                    c\"CUDNN_STATUS_SUBLIBRARY_VERSION_MISMATCH\"\n                }\n                cudnnError_t::SERIALIZATION_VERSION_MISMATCH => {\n                    c\"CUDNN_STATUS_SERIALIZATION_VERSION_MISMATCH\"\n                }\n                cudnnError_t::DEPRECATED => c\"CUDNN_STATUS_DEPRECATED\",\n                cudnnError_t::LICENSE_ERROR => c\"CUDNN_STATUS_LICENSE_ERROR\",\n                cudnnError_t::RUNTIME_IN_PROGRESS => c\"CUDNN_STATUS_RUNTIME_IN_PROGRESS\",\n                cudnnError_t::RUNTIME_FP_OVERFLOW => c\"CUDNN_STATUS_RUNTIME_FP_OVERFLOW\",\n                cudnnError_t::SUBLIBRARY_LOADING_FAILED => {","sourceCodeStart":1466,"sourceCodeEnd":1502,"githubUrl":"https://github.com/vosen/ZLUDA/blob/9c8b43f242985150f86a7f485218b7b82c3e96ca/zluda_dnn/src/impl.rs#L1466-L1502","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Install the AMD HIP SDK from https://zluda.readthedocs.io/latest/hip_sdk.html (choose the SDK version matching your ZLUDA build)","Ensure the HIP SDK bin directory (e.g. C:\\Program Files\\AMD\\ROCm\\<version>\\bin) is on PATH so MIOpen.dll resolves","Verify MIOpen.dll exists in that directory; if the SDK install omitted MIOpen, repair/reinstall the SDK","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"],"exampleFix":"// before (HIP SDK installed but not on PATH)\n// app.exe -> CUDNN_STATUS_NOT_INITIALIZED / 'MIOpen.dll could not be found'\n// after (PowerShell, persist PATH for user)\n$env:Path += \";C:\\Program Files\\AMD\\ROCm\\6.2\\bin\"\n[Environment]::SetEnvironmentVariable('Path', $env:Path, 'User')","handlingStrategy":"fallback","validationCode":"// PowerShell pre-flight: verify MIOpen.dll is resolvable before launching\n$dll = Get-ChildItem 'C:\\Program Files\\AMD\\ROCm\\*\\bin\\MIOpen.dll' -ErrorAction SilentlyContinue\nif (-not $dll) { throw 'HIP SDK / MIOpen.dll missing - install from https://zluda.readthedocs.io/latest/hip_sdk.html' }\nif (-not ($env:Path -split ';' | Where-Object { (Split-Path $dll.FullName) -eq $_ })) { throw 'HIP SDK bin directory not on PATH' }","typeGuard":"// Rust-style guard used by ZLUDA itself: probe the library before use\nfn miopen_available() -> bool {\n    // super::miopen() returns Err when the DLL fails to load\n    unsafe { super::miopen() }.is_ok()\n}","tryCatchPattern":"// Wrap the first cuDNN call and surface the install URL\nmatch cudnnCreate(&mut handle) {\n    Ok(()) => {},\n    Err(status) if miopen_unavailable_status(status) =>\n        eprintln!(\"MIOpen.dll could not be found. Please install HIP SDK: https://zluda.readthedocs.io/latest/hip_sdk.html\"),\n    Err(status) => return Err(status),\n}","preventionTips":["Install the HIP SDK as part of ZLUDA setup on Windows, per the ZLUDA docs","Keep the ROCm bin directory on PATH and re-check after SDK version upgrades","Run a pre-flight DLL probe (LoadLibrary/GetModuleHandle or the script above) at app startup and fail fast with the install URL","Pin HIP SDK and ZLUDA versions together; upgrade both when updating"],"tags":["windows","hip-sdk","miopen","zluda","missing-dll","cublas","dnn"],"backgroundTag":"missing-optional-dependency","analyzedSha":"9c8b43f242985150f86a7f485218b7b82c3e96ca","analyzedAt":"2026-09-06T09:21:08.049Z","contentChangedAt":"2026-09-06T09:21:08.049Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}