Repository navigation
cannot run tutorial files well. #495
Description
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 5.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
runfile('C:/Users/admin/tvm/tutorials/get_started.py', wdir='C:/Users/admin/tvm/tutorials')
<class 'tvm.tensor.Tensor'>
Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/admin/tvm/tutorials/get_started.py', wdir='C:/Users/admin/tvm/tutorials')
File "C:\Program Files\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 880, in runfile
execfile(filename, namespace)
File "C:\Program Files\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/admin/tvm/tutorials/get_started.py", line 111, in
fadd_cuda = tvm.build(s, [A, B, C], "cuda", target_host="llvm", name="myadd")
File "C:\Users\admin\AppData\Roaming\Python\Python36\site-packages\tvm-0.1.0-py3.6-win-amd64.egg\tvm\build_module.py", line 368, in build
mhost = codegen.build_module(fhost, target_host)
File "C:\Users\admin\AppData\Roaming\Python\Python36\site-packages\tvm-0.1.0-py3.6-win-amd64.egg\tvm\codegen.py", line 20, in build_module
return _Build(lowered_func, target)
File "C:\Users\admin\AppData\Roaming\Python\Python36\site-packages\tvm-0.1.0-py3.6-win-amd64.egg\tvm_ffi\function.py", line 255, in my_api_func
return flocal(*args)
File "C:\Users\admin\AppData\Roaming\Python\Python36\site-packages\tvm-0.1.0-py3.6-win-amd64.egg\tvm_ffi_ctypes\function.py", line 183, in call
ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
File "C:\Users\admin\AppData\Roaming\Python\Python36\site-packages\tvm-0.1.0-py3.6-win-amd64.egg\tvm_ffi\base.py", line 62, in check_call
raise TVMError(py_str(_LIB.TVMGetLastError()))
TVMError: [14:08:51] C:\Users\admin\tvm\src\codegen\codegen.cc:27: Check failed: bf != nullptr Target llvm is not enabled
I tried other softwares, but it gave the same output.
What should I do to make the file work?
Activity
Arthur-Shi commentedon Sep 27, 2017
Is it not a file to run? Just for introduction of some important functions?
Arthur-Shi commentedon Sep 27, 2017
sometimes It can output right, but it will go wrong after running again.
tqchen commentedon Sep 28, 2017
as the error indicates, you will need to build with llvm enabled
Arthur-Shi commentedon Sep 28, 2017
yeah, I found the llvm folder and which file should be bulit by VS?
Thank you so much.
tqchen commentedon Sep 28, 2017
@sxjscience do you have some instruction for building with LLVM on windows?
Arthur-Shi commentedon Sep 28, 2017
And how to install the topi package? there is no setup.py in the topi folder. I tried to find the package.
sys.path.append('\Users\admin\tvm\topi\python\topi')
But it is useless.
It is shown in the console.
File "C:/Users/admin/tvm/topi/recipe/conv/depthwise_conv2d_test.py", line 7, in
import topi
ModuleNotFoundError: No module named 'topi
sxjscience commentedon Sep 28, 2017
@Arthur-Shi Try to use
sys.path.append('C:\\Users\\admin\\tvm\\topi\\python').Also, you can manually update the
easy-install.pthfile by addingC:\\Users\\admin\\tvm\\topi\\python. For example, I'm using Anaconda3 and myeasy-install.pthfile is located inC:\\Anaconda3\\Lib\\site-packages\\easy-install.pth.For the llvm, I haven't installed it in Windows. However, I feel that it is not so hard by following the document https://llvm.org/docs/GettingStartedVS.html .
Arthur-Shi commentedon Sep 29, 2017
I am trying to run tvm on Linux, but I still don't know how to build the library?
I tried this method, but I don't know how to programming in the terminal.
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN115
Could you show me the code tips?
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES="Release" .. I think it is wrong, but how to change? I downloaded G++.
is it installing llvm necessary for linux?
I downloaded the llvm.tar and untar it. and then I added the deb.
Arthur-Shi commentedon Sep 29, 2017
@sxjscience I tried two methods you said, but still cannot import topi
sxjscience commentedon Sep 29, 2017
@Arthur-Shi Could you run this?
'''python
import sys
sys.append('C:\Users\admin\tvm\topi\python')
import tvm
'''
If not, what's the error message?
Arthur-Shi commentedon Sep 30, 2017
@sxjscience It works.
I didnot run import sys
sorry.
Do you know what can i do?
runfile('C:/Users/admin/tvm/topi/recipe/conv/depthwise_conv2d_test.py', wdir='C:/Users/admin/tvm/topi/recipe/conv')
Skip because cuda is not enabled
Skip because cuda is not enabled
I have installed CUDA
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0
sxjscience commentedon Sep 30, 2017
Try the command here https://github.com/sxjscience/tvm/blob/master/windows_cmake_command.txt
Arthur-Shi commentedon Sep 30, 2017
It is the output I run this command.
CMake Error: The source directory "C:/Users/admin" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
sxjscience commentedon Sep 30, 2017
Please read the doc https://github.com/dmlc/tvm/blob/master/docs/how_to/install.md
Arthur-Shi commentedon Sep 30, 2017
sorry @sxjscience
I didnot run this command in the build folder.
C:\Users\admin\tvm\build>cmake -G "Visual Studio 15 2017 Win64" ^
More? -DUSE_CUDA="ON" ^
More? -DCMAKE_BUILD_TYPE=Release ^
More? -DCMAKE_CONFIGURATION_TYPES="Release" ^
More? -DUSE_RPC="ON" ^
More? ..
-- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0 (found version "8.0")
-- Build with CUDA support
-- Build with RPC support...
-- Build with Graph runtime support...
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/admin/tvm/build
C:\Users\admin\tvm\build>
But
runfile('C:/Users/admin/tvm/topi/recipe/conv/depthwise_conv2d_test.py', wdir='C:/Users/admin/tvm/topi/recipe/conv')
Skip because cuda is not enabled
Skip because cuda is not enabled
12 remaining items
Squashed commit
Squashed commit
Squashed commit
Squashed commit
Squashed commit
Squashed commit
Squashed commit
Squashed commit
Squashed commit
Squashed commit
Squashed commit
Squashed commit
Squashed commit
Squashed commit
feat(tvmscript): replace T.macro with T.inline (Python LEGB scoping) (a…