|
| 1 | +<div class="mdl-grid" style="padding-top: 0px"> |
| 2 | + <div class="mdl-cell mdl-cell--12-col"> |
| 3 | + <p style="line-height: 100%">This is an prototype implementation of the sparse tensor algebra compiler theory and contains known bugs, which are documented <a href="https://github.com/tensor-compiler/taco/issues">here</a>. If you find additional issues, please consider submitting a bug report.</p> |
| 4 | + <h6 style="margin-bottom: 0px; margin-top: 18px">Input a tensor algebra expression in index notation to generate code that computes it:</h6> |
| 5 | + <div class="input-bar"> |
| 6 | + <div class="mdl-textfield expr-input"> |
| 7 | + <input id="txtExpr" class="input" value="y(i) = A(i,j) * x(j)" style="font-family: monospace" spellcheck="false" autocomplete="off" autocorrect="false" autocapitalize="false"> |
| 8 | + <span id="lblError" class="mdl-textfield__error" style="font-size: 14px"></span> |
| 9 | + <label class="mdl-textfield__label"></label> |
| 10 | + </div> |
| 11 | + <div class="input-bar-misc"> |
| 12 | + <div style="float: left"> |
| 13 | + <button id="btnExamples" class="mdl-button mdl-js-button mdl-button--icon"> |
| 14 | + <i class="material-icons">more_vert</i> |
| 15 | + </button> |
| 16 | + <ul id="listExamples" class="mdl-menu mdl-menu--bottom-left mdl-js-menu mdl-js-ripple-effect" style="margin-top: 0em; margin-left: 0em" for="btnExamples"></ul> |
| 17 | + </div> |
| 18 | + <div class="mdl-textfield prefix-input"> |
| 19 | + <input id="prefix" class="input" placeholder="Prefix (Optional)" style="font-family: monospace" spellcheck="false" autocomplete="off" autocorrect="false" autocapitalize="false"> |
| 20 | + </div> |
| 21 | + <button id="btnGetKernel" class="button is-primary demo-btn">Generate Kernel</button> |
| 22 | + </div> |
| 23 | + </div> |
| 24 | + </div> |
| 25 | +</div> |
| 26 | + |
| 27 | +<div id="tblFormats" class="mdl-grid" style="padding-top: 0px; padding-bottom: 0px"> |
| 28 | + <div class="mdl-cell mdl-cell--12-col" style="margin-top: 2px"> |
| 29 | + <table class="mdl-data-table mdl-js-data-table" style="width: 100%; margin-bottom: 8px"> |
| 30 | + <thead> |
| 31 | + <tr> |
| 32 | + <th class="mdl-data-table__cell--non-numeric" style="min-width: 70px; vertical-align: middle; padding-left: 9px"> |
| 33 | + <div align="center" style="position:relative"><big>Tensor</big></div></th> |
| 34 | + <th class="mdl-data-table__cell--non-numeric" style="width: 100%; padding-left: 0px; vertical-align: middle; text-align: left"> |
| 35 | + <big id="formatHeading"> |
| 36 | + Format |
| 37 | + </big> |
| 38 | + <big class="optional-header" style="padding-left: 96px"> |
| 39 | + (Level Formats) |
| 40 | + </big> |
| 41 | + <big> |
| 42 | + <button class="help-btn js-modal-trigger mdl-button mdl-js-button mdl-button--icon" data-target="modal-level-formats"><i class="material-icons" style="font-size:20px">help_outline</i> |
| 43 | + </button> |
| 44 | + <div id="modal-level-formats" class="modal"> |
| 45 | + <div class="modal-background"></div> |
| 46 | + |
| 47 | + <div class="modal-content"> |
| 48 | + <div class="box"> |
| 49 | + <p> |
| 50 | + TACO represents tensor formats as compositions of the |
| 51 | + following per-dimension level formats: |
| 52 | + </p> |
| 53 | + <p> |
| 54 | + <strong>Dense</strong> levels store the size of the dimension |
| 55 | + $(N)$ and encode the coordinates in the interval $[0, N)$. |
| 56 | + <img src="images/dense-arrays.jpg" class="centered-img" style="height: 29px; padding-top:10px"> |
| 57 | + </p> |
| 58 | + <p> |
| 59 | + <strong>Compressed</strong> levels store coordinates in a |
| 60 | + segment of the $\texttt{crd}$ array, with segment bounds |
| 61 | + stored in the $\texttt{pos}$ array. |
| 62 | + <img src="images/compressed-arrays.jpg" class="centered-img" style="height: 50px; padding-top:10px"> |
| 63 | + </p> |
| 64 | + <p> |
| 65 | + <strong>Singleton</strong> levels store individual |
| 66 | + coordinates in the $\texttt{crd}$ array. |
| 67 | + <img src="images/singleton-arrays.jpg" class="centered-img" style="height: 30px; padding-top:10px"> |
| 68 | + </p> |
| 69 | + <p> |
| 70 | + Some level formats also come in different variants that |
| 71 | + either can only store unique elements (U) or may store |
| 72 | + duplicate elements (¬U). More details can be found |
| 73 | + <a href="files/chou-oopsla18-taco-formats.pdf">here</a>. |
| 74 | + </p> |
| 75 | + <p> |
| 76 | + TACO also supports non-row major tensor formats such as CSC. |
| 77 | + You can define non-row major tensor formats in the web tool by |
| 78 | + <strong>dragging the drop-down menus to reorder dimensions</strong>. |
| 79 | + </p> |
| 80 | + </div> |
| 81 | + </div> |
| 82 | + |
| 83 | + <button class="modal-close is-large" aria-label="close"></button> |
| 84 | + </div> |
| 85 | + </big> |
| 86 | + </th> |
| 87 | + </tr> |
| 88 | + </thead> |
| 89 | + <tbody id="listTensors"> |
| 90 | + </tbody> |
| 91 | + </table> |
| 92 | + </div> |
| 93 | +</div> |
| 94 | + |
| 95 | +<div class="mdl-grid" style="padding-top: 8px; padding-bottom: 0px"> |
| 96 | + <div class="mdl-cell mdl-cell--12-col"> |
| 97 | + <div align="right" style="padding-right: 0px"> |
| 98 | + <button id="btnCPU" class="button is-primary sample-button"> |
| 99 | + Sample CPU Schedule |
| 100 | + </button> |
| 101 | + <button id="btnGPU" class="button is-primary sample-button"> |
| 102 | + Sample GPU Schedule |
| 103 | + </button> |
| 104 | + </div> |
| 105 | + <table class="mdl-data-table mdl-js-data-table" style="width: 100%; margin-bottom: 8px"> |
| 106 | + <thead> |
| 107 | + <tr> |
| 108 | + <th class="mdl-data-table__cell--non-numeric"></th> |
| 109 | + <th class="mdl-data-table__cell--non-numeric" style="padding-left: 0px; padding-right: 8px; vertical-align: middle; text-align: left"> |
| 110 | + <big style="padding-left: 10px"> |
| 111 | + Scheduling Command |
| 112 | + </big> |
| 113 | + <big> |
| 114 | + <button class="help-btn mdl-button mdl-js-button mdl-button--icon"> |
| 115 | + <a target="_blank" rel="noopener noreferrer" href="http://tensor-compiler.org/docs/scheduling/index.html"> |
| 116 | + <i class="material-icons" style="font-size: 20px; color: black">help_outline</i> |
| 117 | + </a> |
| 118 | + </button> |
| 119 | + </big> |
| 120 | + <big class="optional-header" style="padding-left: 34px"> |
| 121 | + Arguments |
| 122 | + </big> |
| 123 | + </th> |
| 124 | + </tr> |
| 125 | + </thead> |
| 126 | + <tbody id="tblSchedule"> |
| 127 | + </tbody> |
| 128 | + </table> |
| 129 | + </div> |
| 130 | +</div> |
| 131 | + |
| 132 | +<div class="mdl-grid" style="padding-top: 6px"> |
| 133 | + <div class="mdl-cell mdl-cell--12-col output-panel"> |
| 134 | + <div id="panelKernels" class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect"> |
| 135 | + <table style="width: 100%; margin-bottom: 0px"> |
| 136 | + <tr> |
| 137 | + <td style="padding: 0px; padding-bottom: 8px"> |
| 138 | + <div class="mdl-tabs__tab-bar" style="justify-content: flex-start"> |
| 139 | + <a style="padding-left: 12px; padding-right: 12px" href="#compute-panel" class="mdl-tabs__tab is-active">Compute Code</a> |
| 140 | + <a style="padding-left: 12px; padding-right: 12px" href="#assembly-panel" class="mdl-tabs__tab">Assemble Code</a> |
| 141 | + <a style="padding-left: 12px; padding-right: 12px" href="#full-panel" class="mdl-tabs__tab">Full Code</a> |
| 142 | + </div> |
| 143 | + </td> |
| 144 | + <td id="cellBtnDownload" align="right"> |
| 145 | + <button id="btnDownload" class="button is-primary" style="width: 100%">Download</button> |
| 146 | + </td> |
| 147 | + </tr> |
| 148 | + </table> |
| 149 | + <div class="mdl-tabs__panel is-active" id="compute-panel"> |
| 150 | + <pre style="margin: 0px 0px; padding: 0px 0px"><code id="txtComputeLoops" class="lang-cpp">/* The generated compute code will appear here */</code></pre> |
| 151 | + </div> |
| 152 | + <div class="mdl-tabs__panel" id="assembly-panel"> |
| 153 | + <pre style="margin: 0px 0px; padding: 0px 0px"><code id="txtAssemblyLoops" class="lang-cpp">/* The generated assemble code will appear here */</code></pre> |
| 154 | + </div> |
| 155 | + <div class="mdl-tabs__panel" id="full-panel"> |
| 156 | + <pre style="margin: 0px 0px; padding: 0px 0px"><code id="txtFullCode" class="lang-cpp">/* The complete generated code will appear here */</code></pre> |
| 157 | + </div> |
| 158 | + </div> |
| 159 | + <br> |
| 160 | + <p style="line-height: 100%">The generated code is provided "as is" without warranty of any kind. To help us improve TACO, we keep an anonymized record of all requests submitted to the TACO online server.</p> |
| 161 | + </div> |
| 162 | +</div> |
| 163 | + |
| 164 | +<script>demo()</script> |
0 commit comments