Skip to content

Failed to load dynlib/dll #147

@Inoix

Description

@Inoix

This issue appears related to issue #107, opened on February 19, but for me it is a regression in version 1.104.yr0-ROCm. Also, it appears similar to another issue in the main koboldcpp repository, but the root cause is unrelated as far as I can say.

Describe the Issue
KoboldCpp starts fine, but when loading the model with any backend it fails to load the corresponding dll.

Workaround

Because this issue happens only on the newer version and is related with dlls, I started tinkering, by replacing some of the dlls on newer koboldcpp with those from older one.
In other words, I opened older (KoboldCPP-v1.98.1.yr0-ROCm) version, went into it's unpacked files (MEI_something) in the appdata/local, copied all of the dlls to my desktop. Then, I opened the newer version, and started replacing some of the dlls in its _MEI folder with DLLs from the older version.
After some time, it turned out that if you add the missing hipblas.dll file to the newer version, it starts to work!

TL;DR: adding the missing hipblas.dll from an older version of koboldcpp fixes the issue.

Additional Information:
This issue persists across any backends (including failsafe one), models and flags, at least, as far as I've checked.
OS: Win 10
CPU: Ryzen 7 3700X
GPU: RX 6600
I don't have any antivirus or something similar, apart from Windows Defender, which seems placid.

Error log (powershell):

PS D:\models> ./koboldcpp_rocm.exe
***
Welcome to KoboldCpp - Version 1.104.yr0-ROCm
For command line arguments, please refer to --help
***
Auto Selected HIP Backend (flag=0)

Loading Chat Completions Adapter: C:\Users\Inn\AppData\Local\Temp\_MEI57922\kcpp_adapters\AutoGuess.json
Chat Completions Adapter Loaded
System: Windows 10.0.19045 AMD64 AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD
Detected Available GPU Memory: 8176 MB
Detected Available RAM: 20977 MB
Initializing dynamic library: koboldcpp_hipblas.dll
Traceback (most recent call last):
  File "PyInstaller\loader\pyimod03_ctypes.py", line 53, in __init__
  File "ctypes\__init__.py", line 374, in __init__
OSError: [WinError 127] Не найдена указанная процедура

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "koboldcpp.py", line 8936, in <module>
  File "koboldcpp.py", line 7910, in main
  File "koboldcpp.py", line 8305, in kcpp_main_process
  File "koboldcpp.py", line 606, in init_library
  File "PyInstaller\loader\pyimod03_ctypes.py", line 55, in __init__
pyimod03_ctypes.install.<locals>.PyInstallerImportError: Failed to load dynlib/dll 'C:\\Users\\Inn\\AppData\\Local\\Temp\\_MEI57922\\koboldcpp_hipblas.dll'. Most likely this dynlib/dll was not found when the application was frozen.
[13392] Failed to execute script 'koboldcpp' due to unhandled exception!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions