Skip to content

Add introduction and final slides #403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 106 additions & 0 deletions Lesson_Materials/Class Introduction/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../common-revealjs/css/reveal.css">
<link rel="stylesheet" href="../common-revealjs/css/theme/white.css">
<link rel="stylesheet" href="../common-revealjs/css/custom.css">
<script>
// This is needed when printing the slides to pdf
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? '../common-revealjs/css/print/pdf.css' : '../common-revealjs/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<script>
// This is used to display the static images on each slide,
// See global-images in this html file and custom.css
(function() {
if(window.addEventListener) {
window.addEventListener('load', () => {
let slides = document.getElementsByClassName("slide-background");

if (slides.length === 0) {
slides = document.getElementsByClassName("pdf-page")
}

// Insert global images on each slide
for(let i = 0, max = slides.length; i < max; i++) {
let cln = document.getElementById("global-images").cloneNode(true);
cln.removeAttribute("id");
slides[i].appendChild(cln);
}

// Remove top level global images
let elem = document.getElementById("global-images");
elem.parentElement.removeChild(elem);
}, false);
}
})();
</script>

</head>
<body>
<div class="reveal">
<div class="slides">
<div id="global-images" class="global-images">
<img src="../common-revealjs/images/sycl_academy.png" />
<img src="../common-revealjs/images/sycl_logo.png" />
<img src="../common-revealjs/images/trademarks.png" />
</div>
<!--Slide 1-->
<section class="hbox" data-markdown>
# Welcome! Please take a seat
</section>
<!--Slide 2-->
<section class="hbox">
<div class="hbox" data-markdown>
## The ISC 25 Team
</div>
<div class="container">
<div class="col" data-markdown>
![SYCL](isc25-team.png "Your Tutorial Team")
</div>
</div>
</section>
<!--Slide 3-->
<section class="hbox">
<div class="hbox" data-markdown>
## Schedule
</div>
<div class="container">
<div class="col" data-markdown>
![schedule](isc25-schedule.png "Schedule")
</div>
</div>
</section>
<!--Slide 4-->
<section class="hbox">
<div class="hbox" data-markdown>
## Hands On Setup
</div>
<div class="container">
<div class="col" data-markdown>
![compiler-explorer](compiler-explorer.png "Compiler Explorer")
</div>
<div class="col" data-markdown>
* To reduce setup effort we will use Compiler Explorer
* There are links to the exercises and slides on the GitHub repo branch
* We'll explain how to access this
</div>
</div>
</section>
</div>
</div>
<script src="../common-revealjs/js/reveal.js"></script>
<script src="../common-revealjs/plugin/markdown/marked.js"></script>
<script src="../common-revealjs/plugin/markdown/markdown.js"></script>
<script src="../common-revealjs/plugin/notes/notes.js"></script>
<script>
Reveal.initialize({mouseWheel: true, defaultNotes: true});
Reveal.configure({ slideNumber: true });
</script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
190 changes: 190 additions & 0 deletions Lesson_Materials/Recap_and_Further_Learning/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../common-revealjs/css/reveal.css">
<link rel="stylesheet" href="../common-revealjs/css/theme/white.css">
<link rel="stylesheet" href="../common-revealjs/css/custom.css">
<script>
// This is needed when printing the slides to pdf
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? '../common-revealjs/css/print/pdf.css' : '../common-revealjs/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<script>
// This is used to display the static images on each slide,
// See global-images in this html file and custom.css
(function() {
if(window.addEventListener) {
window.addEventListener('load', () => {
let slides = document.getElementsByClassName("slide-background");

if (slides.length === 0) {
slides = document.getElementsByClassName("pdf-page")
}

// Insert global images on each slide
for(let i = 0, max = slides.length; i < max; i++) {
let cln = document.getElementById("global-images").cloneNode(true);
cln.removeAttribute("id");
slides[i].appendChild(cln);
}

// Remove top level global images
let elem = document.getElementById("global-images");
elem.parentElement.removeChild(elem);
}, false);
}
})();
</script>

