当前位置:首页 > 操作系统 > MacOs

【TVM学习五】Install TVM on Local Machine (Ubuntu16.04)

参考链接:https://docs.tvm.ai/install/from_source.html#python-package-installation

 

补充:

          1. Edit build/config.cmake to customize the compilation options,在这一步中将编译好的llvm-build路径加进去:

            set(USE_LLVM /path/to/your/llvm-build/bin/llvm-config)

           2. Python Package Installation

                在这一步中,我们使用以下命令将Python相关的路径加入到系统:

                 sudo vim ~/.bashrc

                      export PYTHONPATH=$PYTHONPATH:~/tvm/python

                      export PYTHONPATH=$PYTHONPATH:~/tvm/topi/python

                      export PYTHONPATH=$PYTHONPATH:~/tvm/nnvm/python

                  source ~/.bashrc

           3. Python dependencies

【TVM学习五】Install TVM on Local Machine (Ubuntu16.04) - 文章图片

 

打开Python3并输入以下命令进行测试:

    import tvm

    from tvm.contrib import util

    from tvm import relay

    from tvm import rpc

若OK,表示TVM安装成功!  

But,在Python2上是出现如下error:No matching distribution found for IntEnum. (貌似因为python3.4以后才有Enum格式)

另外,Local Machine还需要和其他的包一起编译,比如NNPACK (cpu),CUDA (GPU)等等...


经测试,在基于ROC-RK3399-PC/Ubuntu18.04上也OK.    


 


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