2021-09-10 22:58:16 +00:00
<!DOCTYPE html>
< html class = "writer-html5" lang = "en" >
< head >
< meta charset = "utf-8" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" / >
< title > triton.language — Triton documentation< / title >
< link rel = "stylesheet" href = "../_static/css/theme.css" type = "text/css" / >
< link rel = "stylesheet" href = "../_static/pygments.css" type = "text/css" / >
< link rel = "stylesheet" href = "../_static/pygments.css" type = "text/css" / >
< link rel = "stylesheet" href = "../_static/css/theme.css" type = "text/css" / >
2022-02-09 07:15:50 +00:00
< link rel = "stylesheet" href = "../_static/gallery.css" type = "text/css" / >
< link rel = "stylesheet" href = "../_static/gallery-binder.css" type = "text/css" / >
< link rel = "stylesheet" href = "../_static/gallery-dataframe.css" type = "text/css" / >
< link rel = "stylesheet" href = "../_static/gallery-rendered-html.css" type = "text/css" / >
2021-09-10 22:58:16 +00:00
< link rel = "stylesheet" href = "../_static/css/custom.css" type = "text/css" / >
<!-- [if lt IE 9]>
< script src = "../_static/js/html5shiv.min.js" > < / script >
<![endif]-->
< script type = "text/javascript" id = "documentation_options" data-url_root = "../" src = "../_static/documentation_options.js" > < / script >
< script data-url_root = "../" id = "documentation_options" src = "../_static/documentation_options.js" > < / script >
< script src = "../_static/jquery.js" > < / script >
< script src = "../_static/underscore.js" > < / script >
< script src = "../_static/doctools.js" > < / script >
< script async = "async" src = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" > < / script >
< script type = "text/javascript" src = "../_static/js/theme.js" > < / script >
< link rel = "index" title = "Index" href = "../genindex.html" / >
< link rel = "search" title = "Search" href = "../search.html" / >
< link rel = "next" title = "triton.language.program_id" href = "generated/triton.language.program_id.html" / >
< link rel = "prev" title = "triton.Config" href = "generated/triton.Config.html" / >
< / head >
< body class = "wy-body-for-nav" >
< div class = "wy-grid-for-nav" >
< nav data-toggle = "wy-nav-shift" class = "wy-nav-side" >
< div class = "wy-side-scroll" >
< div class = "wy-side-nav-search" >
< a href = "../index.html" class = "icon icon-home" > Triton
< / a >
< div role = "search" >
< form id = "rtd-search-form" class = "wy-form" action = "../search.html" method = "get" >
< input type = "text" name = "q" placeholder = "Search docs" / >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< / div >
< / div >
< div class = "wy-menu wy-menu-vertical" data-spy = "affix" role = "navigation" aria-label = "main navigation" >
< p class = "caption" role = "heading" > < span class = "caption-text" > Getting Started< / span > < / p >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../getting-started/installation.html" > Installation< / a > < / li >
2022-02-09 07:15:50 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../getting-started/tutorials/index.html" > Tutorials< / a > < / li >
2021-09-10 22:58:16 +00:00
< / ul >
< p class = "caption" role = "heading" > < span class = "caption-text" > Python API< / span > < / p >
< ul class = "current" >
< li class = "toctree-l1" > < a class = "reference internal" href = "triton.html" > triton< / a > < / li >
< li class = "toctree-l1 current" > < a class = "current reference internal" href = "#" > triton.language< / a > < ul >
< li class = "toctree-l2" > < a class = "reference internal" href = "#programming-model" > Programming Model< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.program_id.html" > triton.language.program_id< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.num_programs.html" > triton.language.num_programs< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "#creation-ops" > Creation Ops< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.arange.html" > triton.language.arange< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.zeros.html" > triton.language.zeros< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "#shape-manipulation-ops" > Shape Manipulation Ops< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.broadcast_to.html" > triton.language.broadcast_to< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.reshape.html" > triton.language.reshape< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.ravel.html" > triton.language.ravel< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "#linear-algebra-ops" > Linear Algebra Ops< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.dot.html" > triton.language.dot< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "#memory-ops" > Memory Ops< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.load.html" > triton.language.load< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.store.html" > triton.language.store< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.atomic_cas.html" > triton.language.atomic_cas< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.atomic_xchg.html" > triton.language.atomic_xchg< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "#indexing-ops" > Indexing Ops< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.where.html" > triton.language.where< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "#math-ops" > Math Ops< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.exp.html" > triton.language.exp< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.log.html" > triton.language.log< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.cos.html" > triton.language.cos< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.sin.html" > triton.language.sin< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.sqrt.html" > triton.language.sqrt< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.sigmoid.html" > triton.language.sigmoid< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.softmax.html" > triton.language.softmax< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "#reduction-ops" > Reduction Ops< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.max.html" > triton.language.max< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.min.html" > triton.language.min< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.sum.html" > triton.language.sum< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "#atomic-ops" > Atomic Ops< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.atomic_cas.html" > triton.language.atomic_cas< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.atomic_add.html" > triton.language.atomic_add< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.atomic_max.html" > triton.language.atomic_max< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.atomic_min.html" > triton.language.atomic_min< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "#comparison-ops" > Comparison ops< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.minimum.html" > triton.language.minimum< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.maximum.html" > triton.language.maximum< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "#random-number-generation" > Random Number Generation< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.randint4x.html" > triton.language.randint4x< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.randint.html" > triton.language.randint< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.rand.html" > triton.language.rand< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.randn.html" > triton.language.randn< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "#compiler-hint-ops" > Compiler Hint Ops< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "generated/triton.language.multiple_of.html" > triton.language.multiple_of< / a > < / li >
< / ul >
< / li >
< / ul >
< / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "triton.testing.html" > triton.testing< / a > < / li >
< / ul >
< p class = "caption" role = "heading" > < span class = "caption-text" > Programming Guide< / span > < / p >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../programming-guide/chapter-1/introduction.html" > Introduction< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../programming-guide/chapter-2/related-work.html" > Related Work< / a > < / li >
< / ul >
< / div >
< / div >
< / nav >
< section data-toggle = "wy-nav-shift" class = "wy-nav-content-wrap" >
< nav class = "wy-nav-top" aria-label = "top navigation" >
< i data-toggle = "wy-nav-top" class = "fa fa-bars" > < / i >
< a href = "../index.html" > Triton< / a >
< / nav >
< div class = "wy-nav-content" >
< div class = "rst-content" >
< div role = "navigation" aria-label = "breadcrumbs navigation" >
< ul class = "wy-breadcrumbs" >
< li > < a href = "../index.html" class = "icon icon-home" > < / a > » < / li >
< li > triton.language< / li >
< li class = "wy-breadcrumbs-aside" >
< a href = "../_sources/python-api/triton.language.rst.txt" rel = "nofollow" > View page source< / a >
< / li >
< / ul >
< hr / >
< / div >
< div role = "main" class = "document" itemscope = "itemscope" itemtype = "http://schema.org/Article" >
< div itemprop = "articleBody" >
< div class = "section" id = "triton-language" >
< h1 > triton.language< a class = "headerlink" href = "#triton-language" title = "Permalink to this headline" > ¶< / a > < / h1 >
< div class = "section" id = "programming-model" >
< h2 > Programming Model< a class = "headerlink" href = "#programming-model" title = "Permalink to this headline" > ¶< / a > < / h2 >
< table class = "longtable docutils align-default" >
< colgroup >
< col style = "width: 10%" / >
< col style = "width: 90%" / >
< / colgroup >
< tbody >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.program_id.html#triton.language.program_id" title = "triton.language.program_id" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > program_id< / span > < / code > < / a > < / p > < / td >
< td > < p > Returns the id of the current program instance along the given < code class = "code docutils literal notranslate" > < span class = "pre" > axis< / span > < / code > .< / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.num_programs.html#triton.language.num_programs" title = "triton.language.num_programs" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > num_programs< / span > < / code > < / a > < / p > < / td >
< td > < p > Returns the number of program instances launched along the given < code class = "code docutils literal notranslate" > < span class = "pre" > axis< / span > < / code > .< / p > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "section" id = "creation-ops" >
< h2 > Creation Ops< a class = "headerlink" href = "#creation-ops" title = "Permalink to this headline" > ¶< / a > < / h2 >
< table class = "longtable docutils align-default" >
< colgroup >
< col style = "width: 10%" / >
< col style = "width: 90%" / >
< / colgroup >
< tbody >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.arange.html#triton.language.arange" title = "triton.language.arange" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > arange< / span > < / code > < / a > < / p > < / td >
< td > < p > Returns contiguous values within the open interval [< code class = "code docutils literal notranslate" > < span class = "pre" > start< / span > < / code > , < code class = "code docutils literal notranslate" > < span class = "pre" > end< / span > < / code > ).< / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.zeros.html#triton.language.zeros" title = "triton.language.zeros" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > zeros< / span > < / code > < / a > < / p > < / td >
< td > < p > Returns a block filled with the scalar value 0 for the given < code class = "code docutils literal notranslate" > < span class = "pre" > shape< / span > < / code > and < code class = "code docutils literal notranslate" > < span class = "pre" > dtype< / span > < / code > .< / p > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "section" id = "shape-manipulation-ops" >
< h2 > Shape Manipulation Ops< a class = "headerlink" href = "#shape-manipulation-ops" title = "Permalink to this headline" > ¶< / a > < / h2 >
< table class = "longtable docutils align-default" >
< colgroup >
< col style = "width: 10%" / >
< col style = "width: 90%" / >
< / colgroup >
< tbody >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.broadcast_to.html#triton.language.broadcast_to" title = "triton.language.broadcast_to" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > broadcast_to< / span > < / code > < / a > < / p > < / td >
< td > < p > Tries to broadcast the given block to a new < code class = "code docutils literal notranslate" > < span class = "pre" > shape< / span > < / code > .< / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.reshape.html#triton.language.reshape" title = "triton.language.reshape" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > reshape< / span > < / code > < / a > < / p > < / td >
< td > < p > Tries to reshape the given block to a new shape.< / p > < / td >
< / tr >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.ravel.html#triton.language.ravel" title = "triton.language.ravel" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > ravel< / span > < / code > < / a > < / p > < / td >
< td > < p > Returns a contiguous flattened view of < code class = "code docutils literal notranslate" > < span class = "pre" > x< / span > < / code > < / p > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "section" id = "linear-algebra-ops" >
< h2 > Linear Algebra Ops< a class = "headerlink" href = "#linear-algebra-ops" title = "Permalink to this headline" > ¶< / a > < / h2 >
< table class = "longtable docutils align-default" >
< colgroup >
< col style = "width: 10%" / >
< col style = "width: 90%" / >
< / colgroup >
< tbody >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.dot.html#triton.language.dot" title = "triton.language.dot" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > dot< / span > < / code > < / a > < / p > < / td >
< td > < p > Returns the matrix product of two blocks.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "section" id = "memory-ops" >
< h2 > Memory Ops< a class = "headerlink" href = "#memory-ops" title = "Permalink to this headline" > ¶< / a > < / h2 >
< table class = "longtable docutils align-default" >
< colgroup >
< col style = "width: 10%" / >
< col style = "width: 90%" / >
< / colgroup >
< tbody >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.load.html#triton.language.load" title = "triton.language.load" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > load< / span > < / code > < / a > < / p > < / td >
< td > < p > Return a block of data whose values are, elementwise, loaded from memory at location defined by < code class = "code docutils literal notranslate" > < span class = "pre" > pointer< / span > < / code > .< / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.store.html#triton.language.store" title = "triton.language.store" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > store< / span > < / code > < / a > < / p > < / td >
< td > < p > Stores < code class = "code docutils literal notranslate" > < span class = "pre" > value< / span > < / code > block of elements in memory, element-wise, at the memory locations specified by < code class = "code docutils literal notranslate" > < span class = "pre" > pointer< / span > < / code > .< / p > < / td >
< / tr >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.atomic_cas.html#triton.language.atomic_cas" title = "triton.language.atomic_cas" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > atomic_cas< / span > < / code > < / a > < / p > < / td >
< td > < p > Performs an atomic compare-and-swap at the memory location specified by < code class = "code docutils literal notranslate" > < span class = "pre" > pointer< / span > < / code > .< / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.atomic_xchg.html#triton.language.atomic_xchg" title = "triton.language.atomic_xchg" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > atomic_xchg< / span > < / code > < / a > < / p > < / td >
< td > < p > Performs an atomic exchange at the memory location specified by < code class = "code docutils literal notranslate" > < span class = "pre" > pointer< / span > < / code > .< / p > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "section" id = "indexing-ops" >
< h2 > Indexing Ops< a class = "headerlink" href = "#indexing-ops" title = "Permalink to this headline" > ¶< / a > < / h2 >
< table class = "longtable docutils align-default" >
< colgroup >
< col style = "width: 10%" / >
< col style = "width: 90%" / >
< / colgroup >
< tbody >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.where.html#triton.language.where" title = "triton.language.where" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > where< / span > < / code > < / a > < / p > < / td >
< td > < p > Returns a block of elements from either < code class = "code docutils literal notranslate" > < span class = "pre" > x< / span > < / code > or < code class = "code docutils literal notranslate" > < span class = "pre" > y< / span > < / code > , depending on < code class = "code docutils literal notranslate" > < span class = "pre" > condition< / span > < / code > .< / p > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "section" id = "math-ops" >
< h2 > Math Ops< a class = "headerlink" href = "#math-ops" title = "Permalink to this headline" > ¶< / a > < / h2 >
< table class = "longtable docutils align-default" >
< colgroup >
< col style = "width: 10%" / >
< col style = "width: 90%" / >
< / colgroup >
< tbody >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.exp.html#triton.language.exp" title = "triton.language.exp" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > exp< / span > < / code > < / a > < / p > < / td >
< td > < p > Computes the element-wise exponential of < code class = "code docutils literal notranslate" > < span class = "pre" > x< / span > < / code > < / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.log.html#triton.language.log" title = "triton.language.log" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > log< / span > < / code > < / a > < / p > < / td >
< td > < p > Computes the element-wise natural logarithm of < code class = "code docutils literal notranslate" > < span class = "pre" > x< / span > < / code > < / p > < / td >
< / tr >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.cos.html#triton.language.cos" title = "triton.language.cos" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > cos< / span > < / code > < / a > < / p > < / td >
< td > < p > Computes the element-wise cosine of < code class = "code docutils literal notranslate" > < span class = "pre" > x< / span > < / code > < / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.sin.html#triton.language.sin" title = "triton.language.sin" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > sin< / span > < / code > < / a > < / p > < / td >
< td > < p > Computes the element-wise sine of < code class = "code docutils literal notranslate" > < span class = "pre" > x< / span > < / code > < / p > < / td >
< / tr >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.sqrt.html#triton.language.sqrt" title = "triton.language.sqrt" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > sqrt< / span > < / code > < / a > < / p > < / td >
< td > < p > Computes the element-wise square root of < code class = "code docutils literal notranslate" > < span class = "pre" > x< / span > < / code > < / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.sigmoid.html#triton.language.sigmoid" title = "triton.language.sigmoid" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > sigmoid< / span > < / code > < / a > < / p > < / td >
< td > < p > Computes the element-wise sigmoid of < code class = "code docutils literal notranslate" > < span class = "pre" > x< / span > < / code > < / p > < / td >
< / tr >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.softmax.html#triton.language.softmax" title = "triton.language.softmax" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > softmax< / span > < / code > < / a > < / p > < / td >
< td > < p > Computes the element-wise softmax of < code class = "code docutils literal notranslate" > < span class = "pre" > x< / span > < / code > < / p > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "section" id = "reduction-ops" >
< h2 > Reduction Ops< a class = "headerlink" href = "#reduction-ops" title = "Permalink to this headline" > ¶< / a > < / h2 >
< table class = "longtable docutils align-default" >
< colgroup >
< col style = "width: 10%" / >
< col style = "width: 90%" / >
< / colgroup >
< tbody >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.max.html#triton.language.max" title = "triton.language.max" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > max< / span > < / code > < / a > < / p > < / td >
< td > < p > Returns the maximum of all elements in the < code class = "code docutils literal notranslate" > < span class = "pre" > input< / span > < / code > block along the provided < code class = "code docutils literal notranslate" > < span class = "pre" > axis< / span > < / code > < / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.min.html#triton.language.min" title = "triton.language.min" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > min< / span > < / code > < / a > < / p > < / td >
< td > < p > Returns the minimum of all elements in the < code class = "code docutils literal notranslate" > < span class = "pre" > input< / span > < / code > block along the provided < code class = "code docutils literal notranslate" > < span class = "pre" > axis< / span > < / code > < / p > < / td >
< / tr >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.sum.html#triton.language.sum" title = "triton.language.sum" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > sum< / span > < / code > < / a > < / p > < / td >
< td > < p > Returns the sum of all elements in the < code class = "code docutils literal notranslate" > < span class = "pre" > input< / span > < / code > block along the provided < code class = "code docutils literal notranslate" > < span class = "pre" > axis< / span > < / code > < / p > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "section" id = "atomic-ops" >
< h2 > Atomic Ops< a class = "headerlink" href = "#atomic-ops" title = "Permalink to this headline" > ¶< / a > < / h2 >
< table class = "longtable docutils align-default" >
< colgroup >
< col style = "width: 10%" / >
< col style = "width: 90%" / >
< / colgroup >
< tbody >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.atomic_cas.html#triton.language.atomic_cas" title = "triton.language.atomic_cas" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > atomic_cas< / span > < / code > < / a > < / p > < / td >
< td > < p > Performs an atomic compare-and-swap at the memory location specified by < code class = "code docutils literal notranslate" > < span class = "pre" > pointer< / span > < / code > .< / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.atomic_add.html#triton.language.atomic_add" title = "triton.language.atomic_add" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > atomic_add< / span > < / code > < / a > < / p > < / td >
< td > < p > Performs an atomic add at the memory location specified by < code class = "code docutils literal notranslate" > < span class = "pre" > pointer< / span > < / code > .< / p > < / td >
< / tr >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.atomic_max.html#triton.language.atomic_max" title = "triton.language.atomic_max" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > atomic_max< / span > < / code > < / a > < / p > < / td >
< td > < p > Performs an atomic max at the memory location specified by < code class = "code docutils literal notranslate" > < span class = "pre" > pointer< / span > < / code > .< / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.atomic_min.html#triton.language.atomic_min" title = "triton.language.atomic_min" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > atomic_min< / span > < / code > < / a > < / p > < / td >
< td > < p > Performs an atomic min at the memory location specified by < code class = "code docutils literal notranslate" > < span class = "pre" > pointer< / span > < / code > .< / p > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "section" id = "comparison-ops" >
< h2 > Comparison ops< a class = "headerlink" href = "#comparison-ops" title = "Permalink to this headline" > ¶< / a > < / h2 >
< table class = "longtable docutils align-default" >
< colgroup >
< col style = "width: 10%" / >
< col style = "width: 90%" / >
< / colgroup >
< tbody >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.minimum.html#triton.language.minimum" title = "triton.language.minimum" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > minimum< / span > < / code > < / a > < / p > < / td >
< td > < p > Computes the element-wise minimum of < code class = "code docutils literal notranslate" > < span class = "pre" > x< / span > < / code > and < code class = "code docutils literal notranslate" > < span class = "pre" > y< / span > < / code > .< / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.maximum.html#triton.language.maximum" title = "triton.language.maximum" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > maximum< / span > < / code > < / a > < / p > < / td >
< td > < p > Computes the element-wise maximum of < code class = "code docutils literal notranslate" > < span class = "pre" > x< / span > < / code > and < code class = "code docutils literal notranslate" > < span class = "pre" > y< / span > < / code > .< / p > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "section" id = "random-number-generation" >
< span id = "id1" > < / span > < h2 > Random Number Generation< a class = "headerlink" href = "#random-number-generation" title = "Permalink to this headline" > ¶< / a > < / h2 >
< table class = "longtable docutils align-default" >
< colgroup >
< col style = "width: 10%" / >
< col style = "width: 90%" / >
< / colgroup >
< tbody >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.randint4x.html#triton.language.randint4x" title = "triton.language.randint4x" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > randint4x< / span > < / code > < / a > < / p > < / td >
< td > < p > Given a < code class = "code docutils literal notranslate" > < span class = "pre" > seed< / span > < / code > scalar and an < code class = "code docutils literal notranslate" > < span class = "pre" > offset< / span > < / code > block, returns four blocks of random < code class = "code docutils literal notranslate" > < span class = "pre" > int32< / span > < / code > .< / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.randint.html#triton.language.randint" title = "triton.language.randint" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > randint< / span > < / code > < / a > < / p > < / td >
< td > < p > Given a < code class = "code docutils literal notranslate" > < span class = "pre" > seed< / span > < / code > scalar and an < code class = "code docutils literal notranslate" > < span class = "pre" > offset< / span > < / code > block, returns a single block of random < code class = "code docutils literal notranslate" > < span class = "pre" > int32< / span > < / code > .< / p > < / td >
< / tr >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.rand.html#triton.language.rand" title = "triton.language.rand" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > rand< / span > < / code > < / a > < / p > < / td >
< td > < p > Given a < code class = "code docutils literal notranslate" > < span class = "pre" > seed< / span > < / code > scalar and an < code class = "code docutils literal notranslate" > < span class = "pre" > offset< / span > < / code > block, returns a block of random < code class = "code docutils literal notranslate" > < span class = "pre" > float32< / span > < / code > in < span class = "math notranslate nohighlight" > \(U(0, 1)\)< / span > < / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < a class = "reference internal" href = "generated/triton.language.randn.html#triton.language.randn" title = "triton.language.randn" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > randn< / span > < / code > < / a > < / p > < / td >
< td > < p > Given a < code class = "code docutils literal notranslate" > < span class = "pre" > seed< / span > < / code > scalar and an < code class = "code docutils literal notranslate" > < span class = "pre" > offset< / span > < / code > block, returns a block of random < code class = "code docutils literal notranslate" > < span class = "pre" > float32< / span > < / code > in < span class = "math notranslate nohighlight" > \(\mathcal{N}(0, 1)\)< / span > < / p > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "section" id = "compiler-hint-ops" >
< h2 > Compiler Hint Ops< a class = "headerlink" href = "#compiler-hint-ops" title = "Permalink to this headline" > ¶< / a > < / h2 >
< table class = "longtable docutils align-default" >
< colgroup >
< col style = "width: 10%" / >
< col style = "width: 90%" / >
< / colgroup >
< tbody >
< tr class = "row-odd" > < td > < p > < a class = "reference internal" href = "generated/triton.language.multiple_of.html#triton.language.multiple_of" title = "triton.language.multiple_of" > < code class = "xref py py-obj docutils literal notranslate" > < span class = "pre" > multiple_of< / span > < / code > < / a > < / p > < / td >
< td > < p > Let the compiler knows that the values in < code class = "code docutils literal notranslate" > < span class = "pre" > input< / span > < / code > are all multiples of < code class = "code docutils literal notranslate" > < span class = "pre" > value< / span > < / code > .< / p > < / td >
< / tr >
< / tbody >
< / table >
< / div >
< / div >
< / div >
< / div >
< footer >
< div class = "rst-footer-buttons" role = "navigation" aria-label = "footer navigation" >
< a href = "generated/triton.language.program_id.html" class = "btn btn-neutral float-right" title = "triton.language.program_id" accesskey = "n" rel = "next" > Next < span class = "fa fa-arrow-circle-right" aria-hidden = "true" > < / span > < / a >
< a href = "generated/triton.Config.html" class = "btn btn-neutral float-left" title = "triton.Config" accesskey = "p" rel = "prev" > < span class = "fa fa-arrow-circle-left" aria-hidden = "true" > < / span > Previous< / a >
< / div >
< hr / >
< div role = "contentinfo" >
< p >
© Copyright 2020, Philippe Tillet.
< / p >
< / div >
Built with < a href = "https://www.sphinx-doc.org/" > Sphinx< / a > using a
< a href = "https://github.com/readthedocs/sphinx_rtd_theme" > theme< / a >
provided by < a href = "https://readthedocs.org" > Read the Docs< / a > .
< / footer >
< / div >
< / div >
< / section >
< / div >
2022-02-08 20:02:05 +00:00
< div class = "rst-versions" data-toggle = "rst-versions" role = "note" aria-label = "versions" >
< span class = "rst-current-version" data-toggle = "rst-current-version" >
< span class = "fa fa-book" > Other Versions< / span >
2022-02-08 23:45:21 +00:00
v: v1.1.2
2022-02-08 20:02:05 +00:00
< span class = "fa fa-caret-down" > < / span >
< / span >
< div class = "rst-other-versions" >
< dl >
< dt > Tags< / dt >
2022-02-08 23:45:21 +00:00
< dd > < a href = "triton.language.html" > v1.1.2< / a > < / dd >
2022-02-08 20:02:05 +00:00
< / dl >
2022-02-09 03:17:47 +00:00
< dl >
< dt > Branches< / dt >
< dd > < a href = "../../master/python-api/triton.language.html" > master< / a > < / dd >
< / dl >
2022-02-08 20:02:05 +00:00
< / div >
< / div >
2021-09-10 22:58:16 +00:00
< script type = "text/javascript" >
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
< / script >
< / body >
< / html >