Neural Network Assisted Tile Size Selection
Mohammed Rahman, Louis-Noël Pouchet and P . Sadayappan
- Dept. of Computer Science and Engineering
Ohio State University
Neural Network Assisted Tile Size Selection Mohammed Rahman, - - PowerPoint PPT Presentation
Neural Network Assisted Tile Size Selection Mohammed Rahman, Louis-Nol Pouchet and P . Sadayappan Dept. of Computer Science and Engineering Ohio State University June 22, 2010 iWAPT 2010 Workshop Berkeley, USA Introduction: iWAPT10
Ohio State University
Introduction: iWAPT’10
Ohio State 2
Problem Statement: iWAPT’10
Ohio State 3
Problem Statement: iWAPT’10
◮ Operates on arbitrary affine-control loops (imperfectly nested) ◮ Produce good quality code ◮ Even expose pipeline-parallelism if needed ◮ Software (from OSU): Pluto, PrimeTile/DynTile/PTile Ohio State 4
Problem Statement: iWAPT’10
Ohio State 5
Problem Statement: iWAPT’10
0.1 0.2 0.3 0.4 0.5 0.6 1:1:1 4:2:40 8:4:500 12:8:30 16:10:300 20:16:12 25:30:200 30:40:8 35:48:128 42:100:4 48:128:64
Execution Time in Seconds Tile Sizes ( Ti:Tj:Tk) fdtd-2d: Performance distribution with Tile Size configurations
0.1 0.2 0.3 0.4 0.5 0.6 0.7 1:1:1 4:2:40 8:4:500 12:8:30 30:10:300 40:16:12 64:30:200 128:40:8 200:48:128 300:100:4 500:128:64
Execution time in Seconds Tile sizes- Ti:Tj:Tk dsyr2k: Performance Distribution with Tile Size Configurations
◮ {1,2,4,6,8,10,12,16, 30,32,40,48,64,100,128,
Ohio State 6
Performance Prediction: iWAPT’10
Ohio State 7
Performance Prediction: iWAPT’10
Ohio State 8
Performance Prediction: iWAPT’10
0.1 0.2 0.3 0.4 0.5 0.6 0.7 10:12:8 16:2:8 12:1:48 45:128:6 20:2:16 12:400:8 32:4:4 30:64:150 10:1:256 16:400:400 40:600:12
Execution Time in Seconds Tile Sizes (Ti:Tj:Tk) fdtd-2d: Predicted versus Actual Performance ExTime (Actual ) ExTime (Predicted)
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 8:4:64 600:128:32 64:4:16 10:400:500 128:2:300 256:200:256 100:40:300 30:300:300 40:10:4 100:300:12 6:12:1 Execution Time in seconds Tile sizes - Ti:Tj:Tk
dsyr2k : Predicted versus Actual Performance
ExTime(Actual) ExTime(Predicted)
Ohio State 9
Performance Prediction: iWAPT’10
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 12:12:16 32:2:128 64:40:16 2:10:1 1:32:256 256:64:4 10:256:12 4:500:10 30:64:400 6:200:500 256:400:16 Execution Time in Seconds Tile sizes ( Ti:Tj:Tk)
lu: Predicted versus Actual Performance
ExTime (Actual) ExTime (Predicted) 0.5 1 1.5 2 2.5 3 3.5 1:1:1 4:2:40 8:4:500 12:8:30 30:10:300 40:16:12 64:30:200 128:40:8 200:48:128 300:100:4 500:128:64
Execution Time in Seconds Tile Sizes (Ti:Tj:Tk) dgemm: Predicted versus Actual Performance ExTime (Actual) ExTime (Predicted) Ohio State 10
Performance Prediction: iWAPT’10
Ohio State 11
Tile Size Selection: iWAPT’10
◮ Low number of empirical runs ◮ Good convergence, good variability ◮ General enough to work on arbitrary user codes Ohio State 12
Tile Size Selection: iWAPT’10
1
2
3
4
5
6
Ohio State 13
Tile Size Selection: iWAPT’10
Ohio State 14
Tile Size Selection: iWAPT’10
doitgen gemm syr2k lu 2d-jacobi fdtd-2d 1% R-best 100% 99.86% 98.15% 99.89% 99.91% 97.75% R-average 98.71% 96.29% 94.80% 92.19% 94.10% 84.15% R-worst 95.35% 69.64% 89.81% 40.63% 17.69% 31.02% ANN-best 100% 99.86% 100% 100% 99.91% 100% ANN-average 98.89% 96.35% 96.01% 92.62% 98.51% 84.50% ANN-worst 97.26% 82.93% 89.79% 79.68% 94.23% 66.53% 2% R-best 99.97% 99.86% 98.71% 99.89% 100% 100% R-average 98.71% 96.42% 94.80% 92.87% 97.60% 84.10% R-worst 86.49% 67.89% 88.20% 45.29% 55.98% 27.30% ANN-best 100% 99.86% 100% 100% 100% 100% ANN-average 98.89% 96.76% 96.69% 95.34% 98.55% 88.61% ANN-worst 97.26% 89.83% 89.65% 85.80% 94.17% 60.65% 3% R-best 99.97% 99.86% 98.71% 99.89% 100% 100% R-average 98.77% 96.47% 94.80% 94.27% 98.39% 85.47% R-worst 94.89% 63.58% 87.99% 61.24% 84.54% 47.99% ANN-best 99.97% 99.86% 100% 100% 100% 100% ANN-average 98.93% 97.14% 97.17% 95.34% 98.74% 91.45% ANN-worst 97.64% 91.01% 92.27% 85.80% 94.50% 63.34% 4% R-best 99.97% 99.86% 98.71% 99.89% 100% 100% R-average 98.80% 96.65% 94.93% 92.19% 98.41% 85.55% R-worst 96.86% 69.73% 88.57% 52.03% 82.47% 43.74% ANN-best 100% 99.86% 100% 100% 100% 100% ANN-average 98.99% 97.67% 97.20% 95.79% 98.90% 93.55% ANN-worst 98.28% 93.65% 92.66% 85.80% 94.50% 79.26%
Ohio State 15
Tile Size Selection: iWAPT’10
Ohio State 16
Tile Size Selection: iWAPT’10
◮ Strong variability improvement over naive random approach ◮ 90+% efficiency using < 2% of the space, likely can be improved further
◮ Categorize benchmarks reg. the performance distribution shape ◮ Dataset size
◮ Reduce the training time ◮ problem: ANN configuration Ohio State 17
Acknowledgements: iWAPT’10
Ohio State 18