Stanford CS149, Fall 2024
PARALLEL COMPUTING
Time: Tues/Thurs 10:30-11:50am
Location: NVIDIA Auditorium
Instructors: Kayvon Fatahalian and Kunle Olukotun
Course Description

From smart phones, to multi-core CPUs and GPUs, to the world's largest supercomputers and web sites, parallel processing is ubiquitous in modern computing. The goal of this course is to provide a deep understanding of the fundamental principles and engineering trade-offs involved in designing modern parallel computing systems as well as to teach parallel programming techniques necessary to effectively utilize these machines. Because writing good parallel programs requires an understanding of key machine performance characteristics, this course will cover both parallel hardware and software design.

Lectures will be recorded for offline viewing via Canvas. We will have frequent discussions and student breakouts during live lecture.

The course staff will hold both in person and virtual office hours.

Instructors and CAs
[kayvonf at cs]
 
[kunle at cs]
 
Office Hours Calendar
Prerequisites

CS111: Operating Systems Principles is a strongly recommended prerequisite for CS149. If you have not taken CS111 and feel like you have the background to take CS149 (for example, due to similar classes at another school or via previous employment), please contact your friendly instructors and let's talk it over.

Concepts we expect you to be familiar with:

  • The idea that a compiled computer program is a sequence of machine instructions.
  • That a processor executes machine instructions, and the result of executing an instruction is the update of state stored in registers or memory.
  • The motivation for a modern memory hierarchy and it's implementation via registers, on-chip caches, off-chip memory, persistent storage.
  • You should be familiar with reading, writing, and debugging C/C++ code (basic C++ features like classes, STL vector types). Programming assignments in this class require debugging skill due to the challenges of debugging parallel code. The primary reason students struggle in CS149 is a lack of code debugging experience.
  • You should have enough programming experience/proficiency in C-like languages to pick up new C-like languages introduced throughout the class (languages such as CUDA, or ISPC)
  • We hope that you've had at least an introductory experience writing code that creates threads, e.g., via std::threads or pthreads in C/C++.
Textbook

There is no required textbook for CS149. However, you may find the following textbooks helpful. However, in general these days there's plenty of great parallel programming resources available for free on the web.

John L. Hennessy and David A. Patterson
Computer Architecture, Sixth Edition: A Quantitative Approach. Morgan Kaufmann, 2017
[ On Amazon ]

Jason Sanders
CUDA by Example: An Introduction to General-Purpose GPU Programming. 1st Edition. Addison-Wesley. 2010
[ On Amazon ]

David Kirk and Wen-mei Hwu
Programming Massively Parallel Processors, Second Edition: A Hands-on Approach. 2nd Edition. Morgan Kauffmann. 2012
[ On Amazon ]

Announcements via Ed Discussion

All class announcements will be made via our Ed Discussion forum. Everyone enrolled in the course via Canvas should be able to access this site.

Assignments, Projects, and Exams (What You Will Do!)

Programming assignments. Students will complete four programming assignments using parallel programming systems such as ISPC, OpenMP, and CUDA. You are not expected to know these languages/systems in advance of the course, you will pick them up as you go. Programming assignments can optionally be done in teams of up to two, but all teams both one-person and two-person teams will be graded the same. Each year there are students that decide to do all programming assignments by themselves, so it is perfectly acceptable to go through the class without a partner if you choose to do so. There will also be one optional "bonus" programming assignment at the end of the quarter that can be used to boost the grade of any prior programming assignment.

Written assignments. Students will complete six take-home written assignments. Like programming assignments, written assignments can optionally be done in teams of up to two. Written assignments are graded on a combination of correctness and effort.

Midterm exam. There will be a midterm exam. All on-campus (non-CGOE) students will be expected to be present for the midterm unless special arrangements are made in advance with the staff.

Final exam. There will be a final exam during the university designated final exam slot, which is 3:30pm on Thursday December 12th. In person (non-CGOE) students are expected to be present for the exam. CGOE students can take the exam remotely via standard CGOE protocols.

Grading
  • Programming Assignments (4): 11% + 15% + 15% + 15% = 56%
  • Written Assignments (5): 2.4% x 5 = 12%
  • Midterm Exam: 15%
  • Final Exam: 17%

Late day policy: Each student has a total of eight late days for use over the entire quarter on programming assignments only. You do not need to notify the staff that you are using late days. Just submit after the deadline and we will track late days used.

  • A student can extend an assignment deadline by one day using one point. (A team of two students can extend an assignment deadline by one day using one point from each student.)
  • If a student does not have remaining late day points, late hand-ins will incur a 15% penalty per day (up to the max number of late days allowed). We'll record points on a per-student basis, so if one student is ``out of points'' and the other is not, only the student out of late days will be assessed the penalty.
  • Unless special arrangements are made with the staff at least 72 hours in advance of the original assignment deadline, no programming assignments will be accepted more than FOUR DAYS after their posted deadline.
FAQ

Do I need a partner for assignments in CS149?

CS149 students will complete both written assignments and programming assignments during the quarter. Written assignments must be done with the partners assigned to you be the course staff. However, doing the programming assignments with a partner is optional. Each year a number of students decide to do all the programming assignments on their own because they think it will help them learn the material better. CS149 programming assignments take a lot of thought, but do not require writing a lot of code, and so it's reasonable for a single student to do all the required work. Note that all teams, regardless of whether they are one or two person teams, are graded the same.

I don't have a programming assignment partner but definitely want one, what should I do?

We understand that it can be hard to find partners in CS classes. We want everyone that wants to work with a partner to have the opportunity to do so. In the first week of class, the course staff will run a partner matching service that will ask students to fill out a survey and match students according to responses.

If you need to change partners or find a partner in the middle of the quarter, just reach out to the staff and we'll do our best to help you find someone. We are here to help!

Do I need to tell the staff that I am using late days on a programming assignment?

No, just submit your assignment. The submission will be time stamped and the staff will keep track of late days.

I got sick, had a busy week, had extra curricular activities, had a family event I want to attend, etc.? Can I get an extension?

You are going to have periods throughout the quarter where you cannot put much time in CS149. That's perfectly fine! Late days are there to allow you to adjust your deadlines. Given that you have a generous number of late days for the quarter, we expect you to manage those days according to your needs. We intend to only give students additional late days under exceptional circumstances (significant long-running illnesses, important family concerns, etc.) or in accordance with OAE designations. If you believe exceptional circumstances may be in play, we want to help! But please make the staff aware of your situation at least 72 hours prior to the impacted deadline. We are going to hold all students to the 72-advance notice rule and deny last-minute requests, unless the exceptional event happened during this last-minute period.

Office hours are busy and I'm having trouble getting the help I need. What can I do?

Office hours aren't the only time you can get help from the staff. Just reach out by posting on Ed or writing an email to the staff asking for an appointment for a 1-on-1 conversation. We'll make time to help!

Will lectures be recorded?

Yes, lectures are recorded by CGOE and available for offline viewing on Canvas. We try to make lectures participatory and have in-class discussions, so we hope that you will make an effort to attend lecture as much as possible and use the recorded lectures as review and reference.

Can I audit the class?

Please email one of the CAs and we will be happy to add you to Canvas as an observer.