Commit 9e337746 by Lianmin Zheng Committed by Tianqi Chen

fix dependenci and improve doc (#1535)

parent f70ced1b
...@@ -85,10 +85,33 @@ If everything goes well, you will find compile tools in `/opt/android-toolchain- ...@@ -85,10 +85,33 @@ If everything goes well, you will find compile tools in `/opt/android-toolchain-
### Cross Compile and Upload to the Android Device ### Cross Compile and Upload to the Android Device
First start an RPC tracker using `python -m tvm.exec.rpc_tracker --port [PORT]` and connect your Android device to this RPC tracker via the TVM RPC application. First start an RPC tracker using
Set the `Address` and `Port` fields to the address and port of the RPC tracker respectively.
```python -m tvm.exec.rpc_tracker --port [PORT]```
and connect your Android device to this RPC tracker via the TVM RPC application. Open the app,
set the `Address` and `Port` fields to the address and port of the RPC tracker respectively.
The key should be set to "android" if you wish to avoid modifying the default test script. The key should be set to "android" if you wish to avoid modifying the default test script.
After pushing "START RPC" button on the app, you can check the connect by run
```python -m tvm.exec.query_rpc_tracker --port [PORT]```
on your host machine.
You are supposed to find a free "android" in the queue status.
```
...
Queue Status
----------------------------
key free pending
----------------------------
android 1 0
----------------------------
```
Then checkout [android\_rpc/tests/android\_rpc\_test.py](https://github.com/dmlc/tvm/blob/master/apps/android_rpc/tests/android_rpc_test.py) and run, Then checkout [android\_rpc/tests/android\_rpc\_test.py](https://github.com/dmlc/tvm/blob/master/apps/android_rpc/tests/android_rpc_test.py) and run,
```bash ```bash
......
...@@ -44,9 +44,6 @@ tvm.autotvm.tuner ...@@ -44,9 +44,6 @@ tvm.autotvm.tuner
.. automodule:: tvm.autotvm.tuner.callback .. automodule:: tvm.autotvm.tuner.callback
:members: :members:
.. automodule:: tvm.autotvm.tuner.graph_tuning
:members:
tvm.autotvm.task tvm.autotvm.task
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
.. automodule:: tvm.autotvm.task .. automodule:: tvm.autotvm.task
......
...@@ -120,7 +120,10 @@ Currently, ROCm is supported only on linux, so all the instructions are written ...@@ -120,7 +120,10 @@ Currently, ROCm is supported only on linux, so all the instructions are written
Python Package Installation Python Package Installation
--------------------------- ---------------------------
The python package is located at python TVM package
~~~~~~~~~~~
The python package is located at `tvm/python`
There are several ways to install the package: There are several ways to install the package:
1. Set the environment variable `PYTHONPATH` to tell python where to find 1. Set the environment variable `PYTHONPATH` to tell python where to find
...@@ -131,7 +134,8 @@ There are several ways to install the package: ...@@ -131,7 +134,8 @@ There are several ways to install the package:
.. code:: bash .. code:: bash
export PYTHONPATH=/path/to/tvm/python:/path/to/tvm/topi/python:/path/to/tvm/nnvm/python:${PYTHONPATH} export TVM_HOME=/path/to/tvm
export PYTHONPATH=$TVM_HOME/python:$TVM_HOME/topi/python:$TVM_HOME/nnvm/python:${PYTHONPATH}
2. Install tvm python bindings by `setup.py`: 2. Install tvm python bindings by `setup.py`:
...@@ -148,6 +152,27 @@ There are several ways to install the package: ...@@ -148,6 +152,27 @@ There are several ways to install the package:
cd nnvm/python; python setup.py install --user; cd ../.. cd nnvm/python; python setup.py install --user; cd ../..
Python dependencies
~~~~~~~~~~~~~~~~~~~
* Necessary dependencies:
.. code:: bash
pip install --user numpy decorator
* If you want to use RPC Tracker
.. code:: bash
pip install --user tornado
* If you want to use auto-tuning module
.. code:: bash
pip install --user tornado psutil xgboost
Install Contrib Libraries Install Contrib Libraries
------------------------- -------------------------
......
...@@ -199,7 +199,7 @@ Adding more stages has a cost however: it can add storage and extra logic overhe ...@@ -199,7 +199,7 @@ Adding more stages has a cost however: it can add storage and extra logic overhe
.. _vta-uarch: .. _vta-uarch:
Microarchitectural Overview Microarchitectural Overview
---------------------- ---------------------------
We describe the modules that compose the VTA design. We describe the modules that compose the VTA design.
The module definitions are contained in ``vta/hardware/xilinx/sources/vta.cc``. The module definitions are contained in ``vta/hardware/xilinx/sources/vta.cc``.
......
...@@ -95,9 +95,12 @@ def create_measure_batch(task, option): ...@@ -95,9 +95,12 @@ def create_measure_batch(task, option):
attach_objects = None attach_objects = None
if measure_func == 'local': if measure_func == 'local':
# start temporary rpc tracker and rpc server for the user # start temporary rpc tracker and rpc server for the user
tracker = rpc.Tracker('localhost', port=9000, port_end=10000, silent=True) from ...rpc.tracker import Tracker
from ...rpc.server import Server
tracker = Tracker('localhost', port=9000, port_end=10000, silent=True)
device_key = '$local$device$%d' % tracker.port device_key = '$local$device$%d' % tracker.port
server = rpc.Server('localhost', port=9000, port_end=10000, server = Server('localhost', port=9000, port_end=10000,
key=device_key, key=device_key,
use_popen=True, silent=True, use_popen=True, silent=True,
tracker_addr=(tracker.host, tracker.port)) tracker_addr=(tracker.host, tracker.port))
......
...@@ -163,6 +163,7 @@ def load_from_file(filename): ...@@ -163,6 +163,7 @@ def load_from_file(filename):
result: autotvm.tuner.MeasureResult result: autotvm.tuner.MeasureResult
""" """
for row in open(filename): for row in open(filename):
if row and not row.startswith('#'):
yield decode(row) yield decode(row)
......
...@@ -6,11 +6,11 @@ import logging ...@@ -6,11 +6,11 @@ import logging
import argparse import argparse
import multiprocessing import multiprocessing
import sys import sys
from .. import rpc from ..rpc.tracker import Tracker
def main(args): def main(args):
"""Main funciton""" """Main funciton"""
tracker = rpc.Tracker(args.host, port=args.port, port_end=args.port_end, tracker = Tracker(args.host, port=args.port, port_end=args.port_end,
silent=args.silent) silent=args.silent)
tracker.proc.join() tracker.proc.join()
......
...@@ -10,6 +10,4 @@ upload and run remote RPC server, get the result back to verify correctness. ...@@ -10,6 +10,4 @@ upload and run remote RPC server, get the result back to verify correctness.
""" """
from .server import Server from .server import Server
from .tracker import Tracker
from .proxy import Proxy
from .client import RPCSession, LocalSession, TrackerSession, connect, connect_tracker from .client import RPCSession, LocalSession, TrackerSession, connect, connect_tracker
...@@ -16,7 +16,7 @@ vendor provided library CuDNN in many cases. ...@@ -16,7 +16,7 @@ vendor provided library CuDNN in many cases.
# #
# .. code-block:: bash # .. code-block:: bash
# #
# pip3 install --user psutil xgboost # pip3 install --user psutil xgboost tornado
# #
# To make tvm run faster in tuning, it is recommended to use cython # To make tvm run faster in tuning, it is recommended to use cython
# as FFI of tvm. In the root directory of tvm, execute # as FFI of tvm. In the root directory of tvm, execute
......
...@@ -27,7 +27,7 @@ to see the results. ...@@ -27,7 +27,7 @@ to see the results.
# #
# .. code-block:: bash # .. code-block:: bash
# #
# pip3 install --user psutil xgboost # pip3 install --user psutil xgboost tornado
# #
# To make tvm run faster in tuning, it is recommended to use cython # To make tvm run faster in tuning, it is recommended to use cython
# as FFI of tvm. In the root directory of tvm, execute # as FFI of tvm. In the root directory of tvm, execute
......
...@@ -110,7 +110,7 @@ func.export_library(path) ...@@ -110,7 +110,7 @@ func.export_library(path)
###################################################################### ######################################################################
# .. note:: # .. note::
# #
# To run this tutorial with real remote device, change :code:`local_demo` # To run this tutorial with a real remote device, change :code:`local_demo`
# to False and replace :code:`target` in :code:`build` with the true # to False and replace :code:`target` in :code:`build` with the true
# target triple of your device. The target triple which might be # target triple of your device. The target triple which might be
# different for different devices. For example, it is # different for different devices. For example, it is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment