FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

updated docs · PentaBug/taskflow@8ebe776 · GitHub

Repository navigation

Commit 8ebe776

Browse files
twhuang
committed
updated docs
1 parent cc2f9fb commit 8ebe776

62 files changed

Lines changed: 1096 additions & 837 deletions

Some content is hidden

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

‎docs/AsyncTasking.html‎

Lines changed: 11 additions & 11 deletions
Large diffs are not rendered by default.

‎docs/GPUTaskingcudaFlow.html‎

Lines changed: 9 additions & 8 deletions
Large diffs are not rendered by default.

‎docs/GPUTaskingcudaFlowCapturer.html‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h3>Contents</h3>
6262
<li><a href="#IntegrateCudaFlowCapturerIntoTaskflow">Integrate a cudaFlow Capturer into Taskflow</a></li>
6363
</ul>
6464
</nav>
65-
<p>You can create a cudaFlow through <em>stream capture</em>, which allows you to implicitly capture a CUDA graph using stream-based interface. Compared to explicit CUDA Graph construction (<a href="classtf_1_1cudaFlow.html" class="m-doc">tf::<wbr />cudaFlow</a>), implicit CUDA Graph capturing (<a href="classtf_1_1cudaFlowCapturer.html" class="m-doc">tf::<wbr />cudaFlowCapturer</a>) is more flexible in building GPU task graphs.</p><section id="GPUTaskingcudaFlowCapturerIncludeTheHeader"><h2><a href="#GPUTaskingcudaFlowCapturerIncludeTheHeader">Include the Header</a></h2><p>You need to include the header file, <code>taskflow/cuda/cudaflow.hpp</code>, for capturing a GPU task graph using <a href="classtf_1_1cudaFlowCapturer.html" class="m-doc">tf::<wbr />cudaFlowCapturer</a>.</p><pre class="m-code"><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;taskflow/cuda/cudaflow.hpp&gt;</span><span class="cp"></span></pre></section><section id="Capture_a_cudaFlow"><h2><a href="#Capture_a_cudaFlow">Capture a cudaFlow</a></h2><p>When your program has no access to direct kernel calls but invoke it through a stream-based interface (e.g., <a href="https://docs.nvidia.com/cuda/cublas/index.html">cuBLAS</a> and <a href="https://developer.nvidia.com/cudnn">cuDNN</a> library functions), you can use <a href="classtf_1_1cudaFlowCapturer.html" class="m-doc">tf::<wbr />cudaFlowCapturer</a> to capture the hidden GPU operations into a CUDA graph. A cudaFlowCapturer is similar to a cudaFlow except it constructs a GPU task graph through <em>stream capture</em>. You use the method <a href="classtf_1_1cudaFlowCapturer.html#ad0d937ae0d77239f148b66a77e35db41" class="m-doc">tf::<wbr />cudaFlowCapturer::<wbr />on</a> to capture a sequence of <em>asynchronous</em> GPU operations through the given stream. The following example creates a CUDA graph that captures two kernel tasks, <code>task_1</code> (<code>my_kernel_1</code>) and <code>task_2</code> (<code>my_kernel_2</code>) , where <code>task_1</code> runs before <code>task_2</code>.</p><pre class="m-code"><span class="c1">// create a cudaFlow capturer to run a CUDA graph using stream capturing</span>
65+
<p>You can create a cudaFlow through <em>stream capture</em>, which allows you to implicitly capture a CUDA graph using stream-based interface. Compared to explicit CUDA Graph construction (<a href="classtf_1_1cudaFlow.html" class="m-doc">tf::<wbr />cudaFlow</a>), implicit CUDA Graph capturing (<a href="classtf_1_1cudaFlowCapturer.html" class="m-doc">tf::<wbr />cudaFlowCapturer</a>) is more flexible in building GPU task graphs.</p><section id="GPUTaskingcudaFlowCapturerIncludeTheHeader"><h2><a href="#GPUTaskingcudaFlowCapturerIncludeTheHeader">Include the Header</a></h2><p>You need to include the header file, <code>taskflow/cuda/cudaflow.hpp</code>, for capturing a GPU task graph using <a href="classtf_1_1cudaFlowCapturer.html" class="m-doc">tf::<wbr />cudaFlowCapturer</a>.</p><pre class="m-code"><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;taskflow/cuda/cudaflow.hpp&gt;</span><span class="cp"></span></pre></section><section id="Capture_a_cudaFlow"><h2><a href="#Capture_a_cudaFlow">Capture a cudaFlow</a></h2><p>When your program has no access to direct kernel calls but can only invoke them through a stream-based interface (e.g., <a href="https://docs.nvidia.com/cuda/cublas/index.html">cuBLAS</a> and <a href="https://developer.nvidia.com/cudnn">cuDNN</a> library functions), you can use <a href="classtf_1_1cudaFlowCapturer.html" class="m-doc">tf::<wbr />cudaFlowCapturer</a> to capture the hidden GPU operations into a CUDA graph. A cudaFlowCapturer is similar to a cudaFlow except it constructs a GPU task graph through <em>stream capture</em>. You use the method <a href="classtf_1_1cudaFlowCapturer.html#ad0d937ae0d77239f148b66a77e35db41" class="m-doc">tf::<wbr />cudaFlowCapturer::<wbr />on</a> to capture a sequence of <em>asynchronous</em> GPU operations through the given stream. The following example creates a CUDA graph that captures two kernel tasks, <code>task_1</code> (<code>my_kernel_1</code>) and <code>task_2</code> (<code>my_kernel_2</code>) , where <code>task_1</code> runs before <code>task_2</code>.</p><pre class="m-code"><span class="c1">// create a cudaFlow capturer to run a CUDA graph using stream capturing</span>
6666
<span class="n">tf</span><span class="o">::</span><span class="n">cudaFlowCapturer</span><span class="w"> </span><span class="n">capturer</span><span class="p">;</span><span class="w"></span>
6767

