Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Titanium Review: Domain Library Imran Haque Domain Library Imran Haque U.C. Berkeley September 9, 2004.

Similar presentations


Presentation on theme: "1 Titanium Review: Domain Library Imran Haque Domain Library Imran Haque U.C. Berkeley September 9, 2004."— Presentation transcript:

1 1 Titanium Review: Domain Library Imran Haque Domain Library Imran Haque http://titanium.cs.berkeley.edu U.C. Berkeley September 9, 2004

2 2 Titanium Review, Sep. 9, 2004 Imran Haque Outline Motivation for Domains Overview of the Domain library Upgrades to the Domain library Language-level changes Compiler changes Implementation improvements

3 3 Titanium Review, Sep. 9, 2004 Imran Haque Titanium Arrays (Grids) Designed for grid computation Computing arbitrary-width ghost regions for high-order solvers Support relaxation operators that work on every other element or on array interior Expressive Rectangular subarrays are also arrays Index sets are first-class concepts Modify index sets to produce aliased arrays

4 4 Titanium Review, Sep. 9, 2004 Imran Haque Domains overview {Rect}Domains live in N-dimensional discrete space Prior Experience: Generality can be powerful, but also slow – so don’t pay for unnecessary features RectDomain : N-dimensional hyper- rectangle Domain : arbitrary collection of points in N-space

5 5 Titanium Review, Sep. 9, 2004 Imran Haque Domain library features Strides Set operations Manipulation operations Size modification, translation translaterestrictslice (n dim to n-1) intersect Unit-stride2-stride

6 6 Titanium Review, Sep. 9, 2004 Imran Haque Domains example double [2d] grid=new double[[-5,-5]:[5,5]]; grid.set(0.0); double [2d] transp=grid.permute([2,1]); Domain dom=[[1,1]:[2,2]]+[[3,3]:[7,7]]; foreach (p in (grid.domain()*dom)) …

7 7 Titanium Review, Sep. 9, 2004 Imran Haque Motivation for Domain upgrades Domain library recognized as performance barrier in applications work AMR project Applications primarily using unit stride

8 8 Titanium Review, Sep. 9, 2004 Imran Haque Language and compiler changes Language Domains as Objects Naming changes Increased arity (formerly limited to 3d) Code generation Optimized construction

9 9 Titanium Review, Sep. 9, 2004 Imran Haque Implementation - RectDomain RectDomain Internal representation 25% less data, 2.5-6.5% speed boost Faster representation of the empty set Unit-stride optimizations Intersections are 2-3x faster other algorithms size() 20-40% faster Subset testing 20-40% faster

10 10 Titanium Review, Sep. 9, 2004 Imran Haque

11 11 Titanium Review, Sep. 9, 2004 Imran Haque Implementation - Domain Domain isRectangular 4-50x faster boundingBox 2x faster Internal representation (planned) Transition from linked list to simple array Caching of query values

12 12 Titanium Review, Sep. 9, 2004 Imran Haque

13 13 Titanium Review, Sep. 9, 2004 Imran Haque

14 14 Titanium Review, Sep. 9, 2004 Imran Haque

15 15 Titanium Review, Sep. 9, 2004 Imran Haque Benchmarking Notes All benchmarks performed on a single-CPU Pentium 4 system running Linux 2.4.22 (Fedora Core 1) tc command-line options: Narrow backend: -O –nobcheck –verbose –tc-flags “- Onoinline” Wide backend: -O –nobcheck –verbose –tc-flags “- Onoinline” –backend udp-cluster-uniprocess Runtime options: Narrow backend: defaults Wide backend: TI_SPAWNFN=‘L’, spawning 1 process


Download ppt "1 Titanium Review: Domain Library Imran Haque Domain Library Imran Haque U.C. Berkeley September 9, 2004."

Similar presentations


Ads by Google