</head>
<body>
<div class="reveal">
<div class="slides">
<div id="global-images" class="global-images">
<img src="../common-revealjs/images/sycl_academy.png" />
<img src="../common-revealjs/images/sycl_logo.png" />
<img src="../common-revealjs/images/trademarks.png" />
</div>
<!--Slide 1-->
<section class="hbox" data-markdown>
# Summary
</section>
<!--Slide 2-->
<section class="hbox">
<div class="hbox" data-markdown>
## 1. What is SYCL?
</div>
<div class="container">
<div class="col" data-markdown>
![SYCL](sycl_ecosystem.png "What is SYCL")
</div>
<div class="col" data-markdown>
* Single source, high-level, standard C++ programming model,
that can target a range of heterogeneous platforms
* Provides high-level abstractions over common boilerplate code
</div>
</div>
</section>
<!--Slide 3-->
<section class="hbox">
<div class="hbox" data-markdown>
## 2. Enqueueing a Kernel
</div>
<div class="container">
<div class="col">
<code><pre>
class my_kernel;

queue deviceQueue;
deviceQueue.submit([&](handler& cgh){

auto os = sycl::stream(1024, 128, cgh);

cgh.single_task&lt;my_kernel&gt;([=]() {
os << "Hello world!\n";
});
}).wait();
</code></pre>
</div>
<div class="col" data-markdown>
* Series of commands are enqueued via command groups
* Performed via `sycl::queue::submit`
* Commands are scheduled for execution on a device
* Kernels submitted as kernel functions, either as C++ lambdas or function objects
* There are restrictions on kernel code because of device limitations
* Can use a `sycl::stream` to write text on device
</div>
</div>
</section>
<!--Slide 4-->
<section class="hbox">
<div class="hbox" data-markdown>
## 3. Managing Data
</div>
<div class="container">
<div class="col">
<code><pre>

class my_kernel;
queue deviceQueue;

// Create a buffer and allocate USM memory
buffer&lt;int&gt; user_buffer{range{128}};
int* usm_ptr = malloc_device&lt;int&gt;(128, deviceQueue);

deviceQueue.submit([&](handler& cgh){
// Request access to buffer
accessor user_acc{user_buffer, cgh, write_only};

// USM pointer doesn't need to request access

cgh.single_task&lt;my_kernel&gt;([=]() {
user_acc[0] = 1;
usm_ptr[0] = 2;
});
}).wait();

</code></pre>
</div>
<div class="col" data-markdown>
* Two models for managing data: Buffer/accessor model and Unified Shared Memory
* SYCL separates the storage (buffer) and access of data (accessor)
* Different types of accessor provide different ways to access data
* In buffer/accessor model the scheduler takes care of data movement
* Access modes specify how to access data (read/write/no_init)
* USM memory can be allocated as host, device, or shared
* USM requires manual operations
</div>
</div>
</section>
<!--Slide 5-->
<section class="hbox">
<div class="hbox" data-markdown>
## 4. DATA PARALLELISM and ND-Range Kernels
</div>
<div class="container">
<div class="col" data-markdown>
![SYCL](../common-revealjs/images/ndrange.png "ND range")
</div>
<div class="col" data-markdown>
* Task parallelism: Executes separate tasks simultaneously
* Data parallelism: Performs the same task on multiple data elements
* Work-items perform computation, execute independently (threads)
* Work-items grouped into work-groups. Work-groups invoked within an ND-range. Work-items within a group can synchronize
* Each work-item has private memory, can't access others'
</div>
</div>
</section>
<!--Slide 6-->
<section class="hbox">
<div class="hbox" data-markdown>
## Further Resources
</div>
<div class="container">
<div class="col" data-markdown>
* The SYCL Academy "main" branch contains many more materials to learn from
* You can follow the guides to install SYCL on your own machine or cluster
* There is a free SYCL book that can be downloaded
* The sycl.tech website has a SYCL playground and lots of videos and resources
* You can find information about SYCL libraries for math and DNN to use alongside your SYCL code (see uxlfoundation.org or Google oneAPI)
* Search for oneAPI to find Jupyter notebook exercises in SYCL and using the oneAPI libraries
</div>
</div>
</section>
</div>
</div>
<script src="../common-revealjs/js/reveal.js"></script>
<script src="../common-revealjs/plugin/markdown/marked.js"></script>
<script src="../common-revealjs/plugin/markdown/markdown.js"></script>
<script src="../common-revealjs/plugin/notes/notes.js"></script>
<script>
Reveal.initialize({mouseWheel: true, defaultNotes: true});
Reveal.configure({ slideNumber: true });
</script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,42 @@ International" license.
This specific branch of SYCL Academy is being used for ISC25 and contains a subset
of the materials available in the main branch.

To clone this repository locally, use the following command:

`git clone --branch isc25 https://github.com/codeplaysoftware/syclacademy.git`

You can open the presentations by opening the index.html file in each folder under the "Lesson_Materials" folder.

