How to Parallelize Your Own Language Using OpenCilk Components
PACT 2021 Tutorial
Tao B. Schardl, MIT
I-Ting Angelina Lee, WUSTL
Please note:
Times are Eastern Daylight Time (EDT)
To participate in the hands-on exercises, you will need to use
docker
.
Docker image for hands-on sections
(800MB).
Docker script for launching and running the docker image.
.
Docker clues
.
Slack channel for questions
.
Slides
.
Video
.
3:00 PM - Introduction
Hands-on: download docker image
3:15 PM - What is OpenCilk?
Basics of recursive fork-join parallel programming
Cilk keywords: cilk_spawn, cilk_sync, cilk_for
The serial-projection property
Cilk scheduling
Cilk programming hands-on exercise
Debugging race conditions
Determinacy races
Finding races using Cilksan
What is parallelism?
Work, span, and parallelism
Measuring parallel scalability using Cilkscale
Hands-on exercise using OpenCilk
4:15 PM - Break
4:30 PM - OpenCilk Runtime and Compiler Components
Cheetah runtime system
Work stealing and the work-first principle
Organization of the runtime
Cheetah Hands-On Exercise
OpenCilk compiler middle-end
Tapir representation of recursive fork-join parallelism
Compiler pipeline with Tapir
Optimizations on Tapir
Middle-end Hands-On Exercise
6:10 PM - Break
6:25 PM - Tools
Productivity tools: Cilksan and Cilkscale
Compiler instrumentation
Runtime components
Productivity Tools: Hands-On Exercise
7:00 PM - The End
PREREQUISITE KNOWLEDGE
Familiarity with LLVM compiler fundamentals; interest in parallel programming