|
5 | 5 | <title>Building and Installing » Benchmark Taskflow | Taskflow QuickStart</title>
|
6 | 6 | <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
|
7 | 7 | <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
|
8 |
| - <link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" /> |
| 8 | + <link rel="icon" href="favicon.ico" type="image/x-icon" /> |
9 | 9 | <meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
10 | 10 | <meta name="theme-color" content="#22272e" />
|
11 | 11 | </head>
|
@@ -85,7 +85,7 @@ <h3>Contents</h3>
|
85 | 85 | <span class="go"> -h,--help Print this help message and exit</span>
|
86 | 86 | <span class="go"> -t,--num_threads UINT number of threads (default=1)</span>
|
87 | 87 | <span class="go"> -r,--num_rounds UINT number of rounds (default=1)</span>
|
88 |
| -<span class="go"> -m,--model TEXT model name tbb|omp|tf (default=tf)</span></pre><p>We currently implement the following instances that are commonly used by the parallel computing community to evaluate the system performance.</p><table class="m-table"><thead><tr><th>Instance</th><th>Description</th></tr></thead><tbody><tr><td>binary_tree</td><td>traverses a complete binary tree</td></tr><tr><td>black_scholes</td><td>computes option pricing with Black-Shcoles Models</td></tr><tr><td>graph_traversal</td><td>traverses a randomly generated direct acyclic graph</td></tr><tr><td>linear_chain</td><td>traverses a linear chain of tasks</td></tr><tr><td>mandelbrot</td><td>exploits imbalanced workloads in a Mandelbrot set</td></tr><tr><td>matrix_multiplication</td><td>multiplies two 2D matrices</td></tr><tr><td>mnist</td><td>trains a neural network-based image classifier on the MNIST dataset</td></tr><tr><td>parallel_sort</td><td>sorts a range of items</td></tr><tr><td>reduce_sum</td><td>sums a range of items using reduction</td></tr><tr><td>wavefront</td><td>propagates computations in a 2D grid</td></tr></tbody></table></section><section id="ConfigureRunOptions"><h2><a href="#ConfigureRunOptions">Configure Run Options</a></h2><p>We implement consistent options for each benchmark instance. Common options are:</p><table class="m-table"><thead><tr><th>option</th><th>value</th><th>function</th></tr></thead><tbody><tr><td><code>-h</code></td><td>none</td><td>display the help message</td></tr><tr><td><code>-t</code></td><td>integer</td><td>configure the number of threads to run</td></tr><tr><td><code>-r</code></td><td>integer</td><td>configure the number of rounds to run</td></tr><tr><td><code>-m</code></td><td>string</td><td>configure the baseline models to run, tbb, omp, or tf</td></tr></tbody></table><p>You can configure the benchmarking environment by giving different options.</p><section id="SpecifyTheRunModel"><h3><a href="#SpecifyTheRunModel">Specify the Run Model</a></h3><p>In addition to a Taskflow-based implementation for each benchmark instance, we have implemented two baseline models using the state-of-the-art parallel programming libraries, <a href="https://www.openmp.org/">OpenMP</a> and <a href="https://github.com/oneapi-src/oneTBB">Intel TBB</a>, to measure and evaluate the performance of Taskflow. You can select different implementations by passing the option <code>-m</code>.</p><pre class="m-console"><span class="go">~$ ./graph_traversal -m tf # run the Taskflow implementation (default)</span> |
| 88 | +<span class="go"> -m,--model TEXT model name tbb|omp|tf (default=tf)</span></pre><p>We currently implement the following instances that are commonly used by the parallel computing community to evaluate the system performance.</p><table class="m-table"><thead><tr><th>Instance</th><th>Description</th></tr></thead><tbody><tr><td>binary_tree</td><td>traverses a complete binary tree</td></tr><tr><td>black_scholes</td><td>computes option pricing with Black-Shcoles Models</td></tr><tr><td>graph_traversal</td><td>traverses a randomly generated direct acyclic graph</td></tr><tr><td>linear_chain</td><td>traverses a linear chain of tasks</td></tr><tr><td>mandelbrot</td><td>exploits imbalanced workloads in a Mandelbrot set</td></tr><tr><td>matrix_multiplication</td><td>multiplies two 2D matrices</td></tr><tr><td>mnist</td><td>trains a neural network-based image classifier on the MNIST dataset</td></tr><tr><td>parallel_sort</td><td>sorts a range of items</td></tr><tr><td>reduce_sum</td><td>sums a range of items using reduction</td></tr><tr><td>wavefront</td><td>propagates computations in a 2D grid</td></tr><tr><td>linear_pipeline</td><td>pipeline scheduling on a linear chain of pipes</td></tr><tr><td>graph_pipeline</td><td>pipeline scheduling on a graph of pipes</td></tr></tbody></table></section><section id="ConfigureRunOptions"><h2><a href="#ConfigureRunOptions">Configure Run Options</a></h2><p>We implement consistent options for each benchmark instance. Common options are:</p><table class="m-table"><thead><tr><th>option</th><th>value</th><th>function</th></tr></thead><tbody><tr><td><code>-h</code></td><td>none</td><td>display the help message</td></tr><tr><td><code>-t</code></td><td>integer</td><td>configure the number of threads to run</td></tr><tr><td><code>-r</code></td><td>integer</td><td>configure the number of rounds to run</td></tr><tr><td><code>-m</code></td><td>string</td><td>configure the baseline models to run, tbb, omp, or tf</td></tr></tbody></table><p>You can configure the benchmarking environment by giving different options.</p><section id="SpecifyTheRunModel"><h3><a href="#SpecifyTheRunModel">Specify the Run Model</a></h3><p>In addition to a Taskflow-based implementation for each benchmark instance, we have implemented two baseline models using the state-of-the-art parallel programming libraries, <a href="https://www.openmp.org/">OpenMP</a> and <a href="https://github.com/oneapi-src/oneTBB">Intel TBB</a>, to measure and evaluate the performance of Taskflow. You can select different implementations by passing the option <code>-m</code>.</p><pre class="m-console"><span class="go">~$ ./graph_traversal -m tf # run the Taskflow implementation (default)</span> |
89 | 89 | <span class="go">~$ ./graph_traversal -m tbb # run the TBB implementation</span>
|
90 | 90 | <span class="go">~$ ./graph_traversal -m omp # run the OpenMP implementation</span></pre></section><section id="SpecifyTheNumberOfThreads"><h3><a href="#SpecifyTheNumberOfThreads">Specify the Number of Threads</a></h3><p>You can configure the number of threads to run a benchmark instance by passing the option <code>-t</code>. The default value is one.</p><pre class="m-console"><span class="gp">#</span> run the Taskflow implementation using <span class="m">4</span> threads
|
91 | 91 | <span class="go">~$ ./graph_traversal -m tf -t 4</span></pre><p>Depending on your environment, you may need to use <code>taskset</code> to set the CPU affinity of the running process. This allows the OS scheduler to keep process on the same CPU(s) as long as practical for performance reason.</p><pre class="m-console"><span class="gp">#</span> affine the process to <span class="m">4</span> CPUs, CPU <span class="m">0</span>, CPU <span class="m">1</span>, CPU <span class="m">2</span>, and CPU <span class="m">3</span>
|
|
0 commit comments