Miloš Radić 12 0010 114 Introduction Statistics in computing Huge amounts of data Substantial number of operations required Potentially highly parallel Maxeler can give a significant speedup ID: 637277
Download Presentation The PPT/PDF document "Contingency table analyses" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Contingency table analyses
Miloš Radić 12/0010
1/14Slide2
Introduction
Statistics in computingHuge amounts of dataSubstantial number of operations required
Potentially
highly parallelMaxeler can give a significant speed-up!
2/14Slide3
Contingency Table Analysis of two
DistributionsMeasurement of association for two variables
Each sample has two variables we observe
We are given a contingency table for those two
We are interested in their relation to each other3/14
Variable A
Variable B
Number of samples with a specific
v
alue of A and BSlide4
Contingency Table Analysis of two Distributions
Let’s use the Chi-square testWe need all the row and column sums
This part of the algorithm is good for
Maxeler
Scalar computations - CPU
4/14Slide5
Sum of elements
Standard C implementation Initialize the sums with zeroes
Use two nested for loops to sum
Naive Maxeler implementationStraightforward copy of C code to Maxeler
Scheduling fails!
5/14Slide6
Sum of elements
We have an issue when summing rowsEvery tick we need the sum from the last tick
But addition has a delay of 12 ticks
6/14Slide7
Sum of elements
7/14
MUX
ADD
INPUT
Result after 12 ticks
Input every tick
Compile errorSlide8
Sum of elements
Simple solution – use Autoloop Offset
Next input only when the last sum is computed
Bad performance, pipeline is stalled frequently
8/14Slide9
Sum of elements
9
/14
MUX
ADD
INPUT
Input every 12 ticks
-
offset
Result after 12 ticks
Counter
=
o
ffset - 1Slide10
Sum of elements
Smarter solution – input transposition
We sum the colons using the original matrix
We sum the rows using the transposed matrix
10/14Slide11
Sum of elements
11/14
MUX
ADD
ORIGINAL
INPUT
-
NUM_ROW
MUX
ADD
TRANSPOSED
INPUT
-
NUM_COL
COLON SUM
ROW SUMSlide12
CONCLUSION
Idea of matrix transpositionIn this particular example no speed-up benefit
What it reveals is suggestive
but what it conceals is vital (same as a bikini)With more operations speed-up increases
12/14Slide13
References
Trifunovic, N., Milutinovic, V., Salom, J.,
Kos,A
.,
"Paradigm Shift in Big Data SuperComputing:DataFlow vs ControlFlow,"Journal of Big Data, 2015, 2:4 (10 May 2015).
Milutinovic, V., Salom, J., Trifunovic, N.,
Giorgi, R.,"Guide to DataFlow SuperComputing,"Springer, 2015.
13/14Slide14
Q&A
14/14