Skip to content

Commit 09c8119

Browse files
committed
Updated SDH docs
1 parent 9f7684d commit 09c8119

File tree

287 files changed

+46113
-610
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+46113
-610
lines changed

sdh-docs/benchmarking/index.html

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666

6767
<a class="" href="../pycomputations/index.html">Computing on Tensors</a>
6868
</li>
69+
<li class="">
70+
71+
<a class="" href="../pyreference/index.html">Reference Manual</a>
72+
</li>
6973
</ul>
7074
</li>
7175

@@ -98,21 +102,6 @@
98102
<a class="current" href="index.html">Guide to Benchmarking</a>
99103
<ul class="subnav">
100104

101-
</ul>
102-
</li>
103-
104-
<li class="toctree-l1">
105-
106-
<span class="caption-text">C++ Library</span>
107-
<ul class="subnav">
108-
<li class="">
109-
110-
<a class="" href="../tensors/index.html">Defining Tensors</a>
111-
</li>
112-
<li class="">
113-
114-
<a class="" href="../computations/index.html">Computing on Tensors</a>
115-
</li>
116105
</ul>
117106
</li>
118107

@@ -153,15 +142,15 @@
153142
applications. As an example, we can benchmark the performance of the
154143
scientific computing application shown <a href="../scientific_computing/index.html">here</a> as
155144
follows:</p>
156-
<pre><code class="python">import pytaco as pt
145+
<pre class="highlight"><code class="language-python">import pytaco as pt
157146
from pytaco import compressed, dense
158147
import numpy as np
159148
import time
160149

161150
csr = pt.format([dense, compressed])
162151
dv = pt.format([dense])
163152

164-
A = pt.read(&quot;pwtk.mtx&quot;, csr)
153+
A = pt.read("pwtk.mtx", csr)
165154
x = pt.from_array(np.random.uniform(size=A.shape[1]))
166155
z = pt.from_array(np.random.uniform(size=A.shape[0]))
167156
y = pt.tensor([A.shape[0]], dv)
@@ -177,8 +166,7 @@
177166
y.compute()
178167
end = time.perf_counter()
179168

180-
print(&quot;Execution time: {0} seconds&quot;.format(end - start))
181-
</code></pre>
169+
print("Execution time: {0} seconds".format(end - start))</code></pre>
182170

183171
<p>In order to accurately measure TACO's computational performance, <strong>only the
184172
time it takes to actually perform a computation should be measured. The time
@@ -196,7 +184,7 @@
196184
matrices to TACO tensors return fully constructed tensors. If you add nonzero
197185
elements to an input tensor by calling <code>insert</code> though, then <code>pack</code> must also
198186
be explicitly invoked before any benchmarking is done:</p>
199-
<pre><code class="python">import pytaco as pt
187+
<pre class="highlight"><code class="language-python">import pytaco as pt
200188
from pytaco import compressed, dense
201189
import numpy as np
202190
import random
@@ -205,7 +193,7 @@
205193
csr = pt.format([dense, compressed])
206194
dv = pt.format([dense])
207195

208-
A = pt.read(&quot;pwtk.mtx&quot;, csr)
196+
A = pt.read("pwtk.mtx", csr)
209197
x = pt.tensor([A.shape[1]], dv)
210198
z = pt.tensor([A.shape[0]], dv)
211199
y = pt.tensor([A.shape[0]], dv)
@@ -227,8 +215,7 @@
227215
y.compute()
228216
end = time.perf_counter()
229217

230-
print(&quot;Execution time: {0} seconds&quot;.format(end - start))
231-
</code></pre>
218+
print("Execution time: {0} seconds".format(end - start))</code></pre>
232219

233220
<p>TACO avoids regenerating code for performing the same computation though as
234221
long as the computation is redefined with the same index variables and with the
@@ -238,15 +225,15 @@
238225
associated with generating code for performing the computation. In such
239226
scenarios, it is acceptable to include the initial code generation overhead
240227
in the performance measurement:</p>
241-
<pre><code class="python">import pytaco as pt
228+
<pre class="highlight"><code class="language-python">import pytaco as pt
242229
from pytaco import compressed, dense
243230
import numpy as np
244231
import time
245232

246233
csr = pt.format([dense, compressed])
247234
dv = pt.format([dense])
248235

249-
A = pt.read(&quot;pwtk.mtx&quot;, csr)
236+
A = pt.read("pwtk.mtx", csr)
250237
x = pt.tensor([A.shape[1]], dv)
251238
z = pt.tensor([A.shape[0]], dv)
252239
y = pt.tensor([A.shape[0]], dv)
@@ -270,8 +257,7 @@
270257
x.evaluate()
271258
end = time.perf_counter()
272259

273-
print(&quot;Execution time: {0} seconds&quot;.format(end - start))
274-
</code></pre>
260+
print("Execution time: {0} seconds".format(end - start))</code></pre>
275261

276262
<div class="admonition warning">
277263
<p class="admonition-title">Warning</p>
@@ -300,8 +286,6 @@
300286

301287
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
302288

303-
<a href="../tensors/index.html" class="btn btn-neutral float-right" title="Defining Tensors">Next <span class="icon icon-circle-arrow-right"></span></a>
304-
305289

306290
<a href="../optimization/index.html" class="btn btn-neutral" title="Strategies for Optimization"><span class="icon icon-circle-arrow-left"></span> Previous</a>
307291

@@ -340,8 +324,6 @@
340324
<span><a href="../optimization/index.html" style="color: #fcfcfc;">&laquo; Previous</a></span>
341325

342326

343-
<span style="margin-left: 15px"><a href="../tensors/index.html" style="color: #fcfcfc">Next &raquo;</a></span>
344-
345327
</span>
346328
</div>
347329
<script>var base_url = '..';</script>

sdh-docs/data_analytics/index.html

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666

6767
<a class="" href="../pycomputations/index.html">Computing on Tensors</a>
6868
</li>
69+
<li class="">
70+
71+
<a class="" href="../pyreference/index.html">Reference Manual</a>
72+
</li>
6973
</ul>
7074
</li>
7175

@@ -101,21 +105,6 @@
101105
<a class="" href="../benchmarking/index.html">Guide to Benchmarking</a>
102106
</li>
103107

104-
<li class="toctree-l1">
105-
106-
<span class="caption-text">C++ Library</span>
107-
<ul class="subnav">
108-
<li class="">
109-
110-
<a class="" href="../tensors/index.html">Defining Tensors</a>
111-
</li>
112-
<li class="">
113-
114-
<a class="" href="../computations/index.html">Computing on Tensors</a>
115-
</li>
116-
</ul>
117-
</li>
118-
119108
</ul>
120109
</div>
121110
&nbsp;
@@ -162,14 +151,14 @@
162151
</p>
163152
<p>where <script type="math/tex">A</script>, <script type="math/tex">C</script>, and <script type="math/tex">D</script> are typically dense matrices, <script type="math/tex">B</script> is a
164153
three-dimensional tensor (matricizied along the first mode), and <script type="math/tex">\odot</script>
165-
denotes the Khatri-Rao product. This operation can also be expressed in <a href="../computations/index.html#specifying-tensor-algebra-computations">index
154+
denotes the Khatri-Rao product. This operation can also be expressed in <a href="computations.md#specifying-tensor-algebra-computations">index
166155
notation</a> as </p>
167156
<p>
168157
<script type="math/tex; mode=display">A_{ij} = B_{ikl} \cdot D_{lj} \cdot C_{kj}.</script>
169158
</p>
170159
<p>You can use the TACO Python library to easily and efficiently compute MTTKRP,
171160
as shown here:</p>
172-
<pre><code class="python">import pytaco as pt
161+
<pre class="highlight"><code class="language-python">import pytaco as pt
173162
import numpy as np
174163
from pytaco import compressed, dense
175164

@@ -180,7 +169,7 @@
180169
# Load a sparse three-dimensional tensor from file (stored in the FROSTT
181170
# format) and store it as a compressed sparse fiber tensor. The tensor in this
182171
# example can be download from: http://frostt.io/tensors/nell-2/
183-
B = pt.read(&quot;nell-2.tns&quot;, csf);
172+
B = pt.read("nell-2.tns", csf);
184173

185174
# Generate two random matrices using NumPy and pass them into TACO
186175
C = pt.from_array(np.random.uniform(size=(B.shape[1], 25)))
@@ -196,8 +185,7 @@
196185
A[i, j] = B[i, k, l] * D[l, j] * C[k, j]
197186

198187
# Perform the MTTKRP computation and write the result to file
199-
pt.write(&quot;A.tns&quot;, A)
200-
</code></pre>
188+
pt.write("A.tns", A)</code></pre>
201189

202190
<p>When you run the above Python program, TACO will generate code under the hood
203191
that efficiently performs the computation in one shot. This lets TACO avoid

sdh-docs/index.html

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@
5757
<li class="toctree-l2"><a href="#system-requirements">System Requirements</a></li>
5858

5959

60-
<li class="toctree-l2"><a href="#getting-help">Getting Help</a></li>
61-
62-
6360
</ul>
6461
</li>
6562

@@ -75,6 +72,10 @@
7572

7673
<a class="" href="pycomputations/index.html">Computing on Tensors</a>
7774
</li>
75+
<li class="">
76+
77+
<a class="" href="pyreference/index.html">Reference Manual</a>
78+
</li>
7879
</ul>
7980
</li>
8081

@@ -107,21 +108,6 @@
107108
<a class="" href="benchmarking/index.html">Guide to Benchmarking</a>
108109
</li>
109110

