mlc-ai / mlc-llm

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

[Question] TypeError: prim_func() got an unexpected keyword argument 'private' #1790

Closed ricar0 closed 8 months ago

ricar0 commented 8 months ago

❓ General Questions

When running python -m mlc_llm.build --help

Received an error message:

Traceback (most recent call last):
  File "/data/wangmy/miniconda3/envs/llava/lib/python3.10/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/data/wangmy/miniconda3/envs/llava/lib/python3.10/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/data1/wangmy/mlc-llm/mlc_llm/__init__.py", line 1, in <module>
    from . import dispatch
  File "/data1/wangmy/mlc-llm/mlc_llm/dispatch/__init__.py", line 2, in <module>
    from .dispatch_tir_operator_adreno import DispatchTIROperatorAdreno
  File "/data1/wangmy/mlc-llm/mlc_llm/dispatch/dispatch_tir_operator_adreno.py", line 464, in <module>
    @T.prim_func(private=True)
TypeError: prim_func() got an unexpected keyword argument 'private'

how can I solve this problem?

MasterJH5574 commented 8 months ago

Thanks for the question. How did you install TVM? private is a flag that was introduced last year (https://github.com/apache/tvm/blob/main/python/tvm/script/parser/tir/entry.py#L29), so it is likely that your TVM is not up to date.

If you use pip TVM package, could you follow this page to update TVM https://llm.mlc.ai/docs/install/tvm.html#option-1-prebuilt-package? If you build TVM from source, you may need to checkout to the latest commit and build again.

ricar0 commented 8 months ago

Thanks for the question. How did you install TVM? private is a flag that was introduced last year (https://github.com/apache/tvm/blob/main/python/tvm/script/parser/tir/entry.py#L29), so it is likely that your TVM is not up to date.

If you use pip TVM package, could you follow this page to update TVM https://llm.mlc.ai/docs/install/tvm.html#option-1-prebuilt-package? If you build TVM from source, you may need to checkout to the latest commit and build again.

Thanks, I redownloaded tvm and the problem was solved.