6868
<span class="c1">// capture my_kernel_1 through a stream managed by capturer</span>
@@ -109,7 +109,7 @@ <h3>Contents</h3>
109109
</g>
110110
</g>
111111
</svg>
112-
</div><aside class="m-note m-danger"><h4>Warning</h4><p>Inside <a href="classtf_1_1cudaFlowCapturer.html#ad0d937ae0d77239f148b66a77e35db41" class="m-doc">tf::<wbr />cudaFlowCapturer::<wbr />on</a>, you should <em>NOT</em> modify the properties of the stream argument but only use it to capture <em>asynchronous</em> GPU operations (e.g., <code>kernel</code>, <code>cudaMemcpyAsync</code>). The stream argument is internal to the capturer use only.</p></aside></section><section id="CommonCaptureMethods"><h2><a href="#CommonCaptureMethods">Common Capture Methods</a></h2><p>cudaFlowCapturer defines a set of methods for capturing common GPU operations, such as <a href="classtf_1_1cudaFlowCapturer.html#a6f06c7f6954d8d67ad89f0eddfe285e9" class="m-doc">tf::<wbr />cudaFlowCapturer::<wbr />kernel</a>, <a href="classtf_1_1cudaFlowCapturer.html#ae84d097cdae9e2e8ce108dea760483ed" class="m-doc">tf::<wbr />cudaFlowCapturer::<wbr />memcpy</a>, <a href="classtf_1_1cudaFlowCapturer.html#a0d38965b380f940bf6cfc6667a281052" class="m-doc">tf::<wbr />cudaFlowCapturer::<wbr />memset</a>, and so on. For example, the following code snippet uses these pre-defined methods to construct a GPU task graph of one host-to-device copy, kernel, and one device-to-host copy, in this order of their dependencies.</p><pre class="m-code"><span class="n">tf</span><span class="o">::</span><span class="n">cudaFlowCapturer</span><span class="w"> </span><span class="n">capturer</span><span class="p">;</span><span class="w"></span>
112+
</div><aside class="m-note m-danger"><h4>Warning</h4><p>Inside <a href="classtf_1_1cudaFlowCapturer.html#ad0d937ae0d77239f148b66a77e35db41" class="m-doc">tf::<wbr />cudaFlowCapturer::<wbr />on</a>, you should <em>NOT</em> modify the properties of the stream argument but only use it to capture <em>asynchronous</em> GPU operations (e.g., <code>kernel</code>, <code>cudaMemcpyAsync</code>). The stream argument is internal to the capturer use only.</p></aside></section><section id="CommonCaptureMethods"><h2><a href="#CommonCaptureMethods">Common Capture Methods</a></h2><p><a href="classtf_1_1cudaFlowCapturer.html" class="m-doc">tf::<wbr />cudaFlowCapturer</a> defines a set of methods for capturing common GPU operations, such as <a href="classtf_1_1cudaFlowCapturer.html#a6f06c7f6954d8d67ad89f0eddfe285e9" class="m-doc">tf::<wbr />cudaFlowCapturer::<wbr />kernel</a>, <a href="classtf_1_1cudaFlowCapturer.html#ae84d097cdae9e2e8ce108dea760483ed" class="m-doc">tf::<wbr />cudaFlowCapturer::<wbr />memcpy</a>, <a href="classtf_1_1cudaFlowCapturer.html#a0d38965b380f940bf6cfc6667a281052" class="m-doc">tf::<wbr />cudaFlowCapturer::<wbr />memset</a>, and so on. For example, the following code snippet uses these pre-defined methods to construct a GPU task graph of one host-to-device copy, kernel, and one device-to-host copy, in this order of their dependencies.</p><pre class="m-code"><span class="n">tf</span><span class="o">::</span><span class="n">cudaFlowCapturer</span><span class="w"> </span><span class="n">capturer</span><span class="p">;</span><span class="w"></span>
113113