110-
<li class="toctree-l1">
111-
112-
<span class="caption-text">C++ Library</span>
113-
<ul class="subnav">
114-
<li class="">
115-
116-
<a class="" href="tensors/index.html">Defining Tensors</a>
117-
</li>
118-
<li class="">
119-
120-
<a class="" href="computations/index.html">Computing on Tensors</a>
121-
</li>
122-
</ul>
123-
</li>
124-
125111
</ul>
126112
</div>
127113
&nbsp;
@@ -166,11 +152,15 @@
166152
applications.</p>
167153
<h1 id="system-requirements">System Requirements</h1>
168154
<ul>
169-
<li>A C compiler that supports C99 and OpenMP (if parallel execution is desired), such as GCC or Clang.</li>
170-
<li>Python 3 with NumPy and SciPy.</li>
155+
<li>A C compiler that supports C99, such as GCC or Clang<ul>
156+
<li>Support for OpenMP is also required if parallel execution is desired</li>
171157
</ul>
172-
<h1 id="getting-help">Getting Help</h1>
173-
<p>Questions and bug reports can be submitted <a href="https://github.com/tensor-compiler/taco/issues">here</a>.</p>
158+
</li>
159+
<li>Python 3 with NumPy and SciPy</li>
160+
</ul>
161+
<!--# Getting Help
162+
163+
Questions and bug reports can be submitted [here](https://github.com/tensor-compiler/taco/issues).-->
174164

175165
</div>
176166
</div>
@@ -229,5 +219,5 @@ <h1 id="getting-help">Getting Help</h1>
229219

230220
<!--
231221
MkDocs version : 0.17.2
232-
Build Date UTC : 2019-05-30 03:24:49
222+
Build Date UTC : 2019-05-30 18:02:31
233223
-->

sdh-docs/machine_learning/index.html

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666

6767
<a class="" href="../pycomputations/index.html">Computing on Tensors</a>
6868
</li>
69+
<li class="">
70+
71+
<a class="" href="../pyreference/index.html">Reference Manual</a>
72+
</li>
6973
</ul>
7074
</li>
7175

@@ -101,21 +105,6 @@
101105
<a class="" href="../benchmarking/index.html">Guide to Benchmarking</a>
102106
</li>
103107

104-
<li class="toctree-l1">
105-
106-
<span class="caption-text">C++ Library</span>
107-
<ul class="subnav">
108-
<li class="">
109-
110-
<a class="" href="../tensors/index.html">Defining Tensors</a>
111-
</li>
112-
<li class="">
113-
114-
<a class="" href="../computations/index.html">Computing on Tensors</a>
115-
</li>
116-
</ul>
117-
</li>
118-
119108
</ul>
120109
</div>
121110
&nbsp;
@@ -161,14 +150,14 @@
161150
</p>
162151
<p>where <script type="math/tex">A</script> and <script type="math/tex">B</script> are sparse matrices, <script type="math/tex">C</script> and <script type="math/tex">D</script> are dense matrices,
163152
and <script type="math/tex">\circ</script> denotes component-wise multiplication. This operation can also be
164-
expressed in <a href="../computations/index.html#specifying-tensor-algebra-computations">index
153+
expressed in <a href="computations.md#specifying-tensor-algebra-computations">index
165154
notation</a> as </p>
166155
<p>
167156
<script type="math/tex; mode=display">A_{ij} = B_{ij} \cdot C_{ik} \cdot C_{kj}.</script>
168157
</p>
169158
<p>You can use the TACO Python library to easily and efficiently compute SDDMM, as
170159
shown here:</p>
171-
<pre><code class="python">import pytaco as pt
160+
<pre class="highlight"><code class="language-python">import pytaco as pt
172161
from pytaco import dense, compressed
173162
import numpy as np
174163

@@ -183,7 +172,7 @@
183172

184173
# The matrix in this example can be download from:
185174
# https://www.cise.ufl.edu/research/sparse/MM/Williams/webbase-1M.tar.gz
186-
B = pt.read(&quot;webbase-1M.mtx&quot;, dcsr)
175+
B = pt.read("webbase-1M.mtx", dcsr)
187176

188177
# Generate two random matrices using NumPy and pass them into TACO
189178
x = pt.from_array(np.random.uniform(size=(B.shape[0], 1000)))
@@ -199,8 +188,7 @@
199188
A[i, j] = B[i, j] * C[i, k] * D[k, j]
200189

201190
# Perform the SDDMM computation and write the result to file
202-
pt.write(&quot;A.mtx&quot;, A)
203-
</code></pre>
191+
pt.write("A.mtx", A)</code></pre>
204192

205193
<p>When you run the above Python program, TACO will generate code under the hood
206194
that efficiently performs the computation in one shot. This lets TACO only

0 commit comments

Comments
 (0)