1 / 5

Directed graph with “costs” on edges Find least-cost paths between all reachable vertex pairs

All-Pairs Shortest Paths. Directed graph with “costs” on edges Find least-cost paths between all reachable vertex pairs Several classical algorithms with Work ~ matrix multiplication Span ~ log 2 n Case study of implementation on multicore architecture: graphics processing unit (GPU).

miles
Download Presentation

Directed graph with “costs” on edges Find least-cost paths between all reachable vertex pairs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. All-Pairs Shortest Paths • Directed graph with “costs” on edges • Find least-cost paths between all reachable vertex pairs • Several classical algorithms with • Work ~ matrix multiplication • Span ~ log2 n • Case study of implementation on multicore architecture: • graphics processing unit (GPU)

  2. GPU characteristics • Powerful: two Nvidia 8800s > 1 TFLOPS • Inexpensive: $500 each But: • Difficult programming model: One instruction stream drives 8 arithmetic units • Performance is counterintuitive and fragile: Memory access pattern has subtle effects on cost • Extremely easy to underutilize the device: Doing it wrong easily costs 100x in time

  3. Recursive All-Pairs Shortest Paths Based on R-Kleene algorithm Well suited for GPU architecture: • Fast matrix-multiply kernel • In-place computation => low memory bandwidth • Few, large MatMul calls => low GPU dispatch overhead • Recursion stack on host CPU, not on multicore GPU • Careful tuning of GPU code C A D B + is “min”, × is “add” A = A*; % recursive call B = AB; C = CA; D = D + CB; D = D*; % recursive call B = BD; C = DC; A = A + BC;

  4. Execution of Recursive APSP

  5. APSP: Experiments and observations 128-core Nvidia 8800 Speedup relative to. . . 1-core CPU: 120x – 480x 16-core CPU: 17x – 45x Iterative, 128-core GPU: 40x – 680x MSSSP, 128-core GPU: ~3x Time vs. Matrix Dimension Conclusions: • High performance is achievable but not simple • Carefully chosen and optimized primitives will be key

More Related