kalljohn / syclacademy

SYCL Academy, a set of learning materials for SYCL heterogeneous programming

Home Page:https://sycl.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SYCL Academy

SYCL Academy

This repository provides materials that can be used for teaching SYCL. The materials are provided using the "Creative Commons Attribution Share Alike 4.0 International" license.

Don't know what SYCL is?

Contributing to SYCL Academy

Contributions to the materials are very gratefully received and this can be done by submitting a Pull Request with any changes. Please limit the scope of each Pull Request so that they can be reviewed and merged in a timely manner.

Supporting Organizations

Abertay University, Heriot Watt University, University of Edinburgh, TU Dresden, University of the West of Scotland, Universitat Innsbruck, Universidad de Concepcion and University of Salerno.

Lesson Materials

How to use the Materials

Simply clone this repository, then open the "index.html" file for the presentation you want to view. Your browser will have a "Full Screen" mode that can be used to run the presentation, use the right and left cursors to move forward and backward in the presentation.

An Introduction to SYCL

A presentation deck introducing SYCL, and how it can be used for parallel programming.

Recommended duration of talk: 30 minutes

Launching SYCL Kernels

A presentation deck explaining how to develop kernels using SYCL

Recommended duration of talk: 45 minutes

Handling SYCL Errors

A presentation deck explaining how to catch and understand errors that might be emitted by a SYCL application

Recommended duration of talk: 20 minutes

SYCL Device Topology Discovery

A presentation deck explaining how to find out what devices are available and how to select these devices using SYCL device topology.

Recommended duration of talk: 25 minutes

Configuring a SYCL Queue

A presentation deck explaining what SYCL queues, command groups and the command group handler are, and how the SYCL scheduler model works.

Recommended duration of talk: 25 minutes

Managing Data in SYCL

A presentation deck explaining how SYCL orders execution using data dependencies and how SYCL synchronizes data.

Recommended duration of talk: 20 minutes

Online Interactive Tutorial

Hosted by tech.io, this SYCL Introduction tutorial introduces the concepts of SYCL. The website also provides the ability to compile and execute SYCL code from your web browser.

Setting up Computers for SYCL

Machine Setup Instructions

ComputeCpp, a SYCL v1.2.1 conformant implementation by Codeplay Software provides setup instructions on developer.codeplay.com. There is more detailed information about what hardware is supported by ComputeCpp on the Platform Support page.

Other SYCL implementations can be found on the SYCL community website sycl.tech.

Setting up a Docker Container for Lab Machines

In order to more easily deploy a SYCL implementation onto a bank of machines in a university lab for example, a Docker container can be used to deploy on these machines. This ensures all the dependencies that are needed are installed on each machine.

An example of how to set up a Docker container:

For Intel CPU or GPU

Now create a DockerFile that uses these packages, an example of how this might be done is below. Please note this file is not tested or maintained regularly but shows the elements that need to be installed.

FROM ubuntu:18.04

RUN apt-get update
RUN apt-get install -y git
RUN apt-get install -y ninja-build
RUN apt-get install -y g++
RUN apt-get install -y python3
RUN apt-get install -y python3-pip
RUN apt-get install -y software-properties-common

RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
RUN apt-get update

RUN python3 -m pip install cmake

# install Intel OpenCL drivers from downloaded package
RUN tar -xvf l_opencl_p_18.1.0.015.tgz
RUN cd l_opencl_p_18.1.0.015
RUN chmod +x install.sh
RUN ./install.sh

# Download the Khronos OpenCL headers
RUN git clone https://github.com/KhronosGroup/OpenCL-Headers.git
RUN mv OpenCL-Headers/CL/ /opt/khronos/opencl/include

# Set up the ICD Loader
RUN mkdir -p /etc/OpenCL/vendors/ \
    && echo "$OCL_LIB/libintelocl.so" > /etc/OpenCL/vendors/intel.icd

# Create a directory for ComputeCpp
RUN mkdir /usr/local/computecpp
RUN cd /usr/local/computecpp

# Copy the ComputeCpp release package and extract it to /usr/local/computecpp
RUN cp Ubuntu-16.04-64bit.tar.gz . 
RUN tar -xvf Ubuntu-16.04-64bit.tar.gz

# Add the ComputeCpp location to the path on the machine
ENV PATH=OCL_INC:OCL_LIB:/usr/local/computecpp/bin:/usr/local/computecpp/include:/usr/local/computecpp/lib:${PATH}

ENV CC=gcc-8
ENV CXX=g++-8

SYCL and the SYCL logo are trademarks of the Khronos Group Inc.

About

SYCL Academy, a set of learning materials for SYCL heterogeneous programming

https://sycl.tech

License:Creative Commons Attribution Share Alike 4.0 International


Languages

Language:JavaScript 37.9%Language:CSS 35.4%Language:HTML 26.7%