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
|
|
|
|
---------------------
|
|
|
|
|
2021-07-28 01:51:17 -07:00
|
|
|
You can install the latest stable release of Triton from pip:
|
|
|
|
|
2021-07-28 04:35:14 -07:00
|
|
|
.. code-block:: bash
|
|
|
|
|
2021-07-28 01:51:17 -07:00
|
|
|
pip install triton
|
|
|
|
|
|
|
|
Binary wheels are available for CPython 3.6-3.9 and PyPy 3.6-3.7.
|
|
|
|
|
|
|
|
And the latest nightly release:
|
2021-03-22 20:03:37 -04:00
|
|
|
|
|
|
|
.. 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
|
|
|
|
|
2021-07-29 13:39:50 -05:00
|
|
|
git clone https://github.com/openai/triton.git;
|
2022-12-21 01:30:50 -08:00
|
|
|
cd triton/python;
|
2021-07-28 01:51:17 -07:00
|
|
|
pip install cmake; # build time dependency
|
2021-03-05 22:33:50 -05:00
|
|
|
pip install -e .
|
|
|
|
|
2022-12-21 01:30:50 -08:00
|
|
|
Note that, if llvm-11 is not present on your system, the setup.py script will download the official LLVM11 static libraries link against that.
|
2021-03-22 20:03:37 -04:00
|
|
|
|
2021-03-05 22:33:50 -05:00
|
|
|
You can then test your installation by running the unit tests:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2022-01-07 12:34:38 -08:00
|
|
|
pip install -e '.[tests]'
|
2021-09-29 18:32:33 -07:00
|
|
|
pytest -vs test/unit/
|
2021-03-05 22:33:50 -05:00
|
|
|
|
|
|
|
and the benchmarks
|
2020-02-10 03:17:18 -05:00
|
|
|
|
|
|
|
.. code-block:: bash
|
2021-03-05 22:33:50 -05:00
|
|
|
|
|
|
|
cd bench/
|
2021-09-12 21:11:45 -07:00
|
|
|
python -m run --with-plots --result-dir /tmp/triton-bench
|