Mitigating the Compiler Optimization Phase-Ordering Problem using - - PowerPoint PPT Presentation

mitigating the compiler optimization phase ordering
SMART_READER_LITE
LIVE PREVIEW

Mitigating the Compiler Optimization Phase-Ordering Problem using - - PowerPoint PPT Presentation

Mitigating the Compiler Optimization Phase-Ordering Problem using Machine Learning Sameer Kulkarni & John Cavazos Intro - Why we need code optimization? - Prog. Language design flaw - e.g. goto statement in C/Cpp - People are evil and


slide-1
SLIDE 1

Mitigating the Compiler Optimization Phase-Ordering Problem using Machine Learning

Sameer Kulkarni & John Cavazos

slide-2
SLIDE 2

Intro

  • Why we need code optimization?
  • Prog. Language design flaw
  • e.g. goto statement in C/Cpp
  • People are evil and chaotic
  • e.g. define unused variables inside a loop
slide-3
SLIDE 3

Intro

  • What do we have so far?
  • Optimization option with fixed order
slide-4
SLIDE 4

Intro

  • What do we have so far?
slide-5
SLIDE 5

Intro

  • What do we have so far?
  • Optimization option with fixed order
  • Genetic algorithm that takes care of order
slide-6
SLIDE 6

Results from GA

slide-7
SLIDE 7

Problem with GA

  • Expensive searching time for best result
  • No fine-grain method level optimization
  • Unless you have method level timer
slide-8
SLIDE 8

Possible solutions

  • Predict the complete sequence
  • Predict the current best optimization
slide-9
SLIDE 9

Possible solutions

  • Predict the complete sequence
  • Predict the current best optimization
  • Markov Property
slide-10
SLIDE 10

NEAT

  • Neuro-Evolution of Augmenting Topologies
  • GA with ANN flavor
slide-11
SLIDE 11

NEAT

slide-12
SLIDE 12

The ANN of NEAT

  • Takes feature as input, predict best optimization to

apply

  • Sometimes the second best option to avoid dead loop
slide-13
SLIDE 13

The ANN of NEAT

slide-14
SLIDE 14

Implementation

  • 60 ANNs each generation
  • 300 generations
  • Trained on seven benchmarks from the Java Grande

benchmark suite

  • Tested on SPECjvm98, SPECjvm2008, and DaCapo
slide-15
SLIDE 15

Result from NEAT

slide-16
SLIDE 16

Result from NEAT

slide-17
SLIDE 17

GA vs NEAT

slide-18
SLIDE 18

GA vs NEAT

  • Costs for training GAs and NEAT
  • GA : 11.4 days
  • NEAT : 13.2 days
  • GA per benchmark : 70 days
slide-19
SLIDE 19

GA vs NEAT