## Lesson Curriculum

The SYCL Academy curriculum is divided up into a number of short lessons
consisting of slides for presenting the material and a more detailed write-up,
each accompanied by a tutorial for getting hands on experience with the subject
matter. The code is available in both the repository and as a Compiler Explorer link.

| Lesson | Title | Slides | Exercise | Repository | CompilerExplorer |
|--------|-------|--------|----------|------------|------------------|
| 01 | A Fast Introduction to SYCL | [slides][lesson-1-slides] | [exercise][lesson-1-exercise] | [source][lesson-1-source] [solution][lesson-1-solution] | [source][lesson-1-CEsource] [solution][lesson-1-CEsolution] |
| 02 | ND Range Kernels and Concepts | [slides][lesson-2-slides] | [exercise][lesson-2-exercise] | [source][lesson-2-source] [solution][lesson-2-solution] | [source][lesson-2-CEsource] [solution][lesson-2-CEsolution] |
| 03 | Data Flow with SYCL | [slides][lesson-3-slides] | [exercise][lesson-3-exercise] | [source][lesson-3-source] [solution][lesson-3-solution] |
| Lesson | Title | Slides | Exercise | Compiler Explorer Source |
|--------|-------|--------|----------|--------------------------|
| 01 | A Fast Introduction to SYCL | [slides][lesson-1-slides] | [exercise][lesson-1-exercise] | [source][lesson-1-CEsource] |
| 02 | ND Range Kernels and Concepts | [slides][lesson-2-slides] | [exercise][lesson-2-exercise] | [source][lesson-2-CEsource] |
| 03 | Data Flow with SYCL | [slides][lesson-3-slides] | [exercise][lesson-3-exercise] | [source][lesson-3-CEsource] |
| 04 | Recap and Further Learning | [slides][lesson-4-slides] | NA | NA |

If you really need to look at the solutions for the exercises go to [this page][isc25-solutions].

[lesson-1-slides]: ./Lesson_Materials/Fast_Track/
[lesson-1-exercise]: ./Code_Exercises/Asynchronous_Execution/README.md
[lesson-1-source]: ./Code_Exercises/Asynchronous_Execution/source.cpp
[lesson-1-solution]: ./Code_Exercises/Asynchronous_Execution/solution.cpp
[lesson-1-CEsource]: https://godbolt.org/z/Mxb5zj6zW
[lesson-1-CEsolution]: https://godbolt.org/z/Knn4ef9b4


[lesson-2-slides]: ./Lesson_Materials/Data_Parallelism/
[lesson-2-exercise]: ./Code_Exercises/Data_Parallelism/README.md
[lesson-2-source]: ./Code_Exercises/Data_Parallelism/source.cpp
[lesson-2-solution]: ./Code_Exercises/Data_Parallelism/solution.cpp
[lesson-2-CEsource]: https://godbolt.org/z/rWEee49rP
[lesson-2-CEsolution]: https://godbolt.org/z/TeY38q9vh

[lesson-3-slides]: ./Lesson_Materials/Data_and_Dependencies/
[lesson-3-exercise]: ./Code_Exercises/Data_and_Dependencies/README.md
[lesson-3-source]: ./Code_Exercises/Data_and_Dependencies/source.cpp
[lesson-3-solution]: ./Code_Exercises/Data_and_Dependencies/solution.cpp
[lesson-3-CEsource]: https://godbolt.org/z/ajErrMccv
[lesson-3-CEsolution]: https://godbolt.org/z/djc7zK9bG

[lesson-4-slides]: ./Lesson_Materials/Recap_and_Further_Learning/
[isc25-solutions]: ./Solutions/solutions.md
14 changes: 14 additions & 0 deletions Solutions/solutions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SYCL Academy @ ISC25 Solutions

If you are stuck, here is a list of the solution source files for the exercises, loaded into Compiler Explorer.


| Lesson | Title | Compiler Explorer Solution |
|--------|-------|----------------------------|
| 01 | A Fast Introduction to SYCL | [solution][lesson-1-CEsolution] |
| 02 | ND Range Kernels and Concepts | [solution][lesson-2-CEsolution] |
| 03 | Data Flow with SYCL | [solution][lesson-3-CEsolution] |

[lesson-1-CEsolution]: https://godbolt.org/z/Knn4ef9b4
[lesson-2-CEsolution]: https://godbolt.org/z/TeY38q9vh
[lesson-3-CEsolution]: https://godbolt.org/z/djc7zK9bG