blob: 836c611d5710c4ccbeb6dbedccb80a3b9b4b513f [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mxnet: /work/mxnet/3rdparty/tvm/nnvm/include/nnvm/pass_functions.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">mxnet
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_d40daf7ef9783ad6669561b9a39523a5.html">tvm</a></li><li class="navelem"><a class="el" href="dir_59ab2d7405f48271a817356d16f4868c.html">nnvm</a></li><li class="navelem"><a class="el" href="dir_564b1b3930cee8f0cd6786ede046ff35.html">include</a></li><li class="navelem"><a class="el" href="dir_aadb892b7c99db7e2c3fc68a6c967545.html">nnvm</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">pass_functions.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Pass functions that simply redirect the calls to ApplyPass.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;string&gt;</code><br />
<code>#include &lt;memory&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
<code>#include &lt;utility&gt;</code><br />
<code>#include &quot;<a class="el" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2base_8h_source.html">base.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="pass_8h_source.html">pass.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2graph__attr__types_8h_source.html">graph_attr_types.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for pass_functions.h:</div>
<div class="dyncontent">
<div class="center"><img src="pass__functions_8h__incl.png" border="0" usemap="#_2work_2mxnet_23rdparty_2tvm_2nnvm_2include_2nnvm_2pass__functions_8h" alt=""/></div>
<map name="_2work_2mxnet_23rdparty_2tvm_2nnvm_2include_2nnvm_2pass__functions_8h" id="_2work_2mxnet_23rdparty_2tvm_2nnvm_2include_2nnvm_2pass__functions_8h">
<area shape="rect" id="node6" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2base_8h.html" title="Configuration of nnvm as well as basic data structure. " alt="" coords="2882,408,2947,435"/>
<area shape="rect" id="node42" href="pass_8h.html" title="Pass that can be applied to a graph. " alt="" coords="3156,109,3220,136"/>
<area shape="rect" id="node48" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2graph__attr__types_8h.html" title="Data structures that can appear in graph attributes. " alt="" coords="2317,259,2461,285"/>
<area shape="rect" id="node7" href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h.html" title="dmlc/base.h" alt="" coords="1747,781,1848,808"/>
<area shape="rect" id="node11" href="common_8h.html" title="defines some common utility function. " alt="" coords="2305,707,2431,733"/>
<area shape="rect" id="node15" href="any_8h.html" title="Container to hold any data type. " alt="" coords="2337,632,2429,659"/>
<area shape="rect" id="node20" href="3rdparty_2dmlc-core_2include_2dmlc_2memory_8h.html" title="dmlc/memory.h" alt="" coords="3115,632,3237,659"/>
<area shape="rect" id="node23" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html" title="dmlc/registry.h" alt="" coords="1855,483,1974,509"/>
<area shape="rect" id="node40" href="array__view_8h.html" title="Read only data structure to reference array. " alt="" coords="3353,483,3495,509"/>
<area shape="rect" id="node10" href="build__config__default_8h.html" title="Default detection logic for fopen64 and other symbols. May be overriden by CMake. ..." alt="" coords="1523,856,1725,883"/>
<area shape="rect" id="node21" href="thread__local_8h.html" title="Portable thread local storage. " alt="" coords="3165,707,3288,733"/>
<area shape="rect" id="node25" href="parameter_8h.html" title="Provide lightweight util to do parameter setup and checking. " alt="" coords="1491,557,1600,584"/>
<area shape="rect" id="node36" href="type__traits_8h.html" title="type traits information header " alt="" coords="827,707,939,733"/>
<area shape="rect" id="node35" href="json_8h.html" title="Lightweight JSON Reader/Writer that read save into C++ data structs. This includes STL composites and..." alt="" coords="1403,632,1472,659"/>
<area shape="rect" id="node38" href="optional_8h.html" title="Container to hold optional data. " alt="" coords="1131,632,1226,659"/>
<area shape="rect" id="node39" href="strtonum_8h.html" title="A faster implementation of strtof and strtod. " alt="" coords="600,707,701,733"/>
<area shape="rect" id="node44" href="graph_8h.html" title="Configuation of nnvm as well as basic data structure. " alt="" coords="3269,184,3339,211"/>
<area shape="rect" id="node46" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2node_8h.html" title="Graph node data structure. " alt="" coords="3301,333,3368,360"/>
<area shape="rect" id="node47" href="symbolic_8h.html" title="Symbolic graph construction API. " alt="" coords="3129,259,3223,285"/>
<area shape="rect" id="node49" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2tuple_8h.html" title="Data structure Tuple and TShape to store dynamic sized shapes. " alt="" coords="1935,333,2001,360"/>
<area shape="rect" id="node50" href="layout_8h.html" title="Layout expression. The layout is composed of upper cases, lower cases and numbers, where upper case indicates a (super&#45;)dimension and the corresponding lower case with factor size indicates the split (sub&#45;)dimension. For example, NCHW16c can describe a 5&#45;D tensor of [batch_size, channel, height, width, channel_block]. Here sub&#45;dimension channel_block=16 is the split of super&#45;dimension C (channel). " alt="" coords="625,483,700,509"/>
</map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="pass__functions_8h__dep__incl.png" border="0" usemap="#_2work_2mxnet_23rdparty_2tvm_2nnvm_2include_2nnvm_2pass__functions_8hdep" alt=""/></div>
<map name="_2work_2mxnet_23rdparty_2tvm_2nnvm_2include_2nnvm_2pass__functions_8hdep" id="_2work_2mxnet_23rdparty_2tvm_2nnvm_2include_2nnvm_2pass__functions_8hdep">
<area shape="rect" id="node2" href="exec__utils_8h.html" title="Common utility functions for executors. " alt="" coords="5,109,193,151"/>
</map>
</div>
</div>
<p><a href="pass__functions_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespacennvm"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacennvm.html">nnvm</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:namespacennvm_1_1pass"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacennvm_1_1pass.html">nnvm::pass</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aac90eb2d4aea5e49892b0e0a914fe94b"><td class="memItemLeft" align="right" valign="top">Graph&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacennvm_1_1pass.html#aac90eb2d4aea5e49892b0e0a914fe94b">nnvm::pass::LoadJSON</a> (const std::string &amp;json_str)</td></tr>
<tr class="memdesc:aac90eb2d4aea5e49892b0e0a914fe94b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load a graph from JSON string, redirects to "LoadJSON" pass. <a href="namespacennvm_1_1pass.html#aac90eb2d4aea5e49892b0e0a914fe94b">More...</a><br /></td></tr>
<tr class="separator:aac90eb2d4aea5e49892b0e0a914fe94b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab82581d1205ed50203822366f2f5f5f5"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacennvm_1_1pass.html#ab82581d1205ed50203822366f2f5f5f5">nnvm::pass::SaveJSON</a> (Graph graph)</td></tr>
<tr class="memdesc:ab82581d1205ed50203822366f2f5f5f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save a graph to json, redirects to "SaveJSON" pass. <a href="namespacennvm_1_1pass.html#ab82581d1205ed50203822366f2f5f5f5">More...</a><br /></td></tr>
<tr class="separator:ab82581d1205ed50203822366f2f5f5f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb99f53fcc75259eb131a61fce2350f7"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacennvm_1_1pass.html#aeb99f53fcc75259eb131a61fce2350f7">nnvm::pass::PrintGraphIR</a> (Graph graph)</td></tr>
<tr class="memdesc:aeb99f53fcc75259eb131a61fce2350f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print graph ir. <a href="namespacennvm_1_1pass.html#aeb99f53fcc75259eb131a61fce2350f7">More...</a><br /></td></tr>
<tr class="separator:aeb99f53fcc75259eb131a61fce2350f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58861df29a62ee368c4bc672f03eff62"><td class="memItemLeft" align="right" valign="top">Graph&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacennvm_1_1pass.html#a58861df29a62ee368c4bc672f03eff62">nnvm::pass::OrderMutation</a> (Graph src)</td></tr>
<tr class="memdesc:a58861df29a62ee368c4bc672f03eff62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add control flow dependencies between nodes. <a href="namespacennvm_1_1pass.html#a58861df29a62ee368c4bc672f03eff62">More...</a><br /></td></tr>
<tr class="separator:a58861df29a62ee368c4bc672f03eff62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fd9e840e169150d3cb4439448fd1561"><td class="memItemLeft" align="right" valign="top">Graph&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacennvm_1_1pass.html#a9fd9e840e169150d3cb4439448fd1561">nnvm::pass::InferShape</a> (Graph graph, ShapeVector shape_inputs, std::string shape_attr_key=&quot;&quot;)</td></tr>
<tr class="memdesc:a9fd9e840e169150d3cb4439448fd1561"><td class="mdescLeft">&#160;</td><td class="mdescRight">Infer shapes in the graph given the information. <a href="namespacennvm_1_1pass.html#a9fd9e840e169150d3cb4439448fd1561">More...</a><br /></td></tr>
<tr class="separator:a9fd9e840e169150d3cb4439448fd1561"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab29a181d9547fdac0f205c3aaec0de68"><td class="memItemLeft" align="right" valign="top">Graph&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacennvm_1_1pass.html#ab29a181d9547fdac0f205c3aaec0de68">nnvm::pass::InferType</a> (Graph graph, DTypeVector dtype_inputs, std::string dtype_attr_key=&quot;&quot;)</td></tr>
<tr class="memdesc:ab29a181d9547fdac0f205c3aaec0de68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Infer types in the graph given the information. <a href="namespacennvm_1_1pass.html#ab29a181d9547fdac0f205c3aaec0de68">More...</a><br /></td></tr>
<tr class="separator:ab29a181d9547fdac0f205c3aaec0de68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5d216c596bc52189f90b392e0e9b115"><td class="memItemLeft" align="right" valign="top">Graph&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacennvm_1_1pass.html#ad5d216c596bc52189f90b392e0e9b115">nnvm::pass::PlaceDevice</a> (Graph graph, std::string device_group_attr_key, DeviceAssignMap device_assign_map, std::string device_copy_op)</td></tr>
<tr class="memdesc:ad5d216c596bc52189f90b392e0e9b115"><td class="mdescLeft">&#160;</td><td class="mdescRight">Place the devices for each operator in the graph. <a href="namespacennvm_1_1pass.html#ad5d216c596bc52189f90b392e0e9b115">More...</a><br /></td></tr>
<tr class="separator:ad5d216c596bc52189f90b392e0e9b115"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69b98a03bd41e5b184691e089e6c91a3"><td class="memItemLeft" align="right" valign="top">Graph&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacennvm_1_1pass.html#a69b98a03bd41e5b184691e089e6c91a3">nnvm::pass::Gradient</a> (Graph graph, std::vector&lt; NodeEntry &gt; ys, std::vector&lt; NodeEntry &gt; xs, std::vector&lt; NodeEntry &gt; ys_out_grad, std::function&lt; NodeEntry(std::vector&lt; NodeEntry &gt; &amp;&amp;inputs)&gt; aggregate_fun=nullptr, std::function&lt; int(const Node &amp;node)&gt; mirror_fun=nullptr, std::function&lt; NodeEntry(const NodeEntry &amp;src, const NodeEntry &amp;like)&gt; attr_hint_fun=nullptr, std::vector&lt; const Op *&gt; zero_ops=std::vector&lt; const Op *&gt;(), std::string copy_op_str=std::string())</td></tr>
<tr class="memdesc:a69b98a03bd41e5b184691e089e6c91a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the gradient graph whose outputs are gradients of xs wrt to ys. <a href="namespacennvm_1_1pass.html#a69b98a03bd41e5b184691e089e6c91a3">More...</a><br /></td></tr>
<tr class="separator:a69b98a03bd41e5b184691e089e6c91a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Pass functions that simply redirect the calls to ApplyPass. </p>
<p>This file serves as documentation on how to use functions implemented in "src/pass". It is totally optional to add these functions when you add a new pass, since ApplyPass can be directly called. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jan 5 2023 00:58:43 for mxnet by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>