- CMake 3.5 or higher
- We highly recommend to build with LLVM to enable all the features.
- If you want to use CUDA, CUDA toolkit version >= 8.0 is required. If you are upgrading from an older version, make sure you purge the older version and reboot after installation.
+- On macOS, you may want to install `Homebrew <https://brew.sh>` to easily install and manage dependencies.
We use cmake to build the library.
- Edit ``build/config.cmake`` to customize the compilation options
- On macOS, for some versions of Xcode, you need to add ``-lc++abi`` in the LDFLAGS or you'll get link errors.
- - Change ``set(USE_CUDA OFF)`` to ``set(USE_CUDA ON)`` to enable CUDA backend. So do other backends and libraries
- (OpenCL, RCOM, METAL, VULKAN, ...).
+ - Change ``set(USE_CUDA OFF)`` to ``set(USE_CUDA ON)`` to enable CUDA backend. Do the same for other backends and libraries
+ you want to build for (OpenCL, RCOM, METAL, VULKAN, ...).
+ - To help with debugging, ensure the embedded graph runtime and debugging functions are enabled with ``set(USE_GRAPH_RUNTIME ON)`` and ``set(USE_GRAPH_RUNTIME_DEBUG ON)``
- TVM optionally depends on LLVM. LLVM is required for CPU codegen that needs LLVM.
- Since LLVM takes long time to build from source, you can download pre-built version of LLVM from
`LLVM Download Page <http://releases.llvm.org/download.html>`_.
-
- Unzip to a certain location, modify ``build/config.cmake`` to add ``set(USE_LLVM /path/to/your/llvm/bin/llvm-config)``
- You can also directly set ``set(USE_LLVM ON)`` and let cmake search for a usable version of LLVM.
TVM package
~~~~~~~~~~~
+Depending on your development environment, you may want to use a virtual environment and package manager, such
+as ``virtualenv`` or ``conda``, to manage your python packages and dependencies.
+
+to install and maintain your python development environment.
+
The python package is located at `tvm/python`
There are two ways to install the package:
Python dependencies
~~~~~~~~~~~~~~~~~~~
+
+Note that the ``--user`` flag is not necessary if you're installing to a managed local environment,
+like ``virtualenv``.
+
* Necessary dependencies:
.. code:: bash