2021-03-05 22:33:50 -05:00
==============
2021-03-06 17:26:49 -05:00
Installation
2021-03-05 22:33:50 -05:00
==============
2020-02-10 03:17:18 -05:00
2021-03-22 20:03:37 -04:00
---------------------
Binary Distributions
---------------------
You can install the latest nightly release of Triton from pip:
.. code-block :: bash
2021-03-23 03:32:51 -04:00
pip install -U --pre triton
2021-03-22 20:03:37 -04:00
2021-03-06 17:26:49 -05:00
--------------
From Source
--------------
2021-03-05 22:33:50 -05:00
+++++++++++++++
Python Package
+++++++++++++++
You can install the Python package from source by running the following commands:
.. code-block :: bash
git clone https://github.com/ptillet/triton.git;
cd triton/python;
pip install -e .
2021-03-22 20:03:37 -04:00
This may take a while (10-20 minutes) as it will download and compile LLVM from source.
2021-03-05 22:33:50 -05:00
You can then test your installation by running the unit tests:
.. code-block :: bash
pytest -vs .
and the benchmarks
2020-02-10 03:17:18 -05:00
.. code-block :: bash
2021-03-05 22:33:50 -05:00
cd bench/
python -m run --with-plots --result-dir /tmp/triton-bench
2020-02-10 03:17:18 -05:00
2021-03-05 22:33:50 -05:00
+++++++++++++++
C++ Package
+++++++++++++++
Those not interested in Python integration may want to use the internals of Triton (i.e, runtime, parser, codegen, driver, intermediate representation) directly. This can be done by running the following commands:
.. code-block :: bash
2020-02-10 03:17:18 -05:00
2021-03-05 22:33:50 -05:00
git clone https://github.com/ptillet/triton.git;
mkdir build;
cd build;
cmake ../;
make -j8;
2020-02-10 03:17:18 -05:00
2021-03-05 22:33:50 -05:00
Note that while direct usage of the C++ API is not officially supported, a usage tutorial can be found `here <https://github.com/ptillet/triton/blob/master/tutorials/01-matmul.cc> `_