[CS61C FA20] Lecture 32.3 - Flynn Taxonomy, SIMD Instructions: Flynn's Taxonomy — Transcript
Full transcript
- 0:00[Music]
- 0:09welcome back to our policy module
- 0:12so far we have explored the performance
- 0:14of our baseline application
- 0:16which was the matrix multiplication we
- 0:19have compared
- 0:20the throughput that we get for matrix
- 0:22multiplication when it's written in
- 0:23python
- 0:24versus c and we have seen the c is
- 0:26significantly faster
- 0:27than python the reason for that is
- 0:30python is a productivity language
- 0:32and it is interpreted so it is
- 0:35easier to write code in python
- 0:39but at the cost of performance
- 0:42interpreted means that it is not
- 0:44directly compiled there is something
- 0:46that
- 0:47comes in the way of executing every
- 0:50single one of these instructions and
- 0:52adds a bunch of other assembly
- 0:53instructions that need to be executed
- 0:55on the other hand c is compiled and
- 0:57compiles directly into the assembly and
- 0:59is much more
- 1:01efficient can we be more efficient in
- 1:03writing
- 1:04um sequential c code on
- 1:07a processor on a on a serial processor
- 1:10like the ones that we have
- 1:12examined so far yeah perhaps
- 1:15we can write assembly code and do better
- 1:18but in general compilers are pretty good
- 1:21nowadays
- 1:22it's not that easy to to beat them but
- 1:24still there is a chance
- 1:26um the other way how we can get speed
- 1:28ups is by
- 1:29trying to address that bottom um slow
- 1:32down that
- 1:33when we are working with the with larger
- 1:35matrices
- 1:38and but we can do that
- 1:42either in c or in assembly by using
- 1:45so-called blocking techniques
- 1:46and we might see them a bit later on
- 1:50in this module
- 1:54now how can we do actually faster
- 1:57well we can do things faster by using
- 2:00parallelism
- 2:01and one of the goals of parallelism is
- 2:05to essentially do the entire or
- 2:09most of that inner loop of matrix
- 2:11multiplication
- 2:13concurrently by having hardware that can
- 2:16do multiple multiplications
- 2:19at the same time but before we get into
- 2:22that
- 2:22let's take a look at different types of
- 2:24parallel hardware the
- 2:26that we can encounter so first there is
- 2:30an
- 2:30important thing to distinguish in
- 2:32parallelism between
- 2:33software and hardware they're generally
- 2:37orthogonal to each other so
- 2:38this table is picked straight from the
- 2:40book that compares
- 2:42an older processor that is strictly
- 2:45serial which was intel pentium 4 and
- 2:48then there is a modern processor more
- 2:50modern processor intel core i7
- 2:52that has parallel features in it so
- 2:55you know the same type of a code can be
- 2:58run on a
- 2:59serial processor or on a parallel
- 3:01processor
- 3:02and the speed up that we are going to do
- 3:05to
- 3:06to get is perhaps from using some of
- 3:09these
- 3:10um you know doing some of the inner
- 3:13loop concurrently now software can be
- 3:15running
- 3:16sequentially like our matrix
- 3:18multiplication
- 3:19regardless of what type of uh of a
- 3:21hardware we are running
- 3:23on or concurrently like our operating
- 3:25system now this is an operating system
- 3:27in this example is vista you might not
- 3:31even know what
- 3:32is uh vista it's an operating system
- 3:34that predates
- 3:35um windows 7 or
- 3:39windows 10 windows 7 and somewhere out
- 3:41there
- 3:42around windows xp there was
- 3:46vista as well what we have seen
- 3:49we use multi-programming to run multiple
- 3:52processes
- 3:54what it looks like concurrently even
- 3:56though
- 3:57we are running it on serial hardware
- 4:01so choice of hardware and software
- 4:04parallelism
- 4:06are generally independent concurrent
- 4:08software can
- 4:09run on serial hardware sequential
- 4:11software can run on parallel hardware
- 4:15[Music]
- 4:16flint's taxonomy which is what your
- 4:18address next is
- 4:20essentially a classification of parallel
- 4:22hardware so let's take a look at that
- 4:24this is named after professor
- 4:28michael flynn who is a professor
- 4:30emeritus at stanford
- 4:31university so he has
- 4:35classified different types of
- 4:37parallelism between
- 4:39the parallelism in data streams and
- 4:41instruction streams
- 4:43so there are four entries in this table
- 4:47that correspond to single instruction
- 4:50single data single instruction multiple
- 4:53data
- 4:54multiple instructions single data and
- 4:56multiple instructions multiple data
- 4:59let's take a quickly uh a look at those
- 5:02what we have encountered so far
- 5:04everything was single instruction single
- 5:06data
- 5:07that's how our single core sequential
- 5:09processors operated
- 5:12most of what we are going to be talking
- 5:14about in this module are
- 5:16simdi and mimdi architectures simdes
- 5:19single instruction multiple data
- 5:21mimds multiple instructions multiple
- 5:23data
- 5:25however most of the programs that you'll
- 5:27find nowadays
- 5:29are kind of a combination of that and
- 5:30they can be called single program
- 5:32multiple data and the idea there is that
- 5:36we're going to run a single program that
- 5:38is going to try to use multiple degrees
- 5:40of parallelism
- 5:41so it will be running of all the
- 5:43processors
- 5:44that have
- 5:48memdi multiple instructions and multiple
- 5:50data and there will be some cross
- 5:52processor
- 5:53coordination that we are going to see a
- 5:56bit later in this module
- 5:59cindy is a particular type of processors
- 6:02that
- 6:03has specialized hardware that
- 6:06can run multiple
- 6:10can operate on multiple data at the same
- 6:13time
- 6:13in so-called lock step
- 6:18fashion and that is very good for
- 6:22running these
- 6:25arrays so it can basically crank
- 6:29through one dimension of the array in
- 6:31one instruction
- 6:32and that's very useful not just for
- 6:33neural nets imaging but many of the
- 6:35scientific
- 6:36applications okay
- 6:39so let's quickly walk through all four
- 6:42entries that we have in this table
- 6:45first is the one that we have seen
- 6:47already seen so far
- 6:49this is the single instruction single
- 6:50data or system
- 6:52so there is a sequential processor that
- 6:54basically sequences
- 6:56through the instruction pool and
- 6:59matches it with the data that
- 7:02is in the memory and processes it one at
- 7:04a time
- 7:06so it's our traditional uniprocessor
- 7:09the second in class is simdi
- 7:14simdi is a type of computer that has
- 7:16multiple processing units
- 7:18these pu's are the processing units and
- 7:23it will essentially issue one
- 7:26instruction
- 7:27say add and it will operate on
- 7:31multiple data pairs at the same time in
- 7:33this case there would be
- 7:35four processing units
- 7:38that would be capable of doing four
- 7:40additions
- 7:42you know for for each add instruction so
- 7:45it would be
- 7:46essentially adding formal element vector
- 7:49to another
- 7:50for element vector then
- 7:53there is the third type that we
- 7:57see here which is mindy which are
- 8:00multiple instructions
- 8:01multiple data streams so we would be
- 8:04running
- 8:04multiple issuing multiple instructions
- 8:06at the same time that
- 8:08each one would be operating on multiple
- 8:11data
- 8:13this is generally not just one processor
- 8:16that does that this is generally a
- 8:20concept of multiple processors
- 8:22where each one of them is assembly
- 8:23processor that are operating
- 8:25concurrently
- 8:26so each processor issues its own
- 8:28instruction that
- 8:29runs on multiple data so these mending
- 8:33architectures are going to be again
- 8:35covered a little bit later in this
- 8:37module
- 8:37that involve multi-core processors and
- 8:40data centers or what we are going to
- 8:42call warehouse scale computers where
- 8:44there are many computers that
- 8:47are housed in the same building and
- 8:50finally
- 8:51the fourth entry in that table table is
- 8:53multiple instruction
- 8:55single data stream misty well that
- 8:59is not something that we really
- 9:01encounter nowadays and it's not
- 9:03something that we
- 9:03really need this is a concept of you
- 9:06know having the same
- 9:08set of data you know and
- 9:11then doing multiple things to that so
- 9:13it's like
- 9:14whether you're like would you like your
- 9:17eggs scrambled
- 9:19or sunny side up only say both
- 9:22so it does not always
- 9:26makes you know it is not something that
- 9:28we will
- 9:29frequently encounter as we want to do
- 9:31two different operations
- 9:32on the same data
- 9:37that's it for now we are going to dive
- 9:40next through the rest of this
- 9:43segment into simdi architectures but
- 9:47just after a quick break
About this transcript
This page contains the full transcript of [CS61C FA20] Lecture 32.3 - Flynn Taxonomy, SIMD Instructions: Flynn's Taxonomy by CS 61C Departmental, generated from the public captions YouTube serves with the video. The transcript has 1,273 words across 255 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.