Geometry of Arrays: Mathematics of Arrays and ycalculus - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Geometry of Arrays: Mathematics of Arrays and ycalculus

Description:

College of Computing and Information University at Albany, State University of New York ... General-radix, multiple-dimension FFT optimized over cache and processors ... – PowerPoint PPT presentation

Number of Views:152
Avg rating:3.0/5.0
Slides: 23
Provided by: jimray
Category:

less

Transcript and Presenter's Notes

Title: Geometry of Arrays: Mathematics of Arrays and ycalculus


1
Geometry of Arrays Mathematics of Arrays and
y-calculus
  • Lenore R. Mullin
  • Computer Science Department
  • College of Computing and Information University
    at Albany, State University of New York

2
Overview
  • Mathematics of Arrays (MoA) an algebraic system
    for dealing with arbitrary multi-dimensional
    arrays
  • y-calculus reducing a complicated set of array
    operations to direct indexing of the original
    array
  • Elimination of temporary arrays significant
    enhancement in speed and reduction of memory
    requirements
  • Example block decomposition lifts (raises) the
    dimension of the a array

3
Reshape Operator

2-dimensional
Becomes 4-dimensional
4
Block Decomposition
2-dimensional
Viewed as 4-dimensional
5
Array shapes
  • Shape operator r returns a vector containing the
    lengths of each dimension
  • First vector (two-dimensional)
  • Second vector (four-dimensional)

6
Transpose operator
  • Transpose operator f permutes the dimensions

7
y-operator
  • The y operator extracts a component of the array
  • Full index extracts an element
  • Partial index extracts a sub array

8
Reshape operator
  • The process of lifting the dimension is carried
    out with the reshape operator
  • We write
  • And

9
Hypercube Representation
  • The arrays and are examples of
    hypercubes
  • Often array operations simplify in the hypercube
    representation
  • In a hypercube all dimensions have length 2
  • For an arbitrary array B we write

10
Product operator
  • The product operator p returns an integer equal
    to the product of the elements of a vector
  • The total number of elements in A is
  • Number of hypercube dimensions

11
Composing operations
  • The hypercube representation of A is thus
    written
  • Likewise
  • Lastly

12
Big Picture y-calculus
  • Multiple operations acting on original array
    (previous slide)
  • Each operation defined in terms of its action on
    the indices of the array
  • By applying all operator definitions we
    y-reduce the composite operations
  • Final result prescription (operational normal
    form (ONF)) for indexing operations on original
    array

13
y-reduction
  • By selecting the th component of the
    two-dimensional array
  • We obtain the ONF for all 0ltilt2,0ltjlt2
  • (20)(20)(20) (20)0, (20)(20)(20)
    (21)1,
  • (20)(21)(20) (20)4, (20)(21)(20)
    (21)5
  • NOTE a is the row major layout of A.

14
Temporal Index Composition
  • Usual methods Pipeline multiple temporal
    operations
  • LU followed by QR for example
  • Decompose LU
  • Map to Processors
  • Execute
  • Start the pipeline
  • Set up for QR
  • Decompose
  • Map to processors
  • Execute
  • Feed pipeline

15
Temporal Index CompositionLU Decomposition
3
2
3
2
1
3
1
2
3
2
T0
T1
T2
1
16
LU to QR(or anything else)
  • Think of it as indexing
  • Temporal index 0 1 2
  • Then again with QR temporal index 0 1 2
  • Then again with something else index 0 1 2
  • Formulate temporal index as an array
  • index like processors or anything else
  • Consequently temporal indices can be
  • Transposed to produce
  • 0 0 0
  • 1 1 1
  • 2 2 2

17
3
3
T0
3
3
2
2
T1
2
2
T2
1
1
1
1
18
Temporal Index Composition
  • Without transpose Data moves around connecting
  • networks.
  • Multiple decompositions and communication
  • Filling and emptying pipeline causes delays
  • With transpose
  • One decomposition
  • Mimimal data flow
  • Highest Performance

19
Impact efficiency and programming ease
  • Efficiency through direct indexing access we
    eliminate temporary arrays allowing BIGGER
    PROBLEMS
  • Minimizing operations significant speed
    enhancement
  • Programming ease ONF directly translated into
    code (no thinking or hackery)
  • Recent FFT cache optimization with design (ONF)
    in handcode built in ONE DAY and it WORKED!!

20
Mathematical Reasoning
  • Same mathematics used to describe the problem as
    is used to describe the organization of the
    machine
  • Machine decomposition over levels of memory,
    processors, networks, FPGAs in terms of array
    dimensions
  • Provability two designs leading to the same ONF
    are equivalent!

21
Success to date
  • This approach applied to many operations
    ubiquitous across science and engineering
    disciplines
  • FFT, QR decomposition, LU decomposition
  • Digital signal processing RADAR (MIT Lincoln
    Labs)
  • Most recent FFT cache optimization factor of
    FOUR speedup over previous records (next talk)

22
Ongoing Research
  • General-radix, multiple-dimension FFT optimized
    over cache and processors
  • Application-specific hardware programming hybrid
    software/hardware (FPGA) calculations
  • Grid computing
  • Large-scale materials simulations with
    density-functional theory
  • Quantum computing and quantum algorithms (Density
    Matrix naturally expressed as a hypercube and
    qubits as indices(talk follows).
Write a Comment
User Comments (0)
About PowerShow.com