You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/04/19 10:41:46 UTC
[GitHub] [tvm] dan-8888 opened a new issue #7881: [TVMC] AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'
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:
users@infra.apache.org
[GitHub] [tvm] dan-8888 commented on issue #7881: [TVMC] AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'
Posted by GitBox <gi...@apache.org>.
dan-8888 commented on issue #7881:
URL: https://github.com/apache/tvm/issues/7881#issuecomment-822561871
I have done some more tests and managed to get it working via conda on Ubuntu only. with conda build of tvm, I had the same issue on Mac.
--
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:
users@infra.apache.org
[GitHub] [tvm] dan-8888 edited a comment on issue #7881: [TVMC] AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'
Posted by GitBox <gi...@apache.org>.
dan-8888 edited a comment on issue #7881:
URL: https://github.com/apache/tvm/issues/7881#issuecomment-822412975
Thanks @leandron for investigating.
Git is from branch main and revision 1fb32b055171f7b82b506b0f8e3096db1acc180c, latest rev on main as of this writing
$ pip list
Package Version
----------- ---------------------
certifi 2020.12.5
chardet 4.0.0
cloudpickle 1.6.0
idna 2.10
lxml 4.6.2
numpy 1.20.2
pip 21.0.1
psutil 5.8.0
requests 2.25.1
scipy 1.6.2
setuptools 49.2.1
tornado 6.1
tvm 0.8.dev878+g1fb32b055
urllib3 1.26.3
xgboost 1.4.0
--
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:
users@infra.apache.org
[GitHub] [tvm] tqchen closed issue #7881: AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'
Posted by GitBox <gi...@apache.org>.
tqchen closed issue #7881:
URL: https://github.com/apache/tvm/issues/7881
--
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:
users@infra.apache.org
[GitHub] [tvm] dan-8888 edited a comment on issue #7881: AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'
Posted by GitBox <gi...@apache.org>.
dan-8888 edited a comment on issue #7881:
URL: https://github.com/apache/tvm/issues/7881#issuecomment-823073273
> It's not related to tvmc as @leandron mentioned. Could you:
>
> 1. Simply run `from tvm import auto_scheduler` to see if the error can be reproduced.
> 2. Make sure you're using the right dynamic library. Specifically, whether the TVM python package you're running is using the built library of the same version. It may happen when you have multiply TVM builds on your environment.
1. I can reproduce indeed just by running python and `from tvm import auto_scheduler`
2. not sure how to debug this one and find the actual used dynamic library used by TVM.
Anyway that's a progress. Thanks
--
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:
users@infra.apache.org
[GitHub] [tvm] dan-8888 commented on issue #7881: AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'
Posted by GitBox <gi...@apache.org>.
dan-8888 commented on issue #7881:
URL: https://github.com/apache/tvm/issues/7881#issuecomment-823073273
> It's not related to tvmc as @leandron mentioned. Could you:
>
> 1. Simply run `from tvm import auto_scheduler` to see if the error can be reproduced.
> 2. Make sure you're using the right dynamic library. Specifically, whether the TVM python package you're running is using the built library of the same version. It may happen when you have multiply TVM builds on your environment.
1. I can reproduce indeed just by running python and `tvm import auto_scheduler`
2. not sure how to debug this one and find the actual used dynamic library used by TVM.
Anyway that's a progress. Thanks
--
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:
users@infra.apache.org
[GitHub] [tvm] leandron commented on issue #7881: [TVMC] AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'
Posted by GitBox <gi...@apache.org>.
leandron commented on issue #7881:
URL: https://github.com/apache/tvm/issues/7881#issuecomment-822392365
I couldn't reproduce the issue on my local TVM, current pointing at `1fb32b055171f7b82b506b0f8e3096db1acc180c`, the last commit as I write this. Can you point me to the specific git revision you're using?
I have my TVM installed following the guidance on https://tvm.apache.org/docs/install/from_source.html. Then, running the `tvmc` command line as you pointed above, it produces the output file correctly.
This is the list of packages on my virtualenv:
```
$ pip list
Package Version Location
----------------- -------- -----------------------------------------------
attrs 20.3.0
cloudpickle 1.6.0
decorator 5.0.7
numpy 1.19.5
onnx 1.8.1
pip 21.0.1
pkg-resources 0.0.0
protobuf 3.15.8
psutil 5.8.0
pyxir 0.0.1
scipy 1.5.4
setuptools 56.0.0
six 1.15.0
synr 0.3
tornado 6.1
tvm 0.8.dev0 [path to my tvm, 1fb32b055171f7b82b506b0f8e3096db1acc180c]
typing-extensions 3.7.4.3
wheel 0.36.2
```
It is interesting that you can reproduce the issue on two different machines. The real issue seems to happening outside `tvmc`, within the call for `from tvm import autotvm, auto_scheduler`.
@comaniac any idea on what could be going on here?
--
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:
users@infra.apache.org
[GitHub] [tvm] dan-8888 commented on issue #7881: [TVMC] AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'
Posted by GitBox <gi...@apache.org>.
dan-8888 commented on issue #7881:
URL: https://github.com/apache/tvm/issues/7881#issuecomment-822369231
@leandron
--
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:
users@infra.apache.org
[GitHub] [tvm] dan-8888 edited a comment on issue #7881: [TVMC] AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'
Posted by GitBox <gi...@apache.org>.
dan-8888 edited a comment on issue #7881:
URL: https://github.com/apache/tvm/issues/7881#issuecomment-822412975
Thanks @leandron for investigating.
Git is from branch main and revision 1fb32b055171f7b82b506b0f8e3096db1acc180c, the same as yours and the latest rev on main as of this writing
$ pip list
Package Version
----------- ---------------------
certifi 2020.12.5
chardet 4.0.0
cloudpickle 1.6.0
idna 2.10
lxml 4.6.2
numpy 1.20.2
pip 21.0.1
psutil 5.8.0
requests 2.25.1
scipy 1.6.2
setuptools 49.2.1
tornado 6.1
tvm 0.8.dev878+g1fb32b055
urllib3 1.26.3
xgboost 1.4.0
--
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:
users@infra.apache.org
[GitHub] [tvm] tqchen commented on issue #7881: AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'
Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #7881:
URL: https://github.com/apache/tvm/issues/7881#issuecomment-822880858
Thanks for the great discussion, normally we handle this type of questions on https://discuss.tvm.apache.org/ I would suggest us move the conversation there by opening a new trouble shooting thread
--
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:
users@infra.apache.org
[GitHub] [tvm] comaniac commented on issue #7881: [TVMC] AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'
Posted by GitBox <gi...@apache.org>.
comaniac commented on issue #7881:
URL: https://github.com/apache/tvm/issues/7881#issuecomment-822610952
It's not related to tvmc as @leandron mentioned. Could you:
1. Simply run `from tvm import auto_scheduler` to see if the error can be reproduced.
2. Make sure you're using the right dynamic library. Specifically, whether the TVM python package you're running is using the built library of the same version. It may happen when you have multiply TVM builds on your environment.
--
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:
users@infra.apache.org
[GitHub] [tvm] dan-8888 commented on issue #7881: [TVMC] AttributeError: module 'tvm.auto_scheduler._ffi_api' has no attribute 'RandomModel'
Posted by GitBox <gi...@apache.org>.
dan-8888 commented on issue #7881:
URL: https://github.com/apache/tvm/issues/7881#issuecomment-822412975
Thanks @leandron for investigating.
Git is from branch main and revision 1fb32b055171f7b82b506b0f8e3096db1acc180c
$ pip list
Package Version
----------- ---------------------
certifi 2020.12.5
chardet 4.0.0
cloudpickle 1.6.0
idna 2.10
lxml 4.6.2
numpy 1.20.2
pip 21.0.1
psutil 5.8.0
requests 2.25.1
scipy 1.6.2
setuptools 49.2.1
tornado 6.1
tvm 0.8.dev878+g1fb32b055
urllib3 1.26.3
xgboost 1.4.0
--
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:
users@infra.apache.org