:orphan: Tutorials ========= Below is a gallery of tutorials for writing various basic operations with Triton. It is recommended that you read through the tutorials in order, starting with the simplest one. To install the dependencies for the tutorials: .. code-block:: bash cd triton pip install -e './python[tutorials]' .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /getting-started/tutorials/images/thumb/sphx_glr_01-vector-add_thumb.png :alt: :ref:`sphx_glr_getting-started_tutorials_01-vector-add.py` .. raw:: html
Vector Addition
.. raw:: html
.. only:: html .. image:: /getting-started/tutorials/images/thumb/sphx_glr_02-fused-softmax_thumb.png :alt: :ref:`sphx_glr_getting-started_tutorials_02-fused-softmax.py` .. raw:: html
Fused Softmax
.. raw:: html
.. only:: html .. image:: /getting-started/tutorials/images/thumb/sphx_glr_03-matrix-multiplication_thumb.png :alt: :ref:`sphx_glr_getting-started_tutorials_03-matrix-multiplication.py` .. raw:: html
Matrix Multiplication
.. raw:: html
.. only:: html .. image:: /getting-started/tutorials/images/thumb/sphx_glr_04-low-memory-dropout_thumb.png :alt: :ref:`sphx_glr_getting-started_tutorials_04-low-memory-dropout.py` .. raw:: html
Low-Memory Dropout
.. raw:: html
.. only:: html .. image:: /getting-started/tutorials/images/thumb/sphx_glr_05-layer-norm_thumb.png :alt: :ref:`sphx_glr_getting-started_tutorials_05-layer-norm.py` .. raw:: html
Layer Normalization
.. raw:: html
.. only:: html .. image:: /getting-started/tutorials/images/thumb/sphx_glr_06-fused-attention_thumb.png :alt: :ref:`sphx_glr_getting-started_tutorials_06-fused-attention.py` .. raw:: html
Fused Attention
.. raw:: html
.. only:: html .. image:: /getting-started/tutorials/images/thumb/sphx_glr_07-extern-functions_thumb.png :alt: :ref:`sphx_glr_getting-started_tutorials_07-extern-functions.py` .. raw:: html
Libdevice (`tl.extra.cuda.libdevice`) function
.. raw:: html
.. only:: html .. image:: /getting-started/tutorials/images/thumb/sphx_glr_08-grouped-gemm_thumb.png :alt: :ref:`sphx_glr_getting-started_tutorials_08-grouped-gemm.py` .. raw:: html
Group GEMM
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /getting-started/tutorials/01-vector-add /getting-started/tutorials/02-fused-softmax /getting-started/tutorials/03-matrix-multiplication /getting-started/tutorials/04-low-memory-dropout /getting-started/tutorials/05-layer-norm /getting-started/tutorials/06-fused-attention /getting-started/tutorials/07-extern-functions /getting-started/tutorials/08-grouped-gemm .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-gallery .. container:: sphx-glr-download sphx-glr-download-python :download:`Download all examples in Python source code: tutorials_python.zip ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download all examples in Jupyter notebooks: tutorials_jupyter.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_