blob: ccd4430357f50f27f1d4dc8e5c8d10cbe6733eef [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/c_api_test.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="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">c_api_test.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>C API of mxnet for ease of testing backend in Python.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="include_2mxnet_2c__api_8h_source.html">mxnet/c_api.h</a>&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for c_api_test.h:</div>
<div class="dyncontent">
<div class="center"><img src="c__api__test_8h__incl.png" border="0" usemap="#_2work_2mxnet_2include_2mxnet_2c__api__test_8h" alt=""/></div>
<map name="_2work_2mxnet_2include_2mxnet_2c__api__test_8h" id="_2work_2mxnet_2include_2mxnet_2c__api__test_8h">
<area shape="rect" id="node2" href="include_2mxnet_2c__api_8h.html" title="mxnet/c_api.h" alt="" coords="81,95,195,121"/>
</map>
</div>
</div>
<p><a href="c__api__test_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="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6bc6a3c7b5a7dea6acd93a98d3d293d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__api__test_8h.html#a6bc6a3c7b5a7dea6acd93a98d3d293d2">MXBuildSubgraphByOpNames</a> (<a class="el" href="include_2mxnet_2c__api_8h.html#a301e9a7722b326126defdd39ccd99b37">SymbolHandle</a> sym_handle, const char *prop_name, const uint32_t num_ops, const char **op_names, <a class="el" href="include_2mxnet_2c__api_8h.html#a301e9a7722b326126defdd39ccd99b37">SymbolHandle</a> *ret_sym_handle)</td></tr>
<tr class="memdesc:a6bc6a3c7b5a7dea6acd93a98d3d293d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inhibit C++ name-mangling for MXNet functions. <a href="#a6bc6a3c7b5a7dea6acd93a98d3d293d2">More...</a><br /></td></tr>
<tr class="separator:a6bc6a3c7b5a7dea6acd93a98d3d293d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46bef4e497c000f66704316b6a01eeba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__api__test_8h.html#a46bef4e497c000f66704316b6a01eeba">MXSetSubgraphPropertyOpNames</a> (const char *prop_name, const uint32_t num_ops, const char **op_names)</td></tr>
<tr class="memdesc:a46bef4e497c000f66704316b6a01eeba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a subgraph property name, use the provided op names as the op_names attribute for that subgraph property, instead of the predefined one. This is only for the purpose of testing. <a href="#a46bef4e497c000f66704316b6a01eeba">More...</a><br /></td></tr>
<tr class="separator:a46bef4e497c000f66704316b6a01eeba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d4fb64e7ea28aebf00dce4853e638e2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__api__test_8h.html#a4d4fb64e7ea28aebf00dce4853e638e2">MXSetSubgraphPropertyOpNamesV2</a> (const char *prop_name, const uint32_t num_ops, const char **op_names)</td></tr>
<tr class="memdesc:a4d4fb64e7ea28aebf00dce4853e638e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a subgraph property name, use the provided op names as the op_names attribute for that subgraph property, instead of the predefined one. This is only for the purpose of testing. Compared to <a class="el" href="c__api__test_8h.html#a46bef4e497c000f66704316b6a01eeba" title="Given a subgraph property name, use the provided op names as the op_names attribute for that subgraph...">MXSetSubgraphPropertyOpNames()</a>, this API will add op_names to the backend property. <a href="#a4d4fb64e7ea28aebf00dce4853e638e2">More...</a><br /></td></tr>
<tr class="separator:a4d4fb64e7ea28aebf00dce4853e638e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89b596297dc67b1a922afdac0aa48f35"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__api__test_8h.html#a89b596297dc67b1a922afdac0aa48f35">MXRemoveSubgraphPropertyOpNames</a> (const char *prop_name)</td></tr>
<tr class="memdesc:a89b596297dc67b1a922afdac0aa48f35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a subgraph property name, delete the op name set in the SubgraphPropertyOpNameSet. <a href="#a89b596297dc67b1a922afdac0aa48f35">More...</a><br /></td></tr>
<tr class="separator:a89b596297dc67b1a922afdac0aa48f35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a821637da6f223d99f7cac2daf85d1d33"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__api__test_8h.html#a821637da6f223d99f7cac2daf85d1d33">MXRemoveSubgraphPropertyOpNamesV2</a> (const char *prop_name)</td></tr>
<tr class="memdesc:a821637da6f223d99f7cac2daf85d1d33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a subgraph property name, remove op_names attribute of the in the SubgraphBackend property. <a href="#a821637da6f223d99f7cac2daf85d1d33">More...</a><br /></td></tr>
<tr class="separator:a821637da6f223d99f7cac2daf85d1d33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a692d1c71002b3b5f4ca010de0b94ddf2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__api__test_8h.html#a692d1c71002b3b5f4ca010de0b94ddf2">MXGetEnv</a> (const char *name, const char **value)</td></tr>
<tr class="memdesc:a692d1c71002b3b5f4ca010de0b94ddf2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value of an environment variable as seen by the backend. <a href="#a692d1c71002b3b5f4ca010de0b94ddf2">More...</a><br /></td></tr>
<tr class="separator:a692d1c71002b3b5f4ca010de0b94ddf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a915070155212e60ce9f00ef896463c0d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="c__api__test_8h.html#a915070155212e60ce9f00ef896463c0d">MXSetEnv</a> (const char *name, const char *value)</td></tr>
<tr class="memdesc:a915070155212e60ce9f00ef896463c0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the value of an environment variable from the backend. <a href="#a915070155212e60ce9f00ef896463c0d">More...</a><br /></td></tr>
<tr class="separator:a915070155212e60ce9f00ef896463c0d"><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>C API of mxnet for ease of testing backend in Python. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a6bc6a3c7b5a7dea6acd93a98d3d293d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bc6a3c7b5a7dea6acd93a98d3d293d2">&#9670;&nbsp;</a></span>MXBuildSubgraphByOpNames()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXBuildSubgraphByOpNames </td>
<td>(</td>
<td class="paramtype"><a class="el" href="include_2mxnet_2c__api_8h.html#a301e9a7722b326126defdd39ccd99b37">SymbolHandle</a>&#160;</td>
<td class="paramname"><em>sym_handle</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>prop_name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint32_t&#160;</td>
<td class="paramname"><em>num_ops</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char **&#160;</td>
<td class="paramname"><em>op_names</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="include_2mxnet_2c__api_8h.html#a301e9a7722b326126defdd39ccd99b37">SymbolHandle</a> *&#160;</td>
<td class="paramname"><em>ret_sym_handle</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Inhibit C++ name-mangling for MXNet functions. </p>
<p>This API partitions a graph only by the operator names provided by users. This will attach a DefaultSubgraphProperty to the input graph for partitioning. This function should be used only for the testing purpose. </p>
</div>
</div>
<a id="a692d1c71002b3b5f4ca010de0b94ddf2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a692d1c71002b3b5f4ca010de0b94ddf2">&#9670;&nbsp;</a></span>MXGetEnv()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXGetEnv </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char **&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the value of an environment variable as seen by the backend. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>The name of the environment variable </td></tr>
<tr><td class="paramname">value</td><td>The returned value of the environment variable </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a89b596297dc67b1a922afdac0aa48f35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89b596297dc67b1a922afdac0aa48f35">&#9670;&nbsp;</a></span>MXRemoveSubgraphPropertyOpNames()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXRemoveSubgraphPropertyOpNames </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>prop_name</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Given a subgraph property name, delete the op name set in the SubgraphPropertyOpNameSet. </p>
</div>
</div>
<a id="a821637da6f223d99f7cac2daf85d1d33"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a821637da6f223d99f7cac2daf85d1d33">&#9670;&nbsp;</a></span>MXRemoveSubgraphPropertyOpNamesV2()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXRemoveSubgraphPropertyOpNamesV2 </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>prop_name</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Given a subgraph property name, remove op_names attribute of the in the SubgraphBackend property. </p>
</div>
</div>
<a id="a915070155212e60ce9f00ef896463c0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a915070155212e60ce9f00ef896463c0d">&#9670;&nbsp;</a></span>MXSetEnv()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXSetEnv </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the value of an environment variable from the backend. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>The name of the environment variable </td></tr>
<tr><td class="paramname">value</td><td>The desired value to set the environment variable <code>name</code> </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a46bef4e497c000f66704316b6a01eeba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46bef4e497c000f66704316b6a01eeba">&#9670;&nbsp;</a></span>MXSetSubgraphPropertyOpNames()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXSetSubgraphPropertyOpNames </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>prop_name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint32_t&#160;</td>
<td class="paramname"><em>num_ops</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char **&#160;</td>
<td class="paramname"><em>op_names</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Given a subgraph property name, use the provided op names as the op_names attribute for that subgraph property, instead of the predefined one. This is only for the purpose of testing. </p>
</div>
</div>
<a id="a4d4fb64e7ea28aebf00dce4853e638e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d4fb64e7ea28aebf00dce4853e638e2">&#9670;&nbsp;</a></span>MXSetSubgraphPropertyOpNamesV2()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="c__predict__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> int MXSetSubgraphPropertyOpNamesV2 </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>prop_name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint32_t&#160;</td>
<td class="paramname"><em>num_ops</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char **&#160;</td>
<td class="paramname"><em>op_names</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Given a subgraph property name, use the provided op names as the op_names attribute for that subgraph property, instead of the predefined one. This is only for the purpose of testing. Compared to <a class="el" href="c__api__test_8h.html#a46bef4e497c000f66704316b6a01eeba" title="Given a subgraph property name, use the provided op names as the op_names attribute for that subgraph...">MXSetSubgraphPropertyOpNames()</a>, this API will add op_names to the backend property. </p>
</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>