Basic Information

  • Midterm takes place 16.04, 4-6pm
  • READ: Course description, prerequisites, goals, integrity
  • READ: FAQs
  • Read the slides of the first lecture
  • Course number: 263-0007, 8 credits
  • Lectures: M 10:15-12:00, HG F3; Th 9:15-10:00, HG G3; occasional substitute lectures: W 14:15-16:00 HG E5
  • The lectures are not streamed but recorded. Login info is different from nethz and has been sent by email.
  • Instructor: Markus Püschel (CAB H69.3, pueschel at inf)
  • Head TA:
    • Tommaso Pegolotti (TP)
  • TAs:
    • Mikhail Khalilov (MK)
    • Hicham Leghettas (ML)
    • Dionisios Spiliopoulos (DS)
    • Shien Zhu (SZ)
    • Emil Schätzle (ES)
    • Tommaso Bonato (TB)
  • Mailing lists:
    • For technical questions: fastcode@lists.inf.ethz.ch (emails to this address go to the lecturer and all TAs)
    • Forum to find project partner: fastcode-forum@lists.inf.ethz.ch (emails go to all students who have no partner yet and to Head TA)
  • Office Hours: (The first Office Hour takes place on Friday 28th of February.)
    • Mon 14:00-15:30: Hicham (CAB J71.6)
    • Tue 13:30-15:00: Tommaso (zoom)
    • Wed 11:00-12:30: Dionisios (CAB D72.2)
    • Fri 9:30-11:00: Shien (CAB J71.6)

Time Line

This list can be subject to minor changes, which would be announced in a timely manner.

Fr 07.03. Project team and project registered in the project system; start project anytime now
Th 06.03. HW1 due
Th 13.03. HW2 due
Th 27.03. HW3 due
Th 10.04. HW4 due
Wed 16.04. Midterm
week of 28.04. 1st one-on-one project meeting (minimal milestone: base implementation done, tested, performance plot, initial optimization plan, explain how you plan to divide the optimization work)
week of 19.05. 2nd one-on-one project meeting
week of 02.06. Project presentations
Fr 20.06. Project report due

Grading

Research Project

  • All projects have to be registered in our project system. This site contains a rough structure for your project and is also used later for updates.
  • How it works:
    • Weeks without homeworks should be used to work on the project
    • You select a numerical algorithm and create a correct (tested) implementation in C
    • You determine the arithmetic cost, measure the runtime and performance
    • You profile the implementation to find the parts in which most the runtime spent
    • Focusing on these you apply various optimization techniques from this class
    • You repeat the previous steps to create various versions with (hopefully) continuously better runtime
    • You use (exclusively) a repository that we provide to you
    • You analyze and reason about the performance behavior
    • You give a presentation and write a short paper about your work
  • Paper:
    • Maximal 7 pages (hard limit) without references, conference style, template and instructions below
    • Everybody reads this: report.pdf
    • Latex source: report.zip
    • Due date: 20.06 (in your git repository)
    • Name: (Team ID) + _report.pdf, e.g. 07_report.pdf
  • Presentation
  • Some tips on profiling tools
  • Rough timeline
    • Start project work: any time, the earlier the better
    • Assignment project advisor: around mid April
    • One-on-one project meetings: end of April and May, see above

Midterm

16.04., 16:15-18:00. Rooms: HG E3, E5, E7, F3, G5

  • All the material up to then is fair game but the overwhelming part will be what was covered in the homeworks
  • You can study previous exams below
  • No books, notes, laptops, cell phones, or other electronic devices are allowed. A dedicated calculator is allowed (i.e., not the one in your cell phone).

Previous exams:

Homework

Late policy: No deadline extensions, but you have 3 late days. You can use at most 2 on one homework. For example, submitting 20 minutes or 7 hours late costs one late day.

We will be using Moodle for the homeworks.

It may help to look at the homeworks of previous iterations of this course.

Homework Deadline Solution
Homework 0 as soon as possible  
Homework 1 Th March 6th, 5pm  
Homework 2 Th March 13th, 5pm  

Lectures Plan (subject to minor changes)

Date Content Other Material
17.02 Course motivation, overview, organization  
20.02 Cost analysis and performance  
24.02 Intel Skylake architecture/microarchitecture, operational intensity Intel earlier generations (Skylake, Haswell, etc), Sec. 7, Intel Ice Lake (Tiger Lake), Intel Golden Cove (Alder Lake), Agner Fog’s instruction tables (up to Tiger Lake, and Zen 4), see also uops (up to Alder-Lake, and Zen 4). For Apple ARM CPUs check out Dougall Johnson blogpost (M1), and the following semester project (M3).
27.02 Instruction level parallelism  
03.03 Compiler limitations, benchmarking  
06.03 SIMD vector instructions, AVX Intel intrinsics guide
10.03 SIMD vector instructions, AVX  
13.03 Compiler vectorization  
17.03 Locality, caches, blocking MMM  
20.03 Roofline model  
24.03 Linear algebra libraries, BLAS, ATLAS, Fast MMM  
27.03 Fast MMM continued, register renaming, virtual memory Comments on working set for TLB
31.03 Rest virtual memory and linear algebra, Sparse linear algebra, sparse MVM  
7.04 Discrete/fast Fourier transform  
14.04 Fast FFT, FFTW  
28.04 Spiral: DSL-based program generation for performance