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. Prerequisites: CS143 or equivalent

Basic Logistics

Professor: Fred Kjolstad

CA: Chris Gyurgyik

Quarter: Winter 2025

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

Lecture Location: Lathrop 299

Fred's office hours: Thu 3-4PM, Gates 486

Chris's office hours: Fri 10-11AM, Gates 4B Common Area

Grading

Assignments

Assignment 1: MiniAPL (DUE January 30 11:59PM)

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 @cgyurgyik to have read-permissions. Please fill out this form to submit this assignment. (Note: This previously relied upon an archaic version of LLVM; I've updated this assignment to conform to modern LLVM. Please post on EdX if you run into any issues!)

Assignment 2: Sparse Iteration Code Generation (DUE February 13 11:59PM)

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 @cgyurgyik to have read-permissions. Please fill out this form to submit this assignment.

Essay (DUE February 27 11:59PM)

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.)

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/.)