blob: d695fbeab61e2e2f106f0e4dbaac14c1d204fed1 [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/include/mxnet/operator.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_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1143c7affb9ebd026cb6818dd282def7.html">mxnet</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> </div>
<div class="headertitle">
<div class="title">operator.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h_source.html">dmlc/base.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="json_8h_source.html">dmlc/json.h</a>&gt;</code><br />
<code>#include &lt;dmlc/logging.h&gt;</code><br />
<code>#include &lt;<a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h_source.html">dmlc/registry.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2node_8h_source.html">nnvm/node.h</a>&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
<code>#include &lt;map&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
<code>#include &lt;utility&gt;</code><br />
<code>#include &quot;<a class="el" href="include_2mxnet_2base_8h_source.html">./base.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="resource_8h_source.html">./resource.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="include_2mxnet_2op__attr__types_8h_source.html">./op_attr_types.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for operator.h:</div>
<div class="dyncontent">
<div class="center"><img src="include_2mxnet_2operator_8h__incl.png" border="0" usemap="#_2work_2mxnet_2include_2mxnet_2operator_8h" alt=""/></div>
<map name="_2work_2mxnet_2include_2mxnet_2operator_8h" id="_2work_2mxnet_2include_2mxnet_2operator_8h">
<area shape="rect" id="node2" href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h.html" title="dmlc/base.h" alt="" coords="1521,1065,1622,1092"/>
<area shape="rect" id="node8" href="json_8h.html" title="Lightweight JSON Reader/Writer that read save into C++ data structs. This includes STL composites and..." alt="" coords="685,916,783,943"/>
<area shape="rect" id="node23" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html" title="dmlc/registry.h" alt="" coords="2483,767,2601,793"/>
<area shape="rect" id="node33" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2node_8h.html" title="Graph node data structure. " alt="" coords="2569,543,2675,569"/>
<area shape="rect" id="node39" href="include_2mxnet_2base_8h.html" title="./base.h" alt="" coords="2085,319,2159,345"/>
<area shape="rect" id="node46" href="resource_8h.html" title="Global resource allocation handling. " alt="" coords="2657,169,2755,196"/>
<area shape="rect" id="node49" href="include_2mxnet_2op__attr__types_8h.html" title="./op_attr_types.h" alt="" coords="2851,95,2982,121"/>
<area shape="rect" id="node7" href="build__config__default_8h.html" title="Default detection logic for fopen64 and other symbols. May be overriden by CMake. ..." alt="" coords="1297,1140,1499,1167"/>
<area shape="rect" id="node17" href="type__traits_8h.html" title="type traits information header " alt="" coords="309,991,421,1017"/>
<area shape="rect" id="node24" href="parameter_8h.html" title="Provide lightweight util to do parameter setup and checking. " alt="" coords="1375,841,1485,868"/>
<area shape="rect" id="node35" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2base_8h.html" title="Configuration of nnvm as well as basic data structure. " alt="" coords="2652,692,2717,719"/>
<area shape="rect" id="node36" href="op_8h.html" title="Operator information structor. " alt="" coords="2305,617,2355,644"/>
<area shape="rect" id="node38" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2c__api_8h.html" title="C API of NNVM symbolic construction and pass. Enables construction and transformation of Graph in any..." alt="" coords="2407,692,2475,719"/>
<area shape="rect" id="node40" href="3rdparty_2dmlc-core_2include_2dmlc_2io_8h.html" title="dmlc/io.h" alt="" coords="3046,916,3129,943"/>
<area shape="rect" id="node41" href="tensor_8h.html" title="header file of tensor data structure and functions This lib requires explicit memory allocation and d..." alt="" coords="63,841,205,868"/>
<area shape="rect" id="node42" href="symbolic_8h.html" title="Symbolic graph construction API. " alt="" coords="2447,468,2581,495"/>
<area shape="rect" id="node43" href="libinfo_8h.html" title="get features of the MXNet library at runtime " alt="" coords="3057,543,3131,569"/>
<area shape="rect" id="node44" href="include_2mxnet_2tuple_8h.html" title="Data structure Tuple and TShape to store dynamic sized shapes. " alt="" coords="1766,393,1833,420"/>
<area shape="rect" id="node45" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2op__attr__types_8h.html" title="Data structures that can appear in operator attributes. " alt="" coords="3409,468,3573,495"/>
<area shape="rect" id="node47" href="engine_8h.html" title="Engine that schedules all the operations according to dependency. " alt="" coords="2888,244,2975,271"/>
<area shape="rect" id="node48" href="random__generator_8h.html" title="Parallel random number generator. " alt="" coords="2015,244,2176,271"/>
<area shape="rect" id="node50" href="include_2mxnet_2ndarray_8h.html" title="./ndarray.h" alt="" coords="2830,169,2921,196"/>
</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="include_2mxnet_2operator_8h__dep__incl.png" border="0" usemap="#_2work_2mxnet_2include_2mxnet_2operator_8hdep" alt=""/></div>
<map name="_2work_2mxnet_2include_2mxnet_2operator_8hdep" id="_2work_2mxnet_2include_2mxnet_2operator_8hdep">
<area shape="rect" id="node2" href="include_2mxnet_2executor_8h.html" title="/work/mxnet/include\l/mxnet/executor.h" alt="" coords="5,95,160,136"/>
<area shape="rect" id="node3" href="operator__util_8h.html" title="Utility functions and registries to help quickly build new operators. [Deprecated] Use the register f..." alt="" coords="185,95,351,136"/>
</map>
</div>
</div>
<p><a href="include_2mxnet_2operator_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="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1Operator.html">mxnet::Operator</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmxnet_1_1Operator.html" title="Operator interface. Operator defines basic operation unit of optimized computation graph in mxnet...">Operator</a> interface. <a class="el" href="classmxnet_1_1Operator.html" title="Operator interface. Operator defines basic operation unit of optimized computation graph in mxnet...">Operator</a> defines basic operation unit of optimized computation graph in mxnet. This interface relies on pre-allocated memory in <a class="el" href="classmxnet_1_1TBlob.html" title="tensor blob class that can be used to hold tensor of any dimension, any device and any data type...">TBlob</a>, the caller need to set the memory region in <a class="el" href="classmxnet_1_1TBlob.html" title="tensor blob class that can be used to hold tensor of any dimension, any device and any data type...">TBlob</a> correctly before calling Forward and Backward. <a href="classmxnet_1_1Operator.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1OperatorProperty.html">mxnet::OperatorProperty</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmxnet_1_1OperatorProperty.html" title="OperatorProperty is a object that stores all information about Operator. It also contains method to g...">OperatorProperty</a> is a object that stores all information about <a class="el" href="classmxnet_1_1Operator.html" title="Operator interface. Operator defines basic operation unit of optimized computation graph in mxnet...">Operator</a>. It also contains method to generate context(device) specific operators. <a href="classmxnet_1_1OperatorProperty.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmxnet_1_1OperatorPropertyReg.html">mxnet::OperatorPropertyReg</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registry entry for <a class="el" href="classmxnet_1_1OperatorProperty.html" title="OperatorProperty is a object that stores all information about Operator. It also contains method to g...">OperatorProperty</a> factory functions. <a href="structmxnet_1_1OperatorPropertyReg.html#details">More...</a><br /></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="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespacemxnet"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemxnet.html">mxnet</a></td></tr>
<tr class="memdesc:namespacemxnet"><td class="mdescLeft">&#160;</td><td class="mdescRight">namespace of mxnet <br /></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="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a926db042759256e94d20696c66f65709"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="include_2mxnet_2operator_8h.html#a926db042759256e94d20696c66f65709">MXNET_REGISTER_OP_PROPERTY</a>(name, OperatorPropertyType)</td></tr>
<tr class="memdesc:a926db042759256e94d20696c66f65709"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro to register OperatorProperty. <a href="#a926db042759256e94d20696c66f65709">More...</a><br /></td></tr>
<tr class="separator:a926db042759256e94d20696c66f65709"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a6f5428fbf261a94eaac079ec24413815"><td class="memItemLeft" align="right" valign="top">typedef std::function&lt; OperatorProperty *()&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemxnet.html#a6f5428fbf261a94eaac079ec24413815">mxnet::OperatorPropertyFactory</a></td></tr>
<tr class="memdesc:a6f5428fbf261a94eaac079ec24413815"><td class="mdescLeft">&#160;</td><td class="mdescRight">typedef the factory function of operator property <a href="namespacemxnet.html#a6f5428fbf261a94eaac079ec24413815">More...</a><br /></td></tr>
<tr class="separator:a6f5428fbf261a94eaac079ec24413815"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a926db042759256e94d20696c66f65709"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a926db042759256e94d20696c66f65709">&#9670;&nbsp;</a></span>MXNET_REGISTER_OP_PROPERTY</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MXNET_REGISTER_OP_PROPERTY</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">name, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">OperatorPropertyType&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><a class="code" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#af6870c3bce5b56d427a4d225b1194816">DMLC_REGISTRY_REGISTER</a>(::<a class="code" href="structmxnet_1_1OperatorPropertyReg.html">mxnet::OperatorPropertyReg</a>, OperatorPropertyReg, name) \</div><div class="line"> .set_body([]() { <span class="keywordflow">return</span> <span class="keyword">new</span> OperatorPropertyType(); }) \</div><div class="line"> .set_return_type(<span class="stringliteral">&quot;NDArray-or-Symbol&quot;</span>) \</div><div class="line"> .check_name()</div><div class="ttc" id="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h_html_af6870c3bce5b56d427a4d225b1194816"><div class="ttname"><a href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#af6870c3bce5b56d427a4d225b1194816">DMLC_REGISTRY_REGISTER</a></div><div class="ttdeci">#define DMLC_REGISTRY_REGISTER(EntryType, EntryTypeName, Name)</div><div class="ttdoc">Generic macro to register an EntryType There is a complete example in FactoryRegistryEntryBase. </div><div class="ttdef"><b>Definition:</b> registry.h:250</div></div>
<div class="ttc" id="structmxnet_1_1OperatorPropertyReg_html"><div class="ttname"><a href="structmxnet_1_1OperatorPropertyReg.html">mxnet::OperatorPropertyReg</a></div><div class="ttdoc">Registry entry for OperatorProperty factory functions. </div><div class="ttdef"><b>Definition:</b> operator.h:452</div></div>
</div><!-- fragment -->
<p>Macro to register OperatorProperty. </p>
<div class="fragment"><div class="line"><span class="comment">// example of registering a fully connected operator</span></div><div class="line">REGISTER_OP_PROPERTY(FullyConnected, FullyConnectedOpProp)</div><div class="line">.describe(<span class="stringliteral">&quot;Fully connected layer&quot;</span>);</div></div><!-- fragment -->
</div>
</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>