dan-8888 opened a new issue #7881:
URL: https://github.com/apache/tvm/issues/7881


   while running
   `tvmc compile --target "llvm" --output resnet50-v2-7-tvm.tar 
resnet50-v2-7.onnx`
   
   , I got a runtime error:
    AttributeError: module 'tvm.auto_scheduler._ffi_api' has no
   attribute 'RandomModel' 
   
   Error is in python/tvm/auto_scheduler/cost_model/cost_model.py", line 37 
   
   @tvm._ffi.register_object("auto_scheduler.RandomModel")
   class RandomModel(CostModel):
   """A model that returns random estimation for all inputs"""
   
   def __init__(self):
   self.__init_handle_by_constructor__(_ffi_api.RandomModel)
   
   Any idea ?
   
   ____
   
   The build platform is Mac (but I reproduce the same error on Centos)
   Darwin MAC1 18.2.0 Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 
2018; root:xnu-4903.231.4~2/RELEASE_X86_64 x86_64
   
   $ clang --version
   Apple LLVM version 10.0.1 (clang-1001.0.46.4)
   Target: x86_64-apple-darwin18.2.0
   Thread model: posix
   InstalledDir: /Library/Developer/CommandLineTools/usr/bin
   ___
   ful stack trace:
   File "/Users/dan/tvm/python/tvm/driver/tvmc/__init__.py", line 22, in 
<module>
       from . import autotuner
     File "/Users/dan/tvm/python/tvm/driver/tvmc/autotuner.py", line 26, in 
<module>
       from tvm import autotvm, auto_scheduler
     File "/Users/dan/tvm/python/tvm/auto_scheduler/__init__.py", line 21, in 
<module>
       from . import dispatcher
     File "/Users/dan/tvm/python/tvm/auto_scheduler/dispatcher.py", line 36, in 
<module>
       from .search_policy import PreloadMeasuredStates, SketchPolicy
     File "/Users/dan/tvm/python/tvm/auto_scheduler/search_policy.py", line 
151, in <module>
       class SketchPolicy(SearchPolicy):
     File "/Users/dan/tvm/python/tvm/auto_scheduler/search_policy.py", line 
199, in SketchPolicy
       program_cost_model=RandomModel(),
     File "/Users/dan/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'


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to