A on the GPU - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

A on the GPU

Description:

Pass our data in as textures. Render quads in screenspace ... Pass 2: Pass in first pass' result. Add up all the pixels. Finding lowest value ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 14
Provided by: nic198
Category:
Tags: gpu

less

Transcript and Presenter's Notes

Title: A on the GPU


1
A on the GPU
  • by Nikhil Haldar-Sinha and Dan Marino

2
Outline
  • Why we care
  • The GPU
  • How to exploit it
  • Our Algorithm
  • Generation
  • Heuristics
  • Choosing the path
  • Conclusions

3
Why We Care
From Stream Programming Environments
Hanrahan, 2004.
4
The GPU
  • Streaming processor, SIMD
  • Parallel Processor
  • Specialized for graphics
  • No branching
  • Loops must be unrolled
  • No integer ALU
  • Meant to be completely linear

5
Fixed Function Pipeline
  • Transform Vertices from 3-space to screen space
  • Apply textures
  • Sort them so you know whats in the front
  • Give the pixel a color

6
Computation on the GPU
  • Rasterization is the part we change
  • Render to a bitmap instead of screen
  • Pass our data in as textures
  • Render quads in screenspace
  • Limitation Cannot read and write from a texture
    at the same time

7
Our Algorithm Overview
  • Representation in a texture
  • Fragment Shaders to calculate heuristics
  • Use the video card to find lowest value
  • Generate choices and control flow on the CPU

8
Representation
  • The Grid problem is a grid, so it easily fits
    into a 2d texture
  • Value is a color in a pixel
  • Values are set in the CPU

9
Heuristics (Pass 1)
  • Pass 1
  • Pass in a goal state texture
  • Pass in a current state texture
  • Using these two values, calculate the
    contribution to the heuristic for the current
    pixel
  • Pass 2
  • Pass in first pass result. Add up all the
    pixels.

10
Finding lowest value
  • Render each value at the same x, y location.
    Colorf(state)
  • zhg
  • Camera at x, y, -1, looking at x, y, 0.
  • Pixels will be sorted in hardware
  • Read the color back, and do f-1(Color) to get the
    state

11
Generation of Next Choices
  • This is done on the CPU
  • Create new textures
  • Repeat previous steps

12
Conclusion
  • Proper exploitation of the GPU requires
    parallelization of algorithms
  • A is difficult to parallelize. Most parts have
    to happen in sequence.
  • Possibly
  • Better use each pixel be a unit trying to
    move.
  • Problem No branching, loops must be unrolled

13
Questions?
Write a Comment
User Comments (0)
About PowerShow.com