CS 6463: Fundamentals of High Performance Optimization
Announcements
- Intel's SSE intrinsic reference is
here.
- Extended resubmit with explanation deadline for asg#2 until Monday,
Feb 9 at 11:59PM.
- Assignment 2 is due on 01/27/09
- Mandatory coding style is strict ANSI C (not C++) compliance, and at most
80 column lines.
- Assignment 1 is due on 01/20/09.
Course Description
This course will cover various areas of computer science whose understanding
is required to tune performance-critical kernels in the real world. It is
a hands-on course; the majority of student effort and grade will be determined
by programming. As such, it
should solidify the application of information gained in previous course work,
in particular, understanding how computer architecture affects program
efficiency on actual machines. It should be particularly useful for students
who plan to work in areas where program efficiency is of key importance,
including high performance computing, embedded systems,
visualization/graphics, and compilers.
Topics of interest include (but are not limited to) the following:
- Complexities of getting reliable and context-sensitive timings on actual
hardware in the real world.
- Overviews of several architecture areas critical to optimization,
including memory hierarchy, pipelining, superscalar exploitation, etc.
- Application of traditional optimizations (as used in compilers, but here
performed by hand), on various architectures
including: software pipelining, superscalar scheduling,
scalar expansion, blocking/tiling, and various array optimizations
(contiguous vs. strided vs. pointer to pointer access, TLB issues, etc).
- Basics of assembly programming (particularly x86) -- necessary to do
extremely low-level optimization, including SSE.
- Exploiting low-level architectural features, including SSE and prefetch.
Prerequisites
Computer architecture and programming at a low level
(ie., programming in a non-OOP and non-garbage collected language such as C,
Fortran or assembly). We will be programming in a unix environment, using
make. Send me e-mail if you lack these prerequisites or feel you are
weak in these areas, but would still like to take the course.
Textbooks
There will be no required textbook. We will make extensive use of online
resources.
Evaluation Criteria
Since this area of study is very hands-on, I would prefer to get the
overwhelming majority of the grade from programming assignments. Therefore,
so long as students appear to be working independently and are motivated enough
by the projects to learn the requisite material, the breakdown will be:
- 85% programming projects, including final project/presentation
- 10% written/oral quizzes,
- 5% class participation
- No written final
If I feel that students are not fully engaged by the programming projects,
I will put more emphasis on written testing:
- 60% programming projects, including final project
- 35% written exams, including final exam
- 5% class participation
For a more complete description, consult the
syllabus.
Administrative Information
Class Hours: T R 3:30-4:45PM.
Classroom : BB 3.03.02
Instructor :
Dr. Whaley.
Office : SB 4.01.12.
Office Hours: MW 3-4 PM
Students with disabilities:
If you have a physical, psychological, medical or learning disability that
may impact on your ability to carry out assigned course work, I would urge
that you contact University Disability Services (DS),
Multidisciplinary Studies Building, Room 2.03.18,
210-458-4157 (Voice), 210-458-4981 (TTY), 210-458-4980 (Fax),
homepage:
http://www.utsa.edu/disability/.
Please bring a letter to me from the DS indicating your need for academic
accommodations within the first week of class. The syllabus and other class
materials can be made available in alternative format upon request.
Academic Integrity:
Remember that the goal of programming or written assignments is to enhance your
programming skills and understanding of the topics under discussion.
Thus indulging in academic dishonesty results in poor understanding of the
material as well as being unfair to other students.
In case you have any questions about whether an act of collaboration
may be construed as academic dishonesty, please clarify the issue with the
instructor before you collaborate.
Academic dishonesty can result in a grade of 'F'.
- It is understandable that discussing a problem with other people may
lead to more insight into the issues involved. Thus discussing a problem in
assignments/homeworks in a general way with other people is fine. However,
discussing the solutions to the problem or showing/examining actual
code is NOT acceptable.
- Every student must write his/her own code and homework. Showing your
code or homework to members of other teams, giving it to them, or making it
accessible to them (e.g., by making the files world-readable) is academic
dishonesty.
- You are responsible for ensuring that your code/documentation/results
are adequately protected and not accessible to other teams. Change permissions
of your working directory to 0700 ('chmod 0700 <directory>).
- Consulting code from a textbook, or from the Internet, in order to
understand specific aspects of your assignment is fine. However, copying
entire code or large parts of such code will be considered academic dishonesty.
If you borrow small parts of code from these sources, you must acknowledge
this in your submission and additionally you must clearly understand and be
able to explain how the code works. If you cannot explain your own code
in detail, it will be graded as zero.
Why should I be interested in this course?
First, let us get the mercenary reasons out of the way: I have money to support
at least two students on full research assistanships, and all of that research
requires this class as a background. Therefore, it is my hope to find two
R.A.'s from this course. If you are presently in need of support and/or
an advisor, you should take and do well in this course! The grants I have in
this area call for several projects which are ideal master's level
projects/thesis, so I am willing to support motivated master's students.
Additionally, if this kind of work interests you, I have industry contacts
that could lead to internships. Apple computer has even expressed interest
in supporting a student with a mixed internship/fellowship to do this
kind of work. Further, since this area of research is something
I'm fairly well known in, I have in the past been approached by several
companies to recommend people for permanent positions, and I'm limited
in my recommendation to people or students that I've directly worked with.
This is also the only course that I've had a former student write to tell
me got him a job (at NVIDIA).
As for the topic, this course covers the the basics of high performance
optimization in the real world. Therefore,
if you dislike programming, or if your favorite words include "lemma" and
"proof by induction", then you should avoid this class like the plague.
On the other hand, if you entered CS
because you love to code, if you wonder how the machine really
works in practice, and how the computer architecture you have read about
affects actual execution, then this is the course for you.
The programming assignments are designed to help you understand how to achieve
high performance in the real world. You will be able to see the effects of
optimization immediately, and will find that formerly abstract concepts
come into much greater focus (and are a good deal more enjoyable in
implementation) when their application results in noticable speedups on
real-world kernels. This more concrete understanding should allow you
to more fully grasp principles of critical importance in architecture,
compilers, and high performance computing.
We will also learn applied assembly in this course. While the days of
wholesale assembly coding are over, tight kernel loops must often still be
programmed in assembly for decent performance, as we will see. More
generally, knowing assembly allows a compiler writer to better tune the
compilation framework, and the casual programmer to diagnose performance
(or indeed fatal) bugs caused by compilers.
Finally, there is quite a bit of fun in just making things run fast. This
is the modern day equivalent of learning how to soup up your family sedan
so that it can run at 350 MPH: only a very few people actually need to
do it, but it sure is neat. If you've ever wanted to sneer at the local
gentoo linux user as "doing the best an uninformed noobie can hope for, I
guess", then this is certainly the class for you.
Useful Links: