Files
triton/docs/installation/from-source.rst

53 lines
1.3 KiB
ReStructuredText
Raw Normal View History

2021-03-05 22:33:50 -05:00
==============
2020-02-10 00:33:03 -05:00
From Source
2021-03-05 22:33:50 -05:00
==============
2020-02-10 03:17:18 -05:00
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
sudo apt-get install llvm-10-dev
git clone https://github.com/ptillet/triton.git;
cd triton/python;
pip install -e .
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
sudo apt-get install llvm-10-dev
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
A custom llvm-config binary can also be provided:
2020-02-10 03:17:18 -05:00
.. code-block:: bash
2021-03-05 22:33:50 -05:00
cmake ../ -DLLVM_CONFIG=/path/to/llvm-config
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>`_