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

updated sycl docs · PentaBug/taskflow@a3dac4d · GitHub

Commit a3dac4d

Browse files
updated sycl docs
1 parent 3c11d24 commit a3dac4d

265 files changed

Lines changed: 6529 additions & 4937 deletions

File tree

Some content is hidden

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

‎README.md‎

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,7 @@ cond.precede(cond, stop);
211211
212212
## Offload a Task to a GPU
213213
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.
217215
218216
```cpp
219217
// saxpy kernel
@@ -239,6 +237,26 @@ tf::Task cudaflow = taskflow.emplace([&](tf::cudaFlow& cf) {
239237

240238
<p align="center"><img src="doxygen/images/saxpy_1_cudaflow.svg"></p>
241239

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+
242260
## Compose Task Graphs
243261

244262
Taskflow is composable.
@@ -331,7 +349,7 @@ To use Taskflow, you only need a compiler that supports C++17:
331349
+ AppleClang Xode Version at least v12.0 with -std=c++17
332350
+ Nvidia CUDA Toolkit and Compiler (nvcc) at least v11.1 with -std=c++17
333351
+ 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
335353
336354
Taskflow works on Linux, Windows, and Mac OS X.
337355

‎docs/Algorithms.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>Taskflow Algorithms | Taskflow QuickStart</title>
66
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
77
<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" />
99
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1010
<meta name="theme-color" content="#22272e" />
1111
</head>

‎docs/AsyncTasking.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>Cookbook &raquo; Asynchronous Tasking | Taskflow QuickStart</title>
66
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
77
<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" />
99
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1010
<meta name="theme-color" content="#22272e" />
1111
</head>

‎docs/BenchmarkTaskflow.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>Building and Installing &raquo; Benchmark Taskflow | Taskflow QuickStart</title>
66
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
77
<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" />
99
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1010
<meta name="theme-color" content="#22272e" />
1111
</head>

‎docs/CUDAReduce.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>cudaFlow Algorithms &raquo; Parallel Reduction | Taskflow QuickStart</title>
66
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
77
<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" />
99
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1010
<meta name="theme-color" content="#22272e" />
1111
</head>

‎docs/CompileTaskflowWithCUDA.html‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>Building and Installing &raquo; Compile Taskflow with CUDA | Taskflow QuickStart</title>
66
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
77
<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" />
99
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1010
<meta name="theme-color" content="#22272e" />
1111
</head>
@@ -52,6 +52,7 @@ <h1>
5252
<div class="m-block m-default">
5353
<h3>Contents</h3>
5454
<ul>
55+
<li><a href="#InstallCUDACompiler">Install CUDA Compiler</a></li>
5556
<li><a href="#CompileTaskflowWithCUDADirectly">Compile Source Code Directly</a></li>
5657
<li>
5758
<a href="#CompileTaskflowWithCUDASeparately">Compile Source Code Separately</a>
@@ -62,7 +63,7 @@ <h3>Contents</h3>
6263
</li>
6364
</ul>
6465
</div>
65-
<section id="CompileTaskflowWithCUDADirectly"><h2><a href="#CompileTaskflowWithCUDADirectly">Compile Source Code Directly</a></h2><p>Taskflow&#x27;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">&lt;taskflow/taskflow.hpp&gt;</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&#x27;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">&lt;taskflow/taskflow.hpp&gt;</span><span class="c1"> // core taskflow routines</span><span class="cp"></span>
6667
<span class="cp">#include</span> <span class="cpf">&lt;taskflow/cudaflow.hpp&gt;</span><span class="c1"> // core cudaflow routines</span><span class="cp"></span>
6768

6869
<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>

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL