Skip to content

AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel' #88

@Promortyus

Description

@Promortyus

Description

I encountered an AttributeError when running tools/run_pipeline.py in the T-MAC project. Even if I followed all the steps in the readme.md, it seems that tvm.auto_scheduler._ffi_api does not contain RandomModel, which causes the script to fail during execution.

Environment

  • OS: Windows 11
  • Python version: Python 3.9

Step to Reproduce

Run the following command:

python tools/run_pipeline.py -o "C:\Users\L\.cache\huggingface\hub\models--1bitLLM--bitnet_b1_58-3B"
-q int_n

Error Logs

Traceback (most recent call last):
File "C:\Users\L\source\repos\T-MAC\deploy\compile.py", line 1, in <module>
  from t_mac.ops import QGeMMLUTBitsCodegen, QGeMMLUTBitsPreprocessorCodegen
...
File "C:\Users\L\source\repos\T-MAC\3rdparty\tvm\python\tvm\auto_scheduler\search_policy.py", line 151, in <module>
  class SketchPolicy(SearchPolicy):
File "C:\Users\L\source\repos\T-MAC\3rdparty\tvm\python\tvm\auto_scheduler\search_policy.py", line 199, in SketchPolicy
  program_cost_model=RandomModel(),
File "C:\Users\L\source\repos\T-MAC\3rdparty\tvm\python\tvm\auto_scheduler\cost_model\cost_model.py", line 37, in __init__
  self.__init_handle_by_constructor__(_ffi_api.RandomModel)
AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions