blob: 72ad74406731d4cc94adb0d63fd8d11211060ed4 [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.11"/>
<title>mxnet: Attributes</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>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</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.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="header">
<div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Attributes<div class="ingroups"><a class="el" href="group__c__api.html">C API</a> &raquo; <a class="el" href="group__c__api__primitive.html">Primitive operations</a></div></div> </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Collaboration diagram for Attributes:</div>
<div class="dyncontent">
<center><table><tr><td><img src="group__c__api__attributes.png" border="0" alt="" usemap="#group____c____api____attributes"/>
<map name="group____c____api____attributes" id="group____c____api____attributes">
<area shape="rect" id="node1" href="group__c__api__attributes__post__ops.html" title="Sequence of post operations" alt="" coords="336,5,543,32"/>
<area shape="rect" id="node2" href="group__c__api__primitive.html" title="Primitive operations" alt="" coords="5,5,155,32"/>
</map>
</td></tr></table></center>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__c__api__attributes__post__ops"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__c__api__attributes__post__ops.html">Sequence of post operations</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:gaa5402b9efc0a7fd3360610382f85e6de"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__c__api__attributes.html#gaa5402b9efc0a7fd3360610382f85e6de">mkldnn_primitive_attr_create</a> (<a class="el" href="group__c__api__primitive__attr.html#gaeaf9bd515118e1667f7fd1846bb79de1">mkldnn_primitive_attr_t</a> *attr)</td></tr>
<tr class="separator:gaa5402b9efc0a7fd3360610382f85e6de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae07196198f1d52306bd467aee1183f4c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__c__api__attributes.html#gae07196198f1d52306bd467aee1183f4c">mkldnn_primitive_attr_clone</a> (<a class="el" href="group__c__api__primitive__attr.html#gaeaf9bd515118e1667f7fd1846bb79de1">mkldnn_primitive_attr_t</a> *attr, <a class="el" href="group__c__api__primitive__attr.html#ga3f3780c1e4efc952e6639a2f083a8b85">const_mkldnn_primitive_attr_t</a> existing_attr)</td></tr>
<tr class="memdesc:gae07196198f1d52306bd467aee1183f4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Makes a copy of an <code>existing_attr</code>. <a href="#gae07196198f1d52306bd467aee1183f4c">More...</a><br /></td></tr>
<tr class="separator:gae07196198f1d52306bd467aee1183f4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8ba73185f89f106b8f66258b6a0972f9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__c__api__attributes.html#ga8ba73185f89f106b8f66258b6a0972f9">mkldnn_primitive_attr_destroy</a> (<a class="el" href="group__c__api__primitive__attr.html#gaeaf9bd515118e1667f7fd1846bb79de1">mkldnn_primitive_attr_t</a> attr)</td></tr>
<tr class="memdesc:ga8ba73185f89f106b8f66258b6a0972f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes an <code>attr</code>. <a href="#ga8ba73185f89f106b8f66258b6a0972f9">More...</a><br /></td></tr>
<tr class="separator:ga8ba73185f89f106b8f66258b6a0972f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4c9e4d9a190f63cc9d4c03eaf61615c9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__c__api__attributes.html#ga4c9e4d9a190f63cc9d4c03eaf61615c9">mkldnn_primitive_attr_get_scratchpad_mode</a> (<a class="el" href="group__c__api__primitive__attr.html#ga3f3780c1e4efc952e6639a2f083a8b85">const_mkldnn_primitive_attr_t</a> attr, <a class="el" href="group__c__api__primitive__attr.html#ga5a6c410554b43bd182668b235769d1bf">mkldnn_scratchpad_mode_t</a> *mode)</td></tr>
<tr class="memdesc:ga4c9e4d9a190f63cc9d4c03eaf61615c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the scratchpad <code>mode</code> set in the attribute <code>attr</code>. <a href="#ga4c9e4d9a190f63cc9d4c03eaf61615c9">More...</a><br /></td></tr>
<tr class="separator:ga4c9e4d9a190f63cc9d4c03eaf61615c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac820b1cc4122a78696f4e015972eaaba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__c__api__attributes.html#gac820b1cc4122a78696f4e015972eaaba">mkldnn_primitive_attr_set_scratchpad_mode</a> (<a class="el" href="group__c__api__primitive__attr.html#gaeaf9bd515118e1667f7fd1846bb79de1">mkldnn_primitive_attr_t</a> attr, <a class="el" href="group__c__api__primitive__attr.html#ga5a6c410554b43bd182668b235769d1bf">mkldnn_scratchpad_mode_t</a> mode)</td></tr>
<tr class="separator:gac820b1cc4122a78696f4e015972eaaba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae6fff60e4ce342641c5487b514a9d5ce"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__c__api__attributes.html#gae6fff60e4ce342641c5487b514a9d5ce">mkldnn_primitive_attr_get_output_scales</a> (<a class="el" href="group__c__api__primitive__attr.html#ga3f3780c1e4efc952e6639a2f083a8b85">const_mkldnn_primitive_attr_t</a> attr, <a class="el" href="group__c__api__types__memory.html#ga15898db3725cddbf807b85ef351ca81f">mkldnn_dim_t</a> *count, int *mask, const float **scales)</td></tr>
<tr class="separator:gae6fff60e4ce342641c5487b514a9d5ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga415451b28b726c0641c3d32b98815fc2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__c__api__attributes.html#ga415451b28b726c0641c3d32b98815fc2">mkldnn_primitive_attr_set_output_scales</a> (<a class="el" href="group__c__api__primitive__attr.html#gaeaf9bd515118e1667f7fd1846bb79de1">mkldnn_primitive_attr_t</a> attr, <a class="el" href="group__c__api__types__memory.html#ga15898db3725cddbf807b85ef351ca81f">mkldnn_dim_t</a> count, int mask, const float *scales)</td></tr>
<tr class="separator:ga415451b28b726c0641c3d32b98815fc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga92b080aec64fb1860b280a369fc0ce1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__c__api__attributes.html#ga92b080aec64fb1860b280a369fc0ce1c">mkldnn_primitive_attr_get_post_ops</a> (<a class="el" href="group__c__api__primitive__attr.html#ga3f3780c1e4efc952e6639a2f083a8b85">const_mkldnn_primitive_attr_t</a> attr, <a class="el" href="group__c__api__primitive__attr.html#ga9b9ffe469ad6e2c68a490c61af3bf882">const_mkldnn_post_ops_t</a> *post_ops)</td></tr>
<tr class="separator:ga92b080aec64fb1860b280a369fc0ce1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga815370a5c591cfb02f66d9c276aca943"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__c__api__attributes.html#ga815370a5c591cfb02f66d9c276aca943">mkldnn_primitive_attr_set_post_ops</a> (<a class="el" href="group__c__api__primitive__attr.html#gaeaf9bd515118e1667f7fd1846bb79de1">mkldnn_primitive_attr_t</a> attr, <a class="el" href="group__c__api__primitive__attr.html#ga9b9ffe469ad6e2c68a490c61af3bf882">const_mkldnn_post_ops_t</a> post_ops)</td></tr>
<tr class="separator:ga815370a5c591cfb02f66d9c276aca943"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>An extension for controlling primitive behavior. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gae07196198f1d52306bd467aee1183f4c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API mkldnn_primitive_attr_clone </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#gaeaf9bd515118e1667f7fd1846bb79de1">mkldnn_primitive_attr_t</a> *&#160;</td>
<td class="paramname"><em>attr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#ga3f3780c1e4efc952e6639a2f083a8b85">const_mkldnn_primitive_attr_t</a>&#160;</td>
<td class="paramname"><em>existing_attr</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Makes a copy of an <code>existing_attr</code>. </p>
</div>
</div>
<a class="anchor" id="gaa5402b9efc0a7fd3360610382f85e6de"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API mkldnn_primitive_attr_create </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#gaeaf9bd515118e1667f7fd1846bb79de1">mkldnn_primitive_attr_t</a> *&#160;</td>
<td class="paramname"><em>attr</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates an empty (default) <code>attr</code> attribute. All the parameters are set to default values.</p>
<p>An empty attribute is used in primitive descriptor creation whenever it is not passed explicitly, e.g. in mkldnn_primitive_desc_create. </p>
</div>
</div>
<a class="anchor" id="ga8ba73185f89f106b8f66258b6a0972f9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API mkldnn_primitive_attr_destroy </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#gaeaf9bd515118e1667f7fd1846bb79de1">mkldnn_primitive_attr_t</a>&#160;</td>
<td class="paramname"><em>attr</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deletes an <code>attr</code>. </p>
</div>
</div>
<a class="anchor" id="gae6fff60e4ce342641c5487b514a9d5ce"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API mkldnn_primitive_attr_get_output_scales </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#ga3f3780c1e4efc952e6639a2f083a8b85">const_mkldnn_primitive_attr_t</a>&#160;</td>
<td class="paramname"><em>attr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__c__api__types__memory.html#ga15898db3725cddbf807b85ef351ca81f">mkldnn_dim_t</a> *&#160;</td>
<td class="paramname"><em>count</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>mask</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float **&#160;</td>
<td class="paramname"><em>scales</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns <code>count</code>, correspondence scale <code>mask</code>, and a pointer to a constant floating point array of output <code>scales</code> for given <code>attr</code>, previously set by mkldnn_primitive_attr_set_output_scales.</p>
<dl class="section warning"><dt>Warning</dt><dd>The <code>scales</code> array points to the internal <code>attr</code> field, so the user should not modify or destroy <code>scales</code>.</dd>
<dd>
The lifetime of <code>scales</code> is the same as that of the <code>attr</code> to which it belongs, so it is illegal to use <code>scales</code> after <code>attr</code> is destroyed. </dd></dl>
</div>
</div>
<a class="anchor" id="ga92b080aec64fb1860b280a369fc0ce1c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API mkldnn_primitive_attr_get_post_ops </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#ga3f3780c1e4efc952e6639a2f083a8b85">const_mkldnn_primitive_attr_t</a>&#160;</td>
<td class="paramname"><em>attr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#ga9b9ffe469ad6e2c68a490c61af3bf882">const_mkldnn_post_ops_t</a> *&#160;</td>
<td class="paramname"><em>post_ops</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns <code>post_ops</code> for given <code>attr</code>.</p>
<dl class="section warning"><dt>Warning</dt><dd><code>post_ops</code> points to the internal <code>attr</code> field, so the user should not modify or destroy <code>post_ops</code>. Also, the lifetime of <code>post_ops</code> is the same as that of the <code>attr</code> it belongs to, so it is illegal to use <code>post_ops</code> after <code>attr</code> has been destroyed. </dd></dl>
</div>
</div>
<a class="anchor" id="ga4c9e4d9a190f63cc9d4c03eaf61615c9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API mkldnn_primitive_attr_get_scratchpad_mode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#ga3f3780c1e4efc952e6639a2f083a8b85">const_mkldnn_primitive_attr_t</a>&#160;</td>
<td class="paramname"><em>attr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#ga5a6c410554b43bd182668b235769d1bf">mkldnn_scratchpad_mode_t</a> *&#160;</td>
<td class="paramname"><em>mode</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the scratchpad <code>mode</code> set in the attribute <code>attr</code>. </p>
</div>
</div>
<a class="anchor" id="ga415451b28b726c0641c3d32b98815fc2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API mkldnn_primitive_attr_set_output_scales </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#gaeaf9bd515118e1667f7fd1846bb79de1">mkldnn_primitive_attr_t</a>&#160;</td>
<td class="paramname"><em>attr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__c__api__types__memory.html#ga15898db3725cddbf807b85ef351ca81f">mkldnn_dim_t</a>&#160;</td>
<td class="paramname"><em>count</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>mask</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float *&#160;</td>
<td class="paramname"><em>scales</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets output <code>scales</code> for primitive operations. The number of elements <code>count</code> and correspondence scale <code>mask</code> are stored for future use.</p>
<p>The <code>mask</code> argument defines the correspondence between the output tensor dimensions and the <code>scales</code> array. Set the i-th bit of <code>mask</code> to 1 to use a dedicated scaling factor for each slice of the output tensor over the i-th dimension. Set <code>mask</code> to 0 to use a common scaling factor for the whole output tensor.</p>
<dl class="section note"><dt>Note</dt><dd>The dimension order is always native and does not depend on the actual layout used. Examples:<ul>
<li>2D dimensional data the order of dimensions is always: (n, c)</li>
<li>4D dimensional data the order is always: (n, c, h, w)</li>
<li>5D dimensional weights the order is always: (g, oc, ic, kh, kw)</li>
</ul>
</dd></dl>
<p>Example usage: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;int mb = 32, oc = 32, oh = 14, ow = 14; // convolution output params</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;float scales[oc] = { ... }; // unique output scales per output channel</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;int oc_dim = 1; // mb_dim = 0, channel_dim = 1, height_dim = 2, ...</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;mkldnn_convolution_desc_t cd; // create &amp; configure convolution op_desc</div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;mkldnn_primitive_attr_t attr;</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;mkldnn_primitive_attr_create(&amp;attr); // create default attributes</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;mkldnn_primitive_attr_set_output_scales(attr, oc, 1 &lt;&lt; oc_dim, scales);</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;mkldnn_primitive_desc_t cpd;</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;mkldnn_primitive_desc_create(&amp;cpd, &amp;cd, attr, NULL);</div></div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>There is no way to check that <code>count</code> corresponds to <code>mask</code> until an actual primitive descriptor is created, so it is the user's responsibility to set proper values. The following formula must hold:</dd></dl>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[count = \prod\limits_{d \in mask} output.dims[d]\]" src="form_0.png"/>
</p>
</div>
</div>
<a class="anchor" id="ga815370a5c591cfb02f66d9c276aca943"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API mkldnn_primitive_attr_set_post_ops </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#gaeaf9bd515118e1667f7fd1846bb79de1">mkldnn_primitive_attr_t</a>&#160;</td>
<td class="paramname"><em>attr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#ga9b9ffe469ad6e2c68a490c61af3bf882">const_mkldnn_post_ops_t</a>&#160;</td>
<td class="paramname"><em>post_ops</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets configured <code>post_ops</code> to an attribute <code>attr</code> for future use (when primitive descriptor is being created).</p>
<dl class="section note"><dt>Note</dt><dd>At this point in time, there is no way to check whether the primitive descriptor does or does not support a given sequence of post operations. Therefore the user should handle an error that might occur at the mkldnn_primitive_desc_create call. </dd></dl>
</div>
</div>
<a class="anchor" id="gac820b1cc4122a78696f4e015972eaaba"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__c__api__types__generic.html#ga31866789b66acfb1c28b2f9bdd7bdfdd">mkldnn_status_t</a> MKLDNN_API mkldnn_primitive_attr_set_scratchpad_mode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#gaeaf9bd515118e1667f7fd1846bb79de1">mkldnn_primitive_attr_t</a>&#160;</td>
<td class="paramname"><em>attr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__c__api__primitive__attr.html#ga5a6c410554b43bd182668b235769d1bf">mkldnn_scratchpad_mode_t</a>&#160;</td>
<td class="paramname"><em>mode</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets scratchpad <code>mode</code>.</p>
<p>The possible values are: <a class="el" href="group__c__api__primitive__attr.html#gga5a6c410554b43bd182668b235769d1bfa3cc865415485dc1be2e45edd21426aab" title="The library manages scratchpad (default) ">mkldnn_scratchpad_mode_library</a> (default) and <a class="el" href="group__c__api__primitive__attr.html#gga5a6c410554b43bd182668b235769d1bfa8b4d483d4a290b397c90a70a80796865" title="A user shall query and provide the scratchpad memory to primitives. ">mkldnn_scratchpad_mode_user</a>. </p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Mar 28 2020 00:52:31 for mxnet by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>