114114
<span class="c1">// copy data from host_data to gpu_data</span>
115115
<span class="n">tf</span><span class="o">::</span><span class="n">cudaTask</span><span class="w"> </span><span class="n">h2d</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">capturer</span><span class="p">.</span><span class="n">memcpy</span><span class="p">(</span><span class="n">gpu_data</span><span class="p">,</span><span class="w"> </span><span class="n">host_data</span><span class="p">,</span><span class="w"> </span><span class="n">bytes</span><span class="p">)</span><span class="w"></span>
@@ -160,7 +160,7 @@ <h3>Contents</h3>
160160
</g>
161161
</g>
162162
</svg>
163-
</div></section><section id="CreateACapturerOnASpecificGPU"><h2><a href="#CreateACapturerOnASpecificGPU">Create a Capturer on a Specific GPU</a></h2><p>You can run a cudaFlow capturer on a specific GPU by switching to the context of that GPU using <a href="classtf_1_1cudaScopedDevice.html" class="m-doc">tf::<wbr />cudaScopedDevice</a>, following the CUDA convention of multi-GPU programming. The following example creates a cudaFlow capturer on GPU <code>2</code>:</p><pre class="m-code"><span class="p">{</span><span class="w"></span>
163+
</div></section><section id="CreateACapturerOnASpecificGPU"><h2><a href="#CreateACapturerOnASpecificGPU">Create a Capturer on a Specific GPU</a></h2><p>You can run a cudaFlow capturer on a specific GPU by switching to the context of that GPU using <a href="classtf_1_1cudaScopedDevice.html" class="m-doc">tf::<wbr />cudaScopedDevice</a>, following the CUDA convention of multi-GPU programming. The example below creates a cudaFlow capturer and runs it on GPU <code>2</code>:</p><pre class="m-code"><span class="p">{</span><span class="w"></span>
164164
<span class="w"> </span><span class="c1">// create an RAII-styled switcher to the context of GPU 2</span>
165165
<span class="w"> </span><span class="n">tf</span><span class="o">::</span><span class="n">cudaScopedDevice</span><span class="w"> </span><span class="nf">context</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span><span class="w"></span>
166166

‎docs/Releases.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<h1>
4949
Release Notes
5050
</h1>
51-
<p>This page summarizes the release notes of Taskflow. We classify each release with three numbers:</p><p><code>Major.Minor.Patch</code></p><p>A <em>major</em> release indicates significant codebase changes and API modifications, a <em>minor</em> release indicates technical improvement over a major release line, and a <em>patch</em> release indicates fixes of bugs and other issues.</p><p>All releases are available in <a href="https://github.com/taskflow/">project GitHub</a>.</p><ul><li><a href="release-roadmap.html" class="m-doc">Release Roadmap</a></li><li><a href="release-3-6-0.html" class="m-doc">Release 3.6.0 (Master)</a></li><li><a href="release-3-5-0.html" class="m-doc">Release 3.5.0 (2023/01/05)</a></li><li><a href="release-3-4-0.html" class="m-doc">Release 3.4.0 (2022/05/23)</a></li><li><a href="release-3-3-0.html" class="m-doc">Release 3.3.0 (2022/01/03)</a></li><li><a href="release-3-2-0.html" class="m-doc">Release 3.2.0 (2021/07/29)</a></li><li><a href="release-3-1-0.html" class="m-doc">Release 3.1.0 (2021/04/14)</a></li><li><a href="release-3-0-0.html" class="m-doc">Release 3.0.0 (2021/01/01)</a></li><li><a href="release-2-7-0.html" class="m-doc">Release 2.7.0 (2020/10/01)</a></li><li><a href="release-2-6-0.html" class="m-doc">Release 2.6.0 (2020/08/25)</a></li><li><a href="release-2-5-0.html" class="m-doc">Release 2.5.0 (2020/06/01)</a></li><li><a href="release-2-4-0.html" class="m-doc">Release 2.4.0 (2020/03/25)</a></li><li><a href="release-2-3-1.html" class="m-doc">Release 2.3.1 (2020/03/13)</a></li><li><a href="release-2-3-0.html" class="m-doc">Release 2.3.0 (2020/02/27)</a></li><li><a href="release-2-2-0.html" class="m-doc">Release 2.2.0 (2019/06/15)</a></li><li><a href="release-2-1-0.html" class="m-doc">Release 2.1.0 (2019/02/15)</a></li><li><a href="release-2-0-0.html" class="m-doc">Release 2.0.0 (2018/08/28)</a></li><li><a href="release-1-x-x.html" class="m-doc">Release 1.x.x (before 2018)</a></li></ul>
51+
<p>This page summarizes the release notes of Taskflow. We classify each release with three numbers:</p><p><code>Major.Minor.Patch</code></p><p>A <em>major</em> release indicates significant codebase changes and API modifications, a <em>minor</em> release indicates technical improvement over a major release line, and a <em>patch</em> release indicates fixes of bugs and other issues.</p><p>All releases are available in <a href="https://github.com/taskflow/">Project GitHub</a>.</p><ul><li><a href="release-roadmap.html" class="m-doc">Release Roadmap</a></li><li><a href="release-3-6-0.html" class="m-doc">Release 3.6.0 (Master)</a></li><li><a href="release-3-5-0.html" class="m-doc">Release 3.5.0 (2023/01/05)</a></li><li><a href="release-3-4-0.html" class="m-doc">Release 3.4.0 (2022/05/23)</a></li><li><a href="release-3-3-0.html" class="m-doc">Release 3.3.0 (2022/01/03)</a></li><li><a href="release-3-2-0.html" class="m-doc">Release 3.2.0 (2021/07/29)</a></li><li><a href="release-3-1-0.html" class="m-doc">Release 3.1.0 (2021/04/14)</a></li><li><a href="release-3-0-0.html" class="m-doc">Release 3.0.0 (2021/01/01)</a></li><li><a href="release-2-7-0.html" class="m-doc">Release 2.7.0 (2020/10/01)</a></li><li><a href="release-2-6-0.html" class="m-doc">Release 2.6.0 (2020/08/25)</a></li><li><a href="release-2-5-0.html" class="m-doc">Release 2.5.0 (2020/06/01)</a></li><li><a href="release-2-4-0.html" class="m-doc">Release 2.4.0 (2020/03/25)</a></li><li><a href="release-2-3-1.html" class="m-doc">Release 2.3.1 (2020/03/13)</a></li><li><a href="release-2-3-0.html" class="m-doc">Release 2.3.0 (2020/02/27)</a></li><li><a href="release-2-2-0.html" class="m-doc">Release 2.2.0 (2019/06/15)</a></li><li><a href="release-2-1-0.html" class="m-doc">Release 2.1.0 (2019/02/15)</a></li><li><a href="release-2-0-0.html" class="m-doc">Release 2.0.0 (2018/08/28)</a></li><li><a href="release-1-x-x.html" class="m-doc">Release 1.x.x (before 2018)</a></li></ul>
5252
</div>
5353
</div>
5454
</div>

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL