Uninterpreted Functions: Their use in Code Transformation
Catherine Olschanowsky Mary Hall Michelle Strout
Uninterpreted Functions: Their use in Code Transformation - - PowerPoint PPT Presentation
Uninterpreted Functions: Their use in Code Transformation Catherine Olschanowsky Mary Hall Michelle Strout CHiLL-I/E Team, Collaborators, and Funding Mary Hall (University of Utah) Michelle Strout (University of Arizona) Catherine
Catherine Olschanowsky Mary Hall Michelle Strout
Mary Hall (University of Utah) Michelle Strout (University of Arizona) Catherine Olschanowsky (Boise State Univ.) Mahdi Soltan Mohammadi (Univ. of Arizona) Payal Nandi (University of Utah) Eddie Davis (Boise State University) Wei He (University of Arizona) Jongsoo Park, Hongbo Rong, Raj Barik (Intel) Anand Venkat (Intel, PhD in 2016 at Utah)
Inspector 1 (e.g. index set splitting) Inspector 2 (e.g. compact-and-pad) Irregular Computation Executor (Transformed Irregular Computation) Inspector K
Compile time Runtime
Composed Inspector Explicit Functions Explicit Functions Explicit Functions Programmer
CUDA-CHiLL CHiLL compiler Inspector/Executor API Index Arrays CHiLL Transformation Script Sparse Polyhedral Framework Compositions of Loop and Data Transformations
[Ding 99] [Mitchell 99] [Mellor-Crummey 01] [Han 06]
Faster, specifically optimized I/E Slower, compiler generated
A x y 4 7 9 3 1
// Dense matrix vector mult. for (i = 0; i < N; i++) { for (j = 0; j < N; j++) y[i] += A[i][j] * x[j]; } } // sparse matrix vector mult. (SpMV) for (i=0; i<n; i++) { for(k=rowptr[i];k<rowptr[i+1];k++){ y[i] += val[k]*x[col[k]]; } }
val: rowptr: col: 0 1 3 1 4 0 3
1 2 3 4 5
4 7 9 3 1 2 2 5 5 6 1 6 6 y = A*x
// SpMV for CSR (Compressed Sparse Row) for (i=0; i<n; i++){ for (k=rowptr[i]; k<rowptr[i+1]; k++){ y[i] += a[k]*x[col[k]]; }} // Inspector code NNZ = count( rowptr ) c = order( rowptr ) c_inv = inverse( c ) // Executor code // SpMV for COO (Coordinate Storage) for (k'=0; k'<NNZ; k'++) { y[c_inv[k'][0]] += a[c_inv[k'][1]]*x[col[c_inv[k'][1]]]; }
Old Iterators as Function
Omega+ IEGenLib