mlc-ai / mlc-llm

Universal LLM Deployment Engine with ML Compilation
https://llm.mlc.ai/
Apache License 2.0
18.68k stars 1.51k forks source link

Failed to detect local GPU #317

Closed chensinit closed 1 year ago

chensinit commented 1 year ago

🐛 Bug

Hello. I try to build model but my gpu is not work and i get error.

$ python build.py --hf-path=databricks/dolly-v2-3b --quantization q4f16_0 --target android --max-seq-len 768 Weights exist at dist/models/dolly-v2-3b, skipping download. Using path "dist/models/dolly-v2-3b" for model "dolly-v2-3b" Database paths: ['log_db/vicuna-v1-7b', 'log_db/rwkv-raven-3b', 'log_db/rwkv-raven-1b5', 'log_db/redpajama-3b-q4f16', 'log_db/dolly-v2-3b', 'log_db/rwkv-raven-7b', 'log_db/redpajama-3b-q4f32'] Target configured: opencl -keys=opencl,gpu -max_num_threads=256 -max_shared_memory_per_block=16384 -max_threads_per_block=256 -texture_spatial_limit=16384 -thread_warp_size=1 Failed to detect local GPU, falling back to CPU as a target Automatically using target for weight quantization: llvm -keys=cpu Start computing and quantizing weights... This may take a while. Finish computing and quantizing weights. Total param size: 1.4633262157440186 GB Start storing to cache dist/dolly-v2-3b-q4f16_0/params [0710/0710] saving param_709 All finished, 51 total shards committed, record saved to dist/dolly-v2-3b-q4f16_0/params/ndarray-cache.json Save a cached module to dist/dolly-v2-3b-q4f16_0/mod_cache_before_build_android.pkl. Dump static shape TIR to dist/dolly-v2-3b-q4f16_0/debug/mod_tir_static.py Dump dynamic shape TIR to dist/dolly-v2-3b-q4f16_0/debug/mod_tir_dynamic.py

To Reproduce

Steps to reproduce the behavior:

python build.py --hf-path=databricks/dolly-v2-3b --quantization q4f16_0 --target android --max-seq-len 768

Expected behavior

build model is success.

Environment

Additional context

junrushao commented 1 year ago
free(): invalid pointer
중지됨 (코어 덤프됨) <--- Stoped (core is dumped)

This error is caused by symbol conflicts between TVM and PyTorch at program exit time, which you may safely ignore. The build itself should work according to the logs you shared

chensinit commented 1 year ago

Thank you!