CS343D: Domain-Specific Programming Models and Compilers

Home Course Info Prior Offerings

Course Description

This class will cover the principles and practices of domain-specific programming models and compilers for dense and sparse applications in scientific computing, data science, and machine learning. We will study programming models from the recent literature, categorize them, and discuss their properties. We will also discuss promising directions for their compilation, including the separation of algorithm, schedule, and data representation, polyhedral compilation versus rewrite rules, and sparse iteration theory.

Basic Logistics

Professor: Fred Kjolstad

CA: AJ Root

Quarter: Winter 2024

Lecture Times: Tue, Thu 10:30 AM - 11:50 AM

Lecture Location: Littlefield 107

Fred's office hours: Friday 11-12noon in Gates 486 (10-11am on Jan 12th)

AJ's office hours: Wednesday 3-4pm in Gates 4B common area

Assignments

Assignment 1: MiniAPL (DUE February 1st)

In this assignment you will implement a tiny language for dense matrix operations called MiniAPL. MiniAPL scripts consist of expressions that build dense tensors (N-dimensional arrays) and print them to the terminal. The parser and type-checker have already been implemented for you. Your job is to implement the LLVM code generation for the project. A more complete description of the project and starter code can be found at: https://github.com/cs343d/assignment1-MiniAPL-release. Solutions will be turned in via GitHub. Please make a private repository and add @rootjalex to have read-permissions. Please fill out this form to submit this assignment.

Assignment 2: Sparse Iteration Code Generation (DUE February 15)

In this assignment you will implement sparse code generation for computing over dense and compressed 1D arrays. This is a small subset of the original taco work. Your job is to implement merge lattice construction. A more complete description of the project and starter code can be found at: https://github.com/cs343d/assignment2-vector-taco-release. Solutions will be turned in via GitHub. Please make a private repository and add @rootjalex to have read-permissions. Please fill out this form to submit this assignment.

Essay (DUE February 29th)

The goal of the essay is for you to find and formulate a problem relevant to this course (in a very broad sense) that matters to you personally. The essay should be 3-5 pages in 11 point font. It should not propose a solution, but rather focus on a programming problem and its properties.

Project

The goal of the project is to implement a DSL or to extend an existing one. You may work in groups of two. You will have freedom to choose the domain you wish to work on. Please feel free find a way to do your research as the project (as long as it is related to the course.)

Grading

Students with Documented Disabilities

Students who may need an academic accommodation based on the impact of a disability must initiate the request with the Office of Accessible Education (OAE). Professional staff will evaluate the request with required documentation, recommend reasonable accommodations, and prepare an Accommodation Letter for faculty. Unless the student has a temporary disability, Accommodation letters are issued for the entire academic year. Students should contact the OAE as soon as possible since timely notice is needed to coordinate accommodations. The OAE is located at 563 Salvatierra Walk (phone: 723-1066, URL: https://oae.stanford.edu/.