mlc-llm icon indicating copy to clipboard operation
mlc-llm copied to clipboard

[Bug] Cannot auto device detect without internet

Open Raviu56 opened this issue 6 months ago • 0 comments

🐛 Bug

When running mlc_llm serve HF://mlc-ai/Some_MODEL_MLC If internet is not available, it stuck at this line;

[2025-04-26 20:56:02] INFO auto_device.py:79: Found device: cuda:0
[2025-04-26 20:56:03] INFO auto_device.py:90: Not found device: rocm:0
[2025-04-26 20:56:04] INFO auto_device.py:90: Not found device: metal:0

I have to CTRL+C and run with --device cuda:0 so as it continues fine.

If internet is available it goes normally:

[2025-04-26 20:56:02] INFO auto_device.py:79: Found device: cuda:0
[2025-04-26 20:56:03] INFO auto_device.py:90: Not found device: rocm:0
[2025-04-26 20:56:04] INFO auto_device.py:90: Not found device: metal:0
[2025-04-26 20:56:04] INFO auto_device.py:79: Found device: vulkan:0
[2025-04-26 20:56:04] INFO auto_device.py:79: Found device: vulkan:1
[2025-04-26 20:56:04] INFO auto_device.py:79: Found device: vulkan:2
[2025-04-26 20:56:05] INFO auto_device.py:90: Not found device: opencl:0
[2025-04-26 20:56:05] INFO auto_device.py:79: Found device: cpu:0
[2025-04-26 20:56:05] INFO auto_device.py:35: Using device: cuda:0

To Reproduce

Clear above

Expected behavior

It should detect device and continue fine as resources are already cached.

Environment

  • Platform (e.g. WebGPU/Vulkan/IOS/Android/CUDA): CUDA
  • Operating system (e.g. Ubuntu/Windows/MacOS/...): Linux/Archlinux
  • Device (e.g. iPhone 12 Pro, PC+RTX 3090, ...)
  • How you installed MLC-LLM (conda, source): pip install in a virtualenv
  • How you installed TVM-Unity (pip, source): pip install in a virtualenv
  • Python version (e.g. 3.10): 3.13
  • GPU driver version (if applicable): Nvidia 570.133.07
  • CUDA/cuDNN version (if applicable): 12.8
  • 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): 731c671a4f7a4e890011524b440c367ff4d98e14
  • Any other relevant information:

Raviu56 avatar Apr 26 '25 18:04 Raviu56