Return to Video

Determining the Size of the Tiles - Intro to Parallel Programming

  • 0:00 - 0:04
    In this problem you need to divide your work up into chunks, in this case tiles.
  • 0:04 - 0:09
    We have a continuum between tiny tiles, lots of them, and fewer tiles where each
  • 0:09 - 0:14
    tile is sized to the maximum that can fit in a single thread block. And in this
  • 0:14 - 0:18
    particular problem bigger tiles, means less memory bandwidth, this is good.
  • 0:18 - 0:22
    Generally, then you want to make your tiles as big as can fit into a single
  • 0:22 - 0:25
    thread block, because that minimizes overall memory bandwidth. But not the
  • 0:25 - 0:29
    following to caveats, one you need to have at least as many thread blocks as you
  • 0:29 - 0:32
    have SMs in your GPU, because otherwise you'll have SMs sitting because
  • 0:32 - 0:36
    otherwise you'll have SMs sitting idle. Definitely, you want to make sure you
  • 0:36 - 0:39
    fill the machine with enough work to keep all the SMs busy, even if you have to
  • 0:39 - 0:43
    move a little bit this way on the continuum and size your tiles just a little
  • 0:43 - 0:47
    bit smaller. Two, if you're sitting at the right end of this continuum, it's
  • 0:47 - 0:51
    best for overall memory bandwidth. But often it turns out that you would
  • 0:51 - 0:58
    actually prefer to just maybe one tic to the left. This allows a small number,
  • 0:58 - 1:03
    say, two blocks to both be resident at a time. And that potentially gives better
  • 1:03 - 1:05
    latency hiding characteristics because you have more warps at the same time from
  • 1:05 - 1:07
    slightly different pieces of the program. It's certainly something that you
  • 1:07 - 1:12
    would want to tune carefully if you needed the fastest possible implementation.
Title:
Determining the Size of the Tiles - Intro to Parallel Programming
Description:

more » « less
Video Language:
English
Team:
Udacity
Project:
CS344 - Intro to Parallel Programming
Duration:
01:12

English subtitles

Revisions Compare revisions