Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] TVM installation fails on Windows machines #2870

Closed
fabiomatricardi opened this issue Sep 1, 2024 · 2 comments
Closed

[Bug] TVM installation fails on Windows machines #2870

fabiomatricardi opened this issue Sep 1, 2024 · 2 comments
Assignees
Labels
bug Confirmed bugs

Comments

@fabiomatricardi
Copy link

🐛 Bug

OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed

Tested also with conda... same issues

Followed installation process according to the documentation
OS Windows 11
PC: Lenovo Legion with

To Reproduce

Created venv with Python 3.11
installed
pip install clang zstd
pip install --pre -U -f https://mlc.ai/wheels mlc-ai-nightly

Run the test code to verify TVM installation
python -c "import tvm; print(tvm.file)"

results:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\llmMlc-test\venv\Lib\site-packages\tvm\__init__.py", line 26, in <module>
    from ._ffi.base import TVMError, __version__, _RUNTIME_ONLY
  File "D:\llmMlc-test\venv\Lib\site-packages\tvm\_ffi\__init__.py", line 28, in <module>
    from .base import register_error
  File "D:\llmMlc-test\venv\Lib\site-packages\tvm\_ffi\base.py", line 78, in <module>
    _LIB, _LIB_NAME = _load_lib()
                      ^^^^^^^^^^^
  File "D:\llmMlc-test\venv\Lib\site-packages\tvm\_ffi\base.py", line 64, in _load_lib
    lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\ctypes\__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed

Steps to reproduce the behavior:

Expected behavior

Environment

  • Platform: Vulkanand CUDA
  • Operating system: Windows 11
  • Device: Lenovo Legion with NVidia GeForce RTX 2060
  • How you installed MLC-LLM (conda, source): venv and pip
  • How you installed TVM-Unity (pip, source): venv and pip
  • Python version (e.g. 3.10): 3.11
  • GPU driver version (if applicable): NVIDIA-SMI 560.76
  • CUDA/cuDNN version (if applicable): CUDA 12.6
  • TVM Unity Hash Tag (python -c "import tvm; print('\n'.join(f'{k}: {v}' for k, v in tvm.support.libinfo().items()))", applicable if you compile models):
  • Any other relevant information:
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.76                 Driver Version: 560.76         CUDA Version: 12.6     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                  Driver-Model | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 2060 ...  WDDM  |   00000000:01:00.0 Off |                  N/A |
| N/A   37C    P0             18W /   65W |       0MiB /   6144MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+

Additional context

@fabiomatricardi fabiomatricardi added the bug Confirmed bugs label Sep 1, 2024
@AMKCode AMKCode self-assigned this Sep 9, 2024
@AMKCode
Copy link
Contributor

AMKCode commented Sep 9, 2024

Hi, we tried reproducing it on a Windows 11 machine with CUDA 12.6 (RTX 3050 Ti) and we couldn't reproduce the bug. We don't yet support CUDA for Windows.

@MasterJH5574
Copy link
Member

MLC works through Vulkan on Windows for now, so it's likely not a CUDA issue here. It might be some other issue causing the library load failure.

@tqchen tqchen closed this as completed Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs
Projects
None yet
Development

No branches or pull requests

4 participants