Files
triton/master/.doctrees/python-api/generated/triton.heuristics.doctree

20 lines
6.3 KiB
Plaintext
Raw Normal View History

2022-06-05 21:05:02 +00:00
<EFBFBD><05>R<00>sphinx.addnodes<65><73>document<6E><74><EFBFBD>)<29><>}<7D>(<28> rawsource<63><65><00><>children<65>]<5D><>docutils.nodes<65><73>section<6F><6E><EFBFBD>)<29><>}<7D>(hhh]<5D>(h <09>title<6C><65><EFBFBD>)<29><>}<7D>(h<05>triton.heuristics<63>h]<5D>h <09>Text<78><74><EFBFBD><EFBFBD>triton.heuristics<63><73><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<13>parent<6E>hhh<03>source<63>N<EFBFBD>line<6E>Nuba<62>
2022-06-16 00:46:38 +00:00
attributes<EFBFBD>}<7D>(<28>ids<64>]<5D><>classes<65>]<5D><>names<65>]<5D><>dupnames<65>]<5D><>backrefs<66>]<5D>u<EFBFBD>tagname<6D>hhh hhh<1C>i/tmp/tmpxsh647ab/b5e728cb14eb0ed8610fbc012162e6c9c8654f70/docs/python-api/generated/triton.heuristics.rst<73>hKubh<00>index<65><78><EFBFBD>)<29><>}<7D>(hhh]<5D>h}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D><>entries<65>]<5D>(<28>single<6C><65>heuristics() (in module triton)<29><>triton.heuristics<63>hNt<4E>auh*h,hh hhh<1C>{/tmp/tmpxsh647ab/b5e728cb14eb0ed8610fbc012162e6c9c8654f70/python/triton/code_gen.py:docstring of triton.code_gen.heuristics<63>hNubh<00>desc<73><63><EFBFBD>)<29><>}<7D>(hhh]<5D>(h<00>desc_signature<72><65><EFBFBD>)<29><>}<7D>(h<05>heuristics(values)<29>h]<5D>(h<00> desc_addname<6D><65><EFBFBD>)<29><>}<7D>(h<05>triton.<2E>h]<5D>h<16>triton.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhhKhhhNhNubah}<7D>(h ]<5D>h"]<5D>(<28> sig-prename<6D><65> descclassname<6D>eh$]<5D>h&]<5D>h(]<5D><> xml:space<63><65>preserve<76>uh*hIhhEhhh<1C>{/tmp/tmpxsh647ab/b5e728cb14eb0ed8610fbc012162e6c9c8654f70/python/triton/code_gen.py:docstring of triton.code_gen.heuristics<63>hNubh<00> desc_name<6D><65><EFBFBD>)<29><>}<7D>(h<05>
2022-06-05 21:05:02 +00:00
heuristics<EFBFBD>h]<5D>h<16>
heuristics<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhh`hhhNhNubah}<7D>(h ]<5D>h"]<5D>(<28>sig-name<6D><65>descname<6D>eh$]<5D>h&]<5D>h(]<5D>h[h\uh*h^hhEhhhh]hNubh<00>desc_parameterlist<73><74><EFBFBD>)<29><>}<7D>(h<05>values<65>h]<5D>h<00>desc_parameter<65><72><EFBFBD>)<29><>}<7D>(h<05>values<65>h]<5D>h<00> desc_sig_name<6D><65><EFBFBD>)<29><>}<7D>(h<05>values<65>h]<5D>h<16>values<65><73><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhh~ubah}<7D>(h ]<5D>h"]<5D><>n<>ah$]<5D>h&]<5D>h(]<5D>uh*h|hhxubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>h[h\uh*hvhhrubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>h[h\uh*hphhEhhhh]hNubeh}<7D>(h ]<5D>h;ah"]<5D>(<28>sig<69><67>
sig-object<63>eh$]<5D>h&]<5D>h(]<5D><>module<6C><65>triton<6F><6E>class<73>h<06>fullname<6D>hbuh*hChh]hKhh@hhubh<00> desc_content<6E><74><EFBFBD>)<29><>}<7D>(hhh]<5D>(h <09> paragraph<70><68><EFBFBD>)<29><>}<7D>(h<05><>Decorator for specifying how the values of certain meta-parameters may be computed.
This is useful for cases where auto-tuning is prohibitevely expensive, or just not applicable.<2E>h]<5D>h<16><>Decorator for specifying how the values of certain meta-parameters may be computed.
This is useful for cases where auto-tuning is prohibitevely expensive, or just not applicable.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<>hh<>hhhNhNubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hh=hKhh<>hhubh<00> highlightlang<6E><67><EFBFBD>)<29><>}<7D>(hhh]<5D>h}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D><>lang<6E><67>python<6F><6E>force<63><65><EFBFBD>linenothreshold<6C><64><08><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>uh*h<>hh<>hhhh=hKubh <09> literal_block<63><6B><EFBFBD>)<29><>}<7D>(h<05><>@triton.heuristics(values={'BLOCK_SIZE': lambda args: 2 ** int(math.ceil(math.log2(args[1])))})
@triton.jit
def kernel(x_ptr, x_size, **META):
BLOCK_SIZE = META['BLOCK_SIZE'] # smallest power-of-two >= x_size<7A>h]<5D>h<16><>@triton.heuristics(values={'BLOCK_SIZE': lambda args: 2 ** int(math.ceil(math.log2(args[1])))})
@triton.jit
def kernel(x_ptr, x_size, **META):
BLOCK_SIZE = META['BLOCK_SIZE'] # smallest power-of-two >= x_size<7A><65><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhh<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>h[h\<5C>force<63><65><EFBFBD>language<67><65>python<6F><6E>highlight_args<67>}<7D>uh*h<>hh=hKhh<>hhubh <09>definition_list<73><74><EFBFBD>)<29><>}<7D>(hhh]<5D>h <09>definition_list_item<65><6D><EFBFBD>)<29><>}<7D>(h<05><>.param values: a dictionary of meta-parameter names and functions that compute the value of the meta-parameter.
each such function takes a list of positional arguments as input.<2E>h]<5D>(h <09>term<72><6D><EFBFBD>)<29><>}<7D>(h<05>o.param values: a dictionary of meta-parameter names and functions that compute the value of the meta-parameter.<2E>h]<5D>h<16>o.param values: a dictionary of meta-parameter names and functions that compute the value of the meta-parameter.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hh<>hh<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hh=hK hh<>ubh <09>
definition<EFBFBD><EFBFBD><EFBFBD>)<29><>}<7D>(hhh]<5D>h<EFBFBD>)<29><>}<7D>(h<05>Aeach such function takes a list of positional arguments as input.<2E>h]<5D>h<16>Aeach such function takes a list of positional arguments as input.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hjhh<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hh=hKhh<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hh<>ubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hh=hK hh<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hh<>hhhh=hNubh<62>)<29><>}<7D>(h<05>3.type values: dict[str, Callable[[list[Any]], Any]]<5D>h]<5D>h<16>3.type values: dict[str, Callable[[list[Any]], Any]]<5D><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hj hjhhhNhNubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hh=hKhh<>hhubeh}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hh@hhhh]hNubeh}<7D>(h ]<5D>h"]<5D>(<28>py<70><79>function<6F>eh$]<5D>h&]<5D>h(]<5D><>domain<69>j5<00>objtype<70>j6<00>desctype<70>j6<00>noindex<65><78>uh*h>hhhh hh=hNubeh}<7D>(h ]<5D><>triton-heuristics<63>ah"]<5D>h$]<5D><>triton.heuristics<63>ah&]<5D>h(]<5D>uh*h
hhhhhh+hKubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D><>source<63>h+uh*h<01>current_source<63>N<EFBFBD> current_line<6E>N<EFBFBD>settings<67><73>docutils.frontend<6E><64>Values<65><73><EFBFBD>)<29><>}<7D>(hN<> generator<6F>N<EFBFBD> datestamp<6D>N<EFBFBD> source_link<6E>N<EFBFBD>
source_url<EFBFBD>N<EFBFBD> toc_backlinks<6B><73>entry<72><79>footnote_backlinks<6B>K<01> sectnum_xform<72>K<01>strip_comments<74>N<EFBFBD>strip_elements_with_classes<65>N<EFBFBD> strip_classes<65>N<EFBFBD> report_level<65>K<02>
halt_level<EFBFBD>K<05>exit_status_level<65>K<05>debug<75>N<EFBFBD>warning_stream<61>N<EFBFBD> traceback<63><6B><EFBFBD>input_encoding<6E><67> utf-8-sig<69><67>input_encoding_error_handler<65><72>strict<63><74>output_encoding<6E><67>utf-8<><38>output_encoding_error_handler<65>ji<00>error_encoding<6E><67>utf-8<><38>error_encoding_error_handler<65><72>backslashreplace<63><65> language_code<64><65>en<65><6E>record_dependencies<65>N<EFBFBD>config<69>N<EFBFBD> id_prefix<69>h<06>auto_id_prefix<69><78>id<69><64> dump_settings<67>N<EFBFBD>dump_internals<6C>N<EFBFBD>dump_transforms<6D>N<EFBFBD>dump_pseudo_xml<6D>N<EFBFBD>expose_internals<6C>N<EFBFBD>strict_visitor<6F>N<EFBFBD>_disable_config<69>N<EFBFBD>_source<63>h+<2B> _destination<6F>N<EFBFBD> _config_files<65>]<5D><>pep_references<65>N<EFBFBD> pep_base_url<72><6C> https://www.python.org/dev/peps/<2F><>pep_file_url_template<74><65>pep-%04d<34><64>rfc_references<65>N<EFBFBD> rfc_base_url<72><6C>https://tools.ietf.org/html/<2F><> tab_width<74>K<08>trim_footnote_reference_space<63><65><EFBFBD>file_insertion_enabled<65><64><EFBFBD> raw_enabled<65>K<01>syntax_highlight<68><74>long<6E><67> smart_quotes<65><73><EFBFBD>smartquotes_locales<65>]<5D><>character_level_inline_markup<75><70><EFBFBD>doctitle_xform<72><6D><EFBFBD> docinfo_xform<72>K<01>sectsubtitle_xform<72><6D><EFBFBD>embed_stylesheet<65><74><EFBFBD>cloak_email_addresses<65><73><EFBFBD>env<6E>Nub<75>reporter<65>N<EFBFBD>indirect_targets<74>]<5D><>substitution_defs<66>}<7D><>substitution_names<65>}<7D><>refnames<65>}<7D><>refids<64>}<7D><>nameids<64>}<7D>jCj@s<> nametypes<65>}<7D>jCNsh }<7D>(j@h h;hEu<45> footnote_refs<66>}<7D><> citation_refs<66>}<7D><> autofootnotes<65>]<5D><>autofootnote_refs<66>]<5D><>symbol_footnotes<65>]<5D><>symbol_footnote_refs<66>]<5D><> footnotes<65>]<5D><> citations<6E>]<5D><>autofootnote_start<72>K<01>symbol_footnote_start<72>K<00>
id_counter<EFBFBD><EFBFBD> collections<6E><73>Counter<65><72><EFBFBD>}<7D><><EFBFBD>R<EFBFBD><52>parse_messages<65>]<5D>h <09>system_message<67><65><EFBFBD>)<29><>}<7D>(hhh]<5D>h<EFBFBD>)<29><>}<7D>(h<05>?Definition list ends without a blank line; unexpected unindent.<2E>h]<5D>h<16>?Definition list ends without a blank line; unexpected unindent.<2E><><EFBFBD><EFBFBD><EFBFBD>}<7D>(hhhj<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D>uh*h<>hj<>ubah}<7D>(h ]<5D>h"]<5D>h$]<5D>h&]<5D>h(]<5D><>level<65>K<02>type<70><65>WARNING<4E><47>line<6E>K<0F>source<63>h=uh*j<>hh<>hhhh=hKuba<62>transform_messages<65>]<5D><> transformer<65>N<EFBFBD>
decoration<EFBFBD>Nhhub.