Previous | Next --- Slide 15 of 47
Back to Lecture Thumbnails
cbfariasc

So ISPC tasks let the compiler worry about assigning the tasks to the threads and it assigns them dynamically?

cyb

@cbfariasc Yes, slides 18 mentions that ISPC runtime dynamically assigns tasks to worker threads.

jgrace

It seems like, while the programmer can explicitly make assignments, letting languages or runtimes take care of this will generally achieve faster speedups. This is because optimal assignments can be computed during runtime (aka dynamically) and they will always be equal to or better than what the programmer comes up with.

kayvonf

@jgrace -- that's right. Often it is the case that by expressing code at a higher level of abstraction, the programmer gives the compiler/runtime system the information it needs to make a good mapping decision. There are a lot of advantages to this. For example, expert engineers can implement the runtime/compiler, freeing the application programmer from needing to reason about the right parallel programming strategy for their machine. Further, if different decisions are preferred for different machines, then runtime implementations customized for different machines can parallelize the program differently without changes to the application code. As a result the application program is written in a performance portable manner, it runs well on different parallel machines.

Please log in to leave a comment.