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/12/01 01:34:12 UTC
[GitHub] [tvm] philatoctoml opened a new issue #9617: TVM forcing compilation with USE_MICRO ON
philatoctoml opened a new issue #9617:
URL: https://github.com/apache/tvm/issues/9617
TVM is forcing compilation with USE_MICRO ON since a recent commit even though I have no reason to compile with it.
I am using the following to compile in this environment:
```
RUN sed -i "s|set(USE_CUDA OFF)|set(USE_CUDA ON)|g" /home/ubuntu/tvm/build/config.cmake && sed -i "s|set(USE_LLVM OFF)|set(USE_LLVM ON)|g" /home/ubuntu/tvm/build/config.cmake && sed -i "s|set(USE_CUDNN OFF)|set(USE_CUDNN ON)|g" /home/ubuntu/tvm/build/config.cmake && sed -i "s|set(USE_CUBLAS OFF)|set(USE_CUBLAS ON)|g" /home/ubuntu/tvm/build/config.cmake && sed -i "s|set(USE_GRAPH_EXECUTOR_CUDA_GRAPH OFF)|set(USE_GRAPH_EXECUTOR_CUDA_GRAPH ON)|g" /home/ubuntu/tvm/build/config.cmake && sed -i "s|set(USE_OPENMP none)|set(USE_OPENMP gnu)|g" /home/ubuntu/tvm/build/config.cmake
```
Traceback:
```
ubuntu@3c2bc3dd6016:/external$ python3.8 tvmcompile.py
Traceback (most recent call last):
File "/home/ubuntu/tvm/python/tvm/micro/session.py", line 35, in <module>
from .base import _rpc_connect
ImportError: cannot import name '_rpc_connect' from 'tvm.micro.base' (/home/ubuntu/tvm/python/tvm/micro/base.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tvmcompile.py", line 1, in <module>
from tvm.driver import tvmc
File "/home/ubuntu/tvm/python/tvm/driver/tvmc/__init__.py", line 22, in <module>
from . import micro
File "/home/ubuntu/tvm/python/tvm/driver/tvmc/micro.py", line 26, in <module>
import tvm.micro.project as project
File "/home/ubuntu/tvm/python/tvm/micro/__init__.py", line 28, in <module>
from .session import (
File "/home/ubuntu/tvm/python/tvm/micro/session.py", line 37, in <module>
raise ImportError("micro tvm is not enabled. Set USE_MICRO to ON in config.cmake")
ImportError: micro tvm is not enabled. Set USE_MICRO to ON in config.cmake
```
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] philatoctoml commented on issue #9617: TVM forcing compilation with USE_MICRO ON
Posted by GitBox <gi...@apache.org>.
philatoctoml commented on issue #9617:
URL: https://github.com/apache/tvm/issues/9617#issuecomment-983229224
@ZQPei thanks! Of course not. I just did this based on a model I had already tuned:
```
from tvm.driver import tvmc
model = tvmc.load('model.onnx')
log_file = "mymodel.json"
target = "cuda"
#tvmc.tune(
# model,
# target=target,
# tuning_records=log_file,
#)
package = tvmc.compile(model, target=target, tuning_records=log_file)
result = tvmc.run(package, device='cuda')
print(result)
```
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] ZQPei commented on issue #9617: TVM forcing compilation with USE_MICRO ON
Posted by GitBox <gi...@apache.org>.
ZQPei commented on issue #9617:
URL: https://github.com/apache/tvm/issues/9617#issuecomment-983225600
Can't reproduce your error.
If you didn't compile with `USE_MICRO=ON`, then don't `from tvm import micro`.
Would you mind to provide your `tvmcompile.py` code?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] leandron commented on issue #9617: TVM forcing compilation with USE_MICRO ON
Posted by GitBox <gi...@apache.org>.
leandron commented on issue #9617:
URL: https://github.com/apache/tvm/issues/9617#issuecomment-985991783
Thanks @ZQPei @philatoctoml and @gromero for fixing the issue!
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] ZQPei commented on issue #9617: TVM forcing compilation with USE_MICRO ON
Posted by GitBox <gi...@apache.org>.
ZQPei commented on issue #9617:
URL: https://github.com/apache/tvm/issues/9617#issuecomment-985176069
Thank you @philatoctoml. The bug has been fixed by https://github.com/apache/tvm/pull/9632.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] leandron closed issue #9617: TVM forcing compilation with USE_MICRO ON
Posted by GitBox <gi...@apache.org>.
leandron closed issue #9617:
URL: https://github.com/apache/tvm/issues/9617
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] ZQPei commented on issue #9617: TVM forcing compilation with USE_MICRO ON
Posted by GitBox <gi...@apache.org>.
ZQPei commented on issue #9617:
URL: https://github.com/apache/tvm/issues/9617#issuecomment-983254152
> from tvm.driver import tvmc
I think I have found the root cause of your problem.
As we can see in https://github.com/apache/tvm/blob/32e80128d195db9987e47a89755f4ef4d7cf8e8d/python/tvm/driver/tvmc/__init__.py#L22
and
https://github.com/apache/tvm/blob/32e80128d195db9987e47a89755f4ef4d7cf8e8d/python/tvm/driver/tvmc/runner.py#L37-L39
`tvm.micro` is imported in any case without a detection of `USE_MICRO` macro.
This bug was mistakenly introduced by https://github.com/apache/tvm/pull/9229.
Thank you so much for reporting this bug. I will try to fix it as soon as possiable.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org