| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3c11d24 commit a3dac4d
265 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -211,9 +211,7 @@ cond.precede(cond, stop); | |||
| 211 | 211 | ||
| 212 | 212 | ## Offload a Task to a GPU | |
| 213 | 213 | ||
| 214 | - Taskflow supports heterogeneous tasking for you | ||
| 215 | - to accelerate many data-driven scientific computing applications | ||
| 216 | - by harnessing the power of CPU-GPU collaborative computing. | ||
| 214 | + Taskflow supports GPU tasking for you to accelerate a wide range of scientific computing applications by harnessing the power of CPU-GPU collaborative computing using CUDA. | ||
| 217 | 215 | ||
| 218 | 216 | ```cpp | |
| 219 | 217 | // saxpy kernel | |
@@ -239,6 +237,26 @@ tf::Task cudaflow = taskflow.emplace([&](tf::cudaFlow& cf) { | |||
| 239 | 237 | ||
| 240 | 238 | <p align="center"><img src="doxygen/images/saxpy_1_cudaflow.svg"></p> | |
| 241 | 239 | ||
| 240 | + %Taskflow also supports SYCL, a general-purpose heterogeneous programming model, | ||
| 241 | + to program GPU tasks in a single-source C++ environment using the task graph-based | ||
| 242 | + approach. | ||
| 243 | + | ||
| 244 | + ```cpp | ||
| 245 | + tf::Task syclflow = taskflow.emplace_on([&](tf::syclFlow& sf){ | ||
| 246 | + tf::syclTask h2d_x = cf.copy(dx, hx.data(), N).name("h2d_x"); | ||
| 247 | + tf::syclTask h2d_y = cf.copy(dy, hy.data(), N).name("h2d_y"); | ||
| 248 | + tf::syclTask d2h_x = cf.copy(hx.data(), dx, N).name("d2h_x"); | ||
| 249 | + tf::syclTask d2h_y = cf.copy(hy.data(), dy, N).name("d2h_y"); | ||
| 250 | + tf::syclTask saxpy = sf.parallel_for(sycl::range<1>(N), | ||
| 251 | + [=] (sycl::id<1> id) { | ||
| 252 | + dx[id] = 2.0f * dx[id] + dy[id]; | ||
| 253 | + } | ||
| 254 | + ).name("saxpy"); | ||
| 255 | + saxpy.succeed(h2d_x, h2d_y) | ||
| 256 | + .precede(d2h_x, d2h_y); | ||
| 257 | + }, sycl_queue).name("syclFlow"); | ||
| 258 | + ``` | ||
| 259 | + | ||
| 242 | 260 | ## Compose Task Graphs | |
| 243 | 261 | ||
| 244 | 262 | Taskflow is composable. | |
@@ -331,7 +349,7 @@ To use Taskflow, you only need a compiler that supports C++17: | |||
| 331 | 349 | + AppleClang Xode Version at least v12.0 with -std=c++17 | |
| 332 | 350 | + Nvidia CUDA Toolkit and Compiler (nvcc) at least v11.1 with -std=c++17 | |
| 333 | 351 | + Intel C++ Compiler at least v19.0.1 with -std=c++17 | |
| 334 | - + Intel oneAPI Clang C++ Compiler at least v13.0.0 | ||
| 352 | + + Intel DPC++ Clang Compiler at least v13.0.0 with -std=c++17 and SYCL20 | ||
| 335 | 353 | ||
| 336 | 354 | Taskflow works on Linux, Windows, and Mac OS X. | |
| 337 | 355 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ | |||
| 5 | 5 | <title>Taskflow Algorithms | 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> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ | |||
| 5 | 5 | <title>Cookbook » Asynchronous Tasking | 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> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ | |||
| 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> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ | |||
| 5 | 5 | <title>cudaFlow Algorithms » Parallel Reduction | 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> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ | |||
| 5 | 5 | <title>Building and Installing » Compile Taskflow with CUDA | 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> | |
@@ -52,6 +52,7 @@ <h1> | |||
| 52 | 52 | <div class="m-block m-default"> | |
| 53 | 53 | <h3>Contents</h3> | |
| 54 | 54 | <ul> | |
| 55 | + <li><a href="#InstallCUDACompiler">Install CUDA Compiler</a></li> | ||
| 55 | 56 | <li><a href="#CompileTaskflowWithCUDADirectly">Compile Source Code Directly</a></li> | |
| 56 | 57 | <li> | |
| 57 | 58 | <a href="#CompileTaskflowWithCUDASeparately">Compile Source Code Separately</a> | |
@@ -62,7 +63,7 @@ <h3>Contents</h3> | |||
| 62 | 63 | </li> | |
| 63 | 64 | </ul> | |
| 64 | 65 | </div> | |
| 65 | - <section id="CompileTaskflowWithCUDADirectly"><h2><a href="#CompileTaskflowWithCUDADirectly">Compile Source Code Directly</a></h2><p>Taskflow's GPU programming interface for CUDA is <a href="classtf_1_1cudaFlow.html" class="m-doc">tf::<wbr />cudaFlow</a>. Consider the following <code>simple.cu</code> program that launches a single kernel function to output a message:</p><pre class="m-code"><span class="cp">#include</span> <span class="cpf"><taskflow/taskflow.hpp></span><span class="c1"> // core taskflow routines</span><span class="cp"></span> | ||
| 66 | + <section id="InstallCUDACompiler"><h2><a href="#InstallCUDACompiler">Install CUDA Compiler</a></h2><p>To compile Taskflow with CUDA code, you need a <code>nvcc</code> compiler. Please visit the official page of <a href="https://developer.nvidia.com/cuda-downloads">Downloading CUDA Toolkit</a>.</p></section><section id="CompileTaskflowWithCUDADirectly"><h2><a href="#CompileTaskflowWithCUDADirectly">Compile Source Code Directly</a></h2><p>Taskflow's GPU programming interface for CUDA is <a href="classtf_1_1cudaFlow.html" class="m-doc">tf::<wbr />cudaFlow</a>. Consider the following <code>simple.cu</code> program that launches a single kernel function to output a message:</p><pre class="m-code"><span class="cp">#include</span> <span class="cpf"><taskflow/taskflow.hpp></span><span class="c1"> // core taskflow routines</span><span class="cp"></span> | ||
| 66 | 67 | <span class="cp">#include</span> <span class="cpf"><taskflow/cudaflow.hpp></span><span class="c1"> // core cudaflow routines</span><span class="cp"></span> | |
| 67 | 68 | ||
| 68 | 69 | <span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="k">const</span> <span class="kt">char</span><span class="o">**</span> <span class="n">argv</span><span class="p">)</span> <span class="p">{</span> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments