Skip to content

cannot run tutorial files well. #495

Closed

Description

@Arthur-Shi

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

  1. Arthur-Shi commented on Sep 27, 2017

    @Arthur-Shi
    Author

    Is it not a file to run? Just for introduction of some important functions?

  2. Arthur-Shi commented on Sep 27, 2017

    @Arthur-Shi
    Author

    sometimes It can output right, but it will go wrong after running again.

  3. tqchen commented on Sep 28, 2017

    @tqchen
    Member

    as the error indicates, you will need to build with llvm enabled

  4. Arthur-Shi commented on Sep 28, 2017

    @Arthur-Shi
    Author

    yeah, I found the llvm folder and which file should be bulit by VS?

    Thank you so much.

  5. tqchen commented on Sep 28, 2017

    @tqchen
    Member

    @sxjscience do you have some instruction for building with LLVM on windows?

  6. Arthur-Shi commented on Sep 28, 2017

    @Arthur-Shi
    Author

    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

  7. sxjscience commented on Sep 28, 2017

    @sxjscience
    Member

    @Arthur-Shi Try to use sys.path.append('C:\\Users\\admin\\tvm\\topi\\python').

    Also, you can manually update the easy-install.pth file by adding C:\\Users\\admin\\tvm\\topi\\python. For example, I'm using Anaconda3 and my easy-install.pth file is located in C:\\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 .

  8. Arthur-Shi commented on Sep 29, 2017

    @Arthur-Shi
    Author

    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.

  9. Arthur-Shi commented on Sep 29, 2017

    @Arthur-Shi
    Author

    @sxjscience I tried two methods you said, but still cannot import topi

  10. sxjscience commented on Sep 29, 2017

    @sxjscience
    Member

    @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?

  11. Arthur-Shi commented on Sep 30, 2017

    @Arthur-Shi
    Author

    @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

  12. sxjscience commented on Sep 30, 2017

    @sxjscience
    Member
  13. Arthur-Shi commented on Sep 30, 2017

    @Arthur-Shi
    Author

    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.

  14. sxjscience commented on Sep 30, 2017

    @sxjscience
    Member
  15. Arthur-Shi commented on Sep 30, 2017

    @Arthur-Shi
    Author

    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

  16. 12 remaining items

  17. added a commit that references this issue on Jan 7, 2022
  18. added a commit that references this issue on Jan 27, 2022
  19. added a commit that references this issue on Feb 2, 2022
  20. added a commit that references this issue on Feb 12, 2022
  21. added 2 commits that reference this issue on Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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