cutlass/docs/hgemm__multiply__add_8h_source.html

109 lines
34 KiB
HTML
Raw Normal View History

2018-05-17 02:44:56 +08:00
<!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.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Cutlass: hgemm_multiply_add.h Source File</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/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" async src="http://cdn.mathjax.org/mathjax/latest/MathJax.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">Cutlass
</div>
<div id="projectbrief">CUDA Templates for Linear Algebra Subroutines and Solvers</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</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_1417ee5ebebc309c36b7962f26a92c39.html">cutlass</a></li><li class="navelem"><a class="el" href="dir_18d6a367a3982a494d65599933fc67a3.html">gemm</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">hgemm_multiply_add.h</div> </div>
</div><!--header-->
<div class="contents">
2018-09-20 05:02:08 +08:00
<a href="hgemm__multiply__add_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/***************************************************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without modification, are permitted</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * provided that the following conditions are met:</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * * Redistributions of source code must retain the above copyright notice, this list of</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * conditions and the following disclaimer.</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * * Redistributions in binary form must reproduce the above copyright notice, this list of</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * conditions and the following disclaimer in the documentation and/or other materials</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * provided with the distribution.</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * * Neither the name of the NVIDIA CORPORATION nor the names of its contributors may be used</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * to endorse or promote products derived from this software without specific prior written</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * permission.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND ANY EXPRESS OR</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"> * STRICT LIABILITY, OR TOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span></div><div class="line"><a name=
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4_html_a48a641d601c88d95aa542b636f94d60d"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4.html#a48a641d601c88d95aa542b636f94d60d">cutlass::gemm::ThreadMultiplyAdd&lt; ThreadGemmShape_, ThreadsPerWarp_, half, half, half &gt;::ScalarC</a></div><div class="ttdeci">half ScalarC</div><div class="ttdoc">The type for C and D. </div><div class="ttdef"><b>Definition:</b> hgemm_multiply_add.h:62</div></div>
2018-05-17 02:44:56 +08:00
<div class="ttc" id="namespacecutlass_html"><div class="ttname"><a href="namespacecutlass.html">cutlass</a></div><div class="ttdef"><b>Definition:</b> convert.h:33</div></div>
2018-09-20 05:02:08 +08:00
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4_html_ae8f4db1465f5e082c6855bf13a4751c7"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4.html#ae8f4db1465f5e082c6855bf13a4751c7">cutlass::gemm::ThreadMultiplyAdd&lt; ThreadGemmShape_, ThreadsPerWarp_, half, half, half &gt;::FragmentB</a></div><div class="ttdeci">Fragment&lt; ScalarB, AccumulatorsPerThread::kH &gt; FragmentB</div><div class="ttdoc">The fragment for B. </div><div class="ttdef"><b>Definition:</b> hgemm_multiply_add.h:60</div></div>
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4_html_ac095b403212e23cb95e70cee9013099e"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4.html#ac095b403212e23cb95e70cee9013099e">cutlass::gemm::ThreadMultiplyAdd&lt; ThreadGemmShape_, ThreadsPerWarp_, half, half, half &gt;::ThreadGemmShape</a></div><div class="ttdeci">ThreadGemmShape_ ThreadGemmShape</div><div class="ttdoc">The number of accumulators per thread. </div><div class="ttdef"><b>Definition:</b> hgemm_multiply_add.h:46</div></div>
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4_html_a70dfd2f33548dbd104d798f728526fbc"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4.html#a70dfd2f33548dbd104d798f728526fbc">cutlass::gemm::ThreadMultiplyAdd&lt; ThreadGemmShape_, ThreadsPerWarp_, half, half, half &gt;::ScalarB</a></div><div class="ttdeci">half ScalarB</div><div class="ttdoc">The type for B. </div><div class="ttdef"><b>Definition:</b> hgemm_multiply_add.h:58</div></div>
2018-05-17 02:44:56 +08:00
<div class="ttc" id="structcutlass_1_1ShapeMul_html_a8875fc5e861339f981360ed774e8cc94"><div class="ttname"><a href="structcutlass_1_1ShapeMul.html#a8875fc5e861339f981360ed774e8cc94">cutlass::ShapeMul::Shape</a></div><div class="ttdeci">Shape&lt; A_::kD *B_::kD, A_::kH *B_::kH, A_::kW *B_::kW, A_::kC *B_::kC &gt; Shape</div><div class="ttdef"><b>Definition:</b> shape.h:119</div></div>
<div class="ttc" id="structcutlass_1_1Fragment_html"><div class="ttname"><a href="structcutlass_1_1Fragment.html">cutlass::Fragment</a></div><div class="ttdoc">A template defining Fragment Concept. </div><div class="ttdef"><b>Definition:</b> fragment.h:99</div></div>
<div class="ttc" id="thread__multiply__add_8h_html"><div class="ttname"><a href="thread__multiply__add_8h.html">thread_multiply_add.h</a></div><div class="ttdoc">Template implementing matrix multiply-add operations on fragments. </div></div>
2018-09-20 05:02:08 +08:00
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4_html_a245bdf059794144d04d2823d2b39588e"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4.html#a245bdf059794144d04d2823d2b39588e">cutlass::gemm::ThreadMultiplyAdd&lt; ThreadGemmShape_, ThreadsPerWarp_, half, half, half &gt;::InstructionShape</a></div><div class="ttdeci">Shape&lt; 1, 1, 2, 1 &gt; InstructionShape</div><div class="ttdoc">The shape of the instruction. </div><div class="ttdef"><b>Definition:</b> hgemm_multiply_add.h:44</div></div>
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4_html_aacb9a5a1d8f3b6e21bc449b0b97949b7"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4.html#aacb9a5a1d8f3b6e21bc449b0b97949b7">cutlass::gemm::ThreadMultiplyAdd&lt; ThreadGemmShape_, ThreadsPerWarp_, half, half, half &gt;::AccumulatorsPerWarp</a></div><div class="ttdeci">ShapeMul&lt; ThreadGemmShape, ThreadsPerWarp &gt;::Shape AccumulatorsPerWarp</div><div class="ttdoc">The number of accumulators per warp. </div><div class="ttdef"><b>Definition:</b> hgemm_multiply_add.h:52</div></div>
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4_html_a1889bdc9e88265a8afdaeeca217a3372"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4.html#a1889bdc9e88265a8afdaeeca217a3372">cutlass::gemm::ThreadMultiplyAdd&lt; ThreadGemmShape_, ThreadsPerWarp_, half, half, half &gt;::FragmentA</a></div><div class="ttdeci">Fragment&lt; ScalarA, AccumulatorsPerThread::kW &gt; FragmentA</div><div class="ttdoc">The fragment for A. </div><div class="ttdef"><b>Definition:</b> hgemm_multiply_add.h:56</div></div>
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4_html_af8124acb485709dba1c5378faa24516c"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4.html#af8124acb485709dba1c5378faa24516c">cutlass::gemm::ThreadMultiplyAdd&lt; ThreadGemmShape_, ThreadsPerWarp_, half, half, half &gt;::Accumulators</a></div><div class="ttdeci">Fragment&lt; half, AccumulatorsPerThread::kH *AccumulatorsPerThread::kW &gt; Accumulators</div><div class="ttdoc">The accumulators. </div><div class="ttdef"><b>Definition:</b> hgemm_multiply_add.h:64</div></div>
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4_html_aaf8ea4aaf393488f03ba7fb7af264940"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4.html#aaf8ea4aaf393488f03ba7fb7af264940">cutlass::gemm::ThreadMultiplyAdd&lt; ThreadGemmShape_, ThreadsPerWarp_, half, half, half &gt;::multiply_add</a></div><div class="ttdeci">CUTLASS_DEVICE void multiply_add(FragmentA const &amp;a, FragmentB const &amp;b, Accumulators const &amp;c, Accumulators &amp;d)</div><div class="ttdoc">Multiply : d = a*b + c. </div><div class="ttdef"><b>Definition:</b> hgemm_multiply_add.h:74</div></div>
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4_html_a1a8f6feed85c7e88b36bc1a2637c716f"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4.html#a1a8f6feed85c7e88b36bc1a2637c716f">cutlass::gemm::ThreadMultiplyAdd&lt; ThreadGemmShape_, ThreadsPerWarp_, half, half, half &gt;::ScalarA</a></div><div class="ttdeci">half ScalarA</div><div class="ttdoc">The type for A. </div><div class="ttdef"><b>Definition:</b> hgemm_multiply_add.h:54</div></div>
<div class="ttc" id="platform_8h_html_adde4c9ea91b753491851361a4198c009"><div class="ttname"><a href="platform_8h.html#adde4c9ea91b753491851361a4198c009">static_assert</a></div><div class="ttdeci">#define static_assert(__e, __m)</div><div class="ttdef"><b>Definition:</b> platform.h:153</div></div>
2018-05-17 02:44:56 +08:00
<div class="ttc" id="structcutlass_1_1Shape_html"><div class="ttname"><a href="structcutlass_1_1Shape.html">cutlass::Shape</a></div><div class="ttdoc">A Shape implementing Layout Concept describing the dimensions of a cube. </div><div class="ttdef"><b>Definition:</b> shape.h:64</div></div>
2018-09-20 05:02:08 +08:00
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_html"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd.html">cutlass::gemm::ThreadMultiplyAdd</a></div><div class="ttdoc">Template performing matrix multiply-add operation within a thread. </div><div class="ttdef"><b>Definition:</b> thread_multiply_add.h:44</div></div>
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4_html_a24dd9fdc54b001840e8b82664b3bfe3a"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4.html#a24dd9fdc54b001840e8b82664b3bfe3a">cutlass::gemm::ThreadMultiplyAdd&lt; ThreadGemmShape_, ThreadsPerWarp_, half, half, half &gt;::AccumulatorsPerThread</a></div><div class="ttdeci">ThreadGemmShape AccumulatorsPerThread</div><div class="ttdoc">Aliased for compatibility. Will be removed for CUTLASS v2.0. </div><div class="ttdef"><b>Definition:</b> hgemm_multiply_add.h:48</div></div>
<div class="ttc" id="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4_html_a61ed3d8bb4ca6db39d16b632f58d75dc"><div class="ttname"><a href="structcutlass_1_1gemm_1_1ThreadMultiplyAdd_3_01ThreadGemmShape___00_01ThreadsPerWarp___00_01half_00_01half_00_01half_01_4.html#a61ed3d8bb4ca6db39d16b632f58d75dc">cutlass::gemm::ThreadMultiplyAdd&lt; ThreadGemmShape_, ThreadsPerWarp_, half, half, half &gt;::ThreadsPerWarp</a></div><div class="ttdeci">ThreadsPerWarp_ ThreadsPerWarp</div><div class="ttdoc">The number of threads per warp. </div><div class="ttdef"><b>Definition:</b> hgemm_multiply_add.h:50</div></div>
2018-05-17 02:44:56 +08:00
<div class="ttc" id="fragment_8h_html"><div class="ttname"><a href="fragment_8h.html">fragment.h</a></div><div class="ttdoc">Defines Fragment, a statically-sized array for storing parts of matrices within a thread&amp;#39;s registers...</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
2018-10-27 05:54:58 +08:00
Generated on Fri Oct 26 2018 14:53:33 for Cutlass by &#160;<a href="http://www.doxygen.org/index.html">
2018-05-17 02:44:56 +08:00
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>