[BUILD] Added automatic nightly build releases to pip in CI; removed build-time dependence on LLVM and PyTorch (#77)
Recently there has been more and more report about installation issues: - Installing Triton before upgrading pytorch can create some issues because Triton uses some torch headers - llvm-10-dev not available on some platform; llvm-11-dev not available on e.g. Ubuntu. absence of nightly builds This PR should fix all these issues. Some CMake tricks are used to download and install llvm at build time. Triton Python bindings were modified to remove dependence on pytorch ops. Midnight CI job added to generate binary wheels for all Triton version and update them on pypi's new triton-nightly project. This PR will also make it very easy to use LLVM forks in the future for whatever needs we have.
This commit is contained in:
committed by
Philippe Tillet
parent
3ad0a4d7be
commit
2f80a98776
@@ -2,6 +2,17 @@
|
||||
Installation
|
||||
==============
|
||||
|
||||
---------------------
|
||||
Binary Distributions
|
||||
---------------------
|
||||
|
||||
You can install the latest nightly release of Triton from pip:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pip install triton-nightly
|
||||
|
||||
|
||||
--------------
|
||||
From Source
|
||||
--------------
|
||||
@@ -14,11 +25,12 @@ 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 .
|
||||
|
||||
This may take a while (10-20 minutes) as it will download and compile LLVM from source.
|
||||
|
||||
You can then test your installation by running the unit tests:
|
||||
|
||||
.. code-block:: bash
|
||||
@@ -40,17 +52,10 @@ Those not interested in Python integration may want to use the internals of Trit
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo apt-get install llvm-10-dev
|
||||
git clone https://github.com/ptillet/triton.git;
|
||||
mkdir build;
|
||||
cd build;
|
||||
cmake ../;
|
||||
make -j8;
|
||||
|
||||
A custom llvm-config binary can also be provided:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cmake ../ -DLLVM_CONFIG=/path/to/llvm-config
|
||||
|
||||
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>`_
|
||||
|
Reference in New Issue
Block a user