amortised optimisation as a means to achieve genetic
play

Amortised Optimisation as a Means to Achieve Genetic Improvement - PowerPoint PPT Presentation

Amortised Optimisation as a Means to Achieve Genetic Improvement Hyeongjun Cho, Sungwon Cho, Seongmin Lee, Jeongju Sohn, and Shin Yoo Date 2017.01.30, The 50th CREST Open Workshop Offline Improvement Expensive Fig. 1. GP improvement of MiniSAT.


  1. Amortised Optimisation as a Means to Achieve Genetic Improvement Hyeongjun Cho, Sungwon Cho, Seongmin Lee, Jeongju Sohn, and Shin Yoo Date 2017.01.30, The 50th CREST Open Workshop

  2. Offline Improvement Expensive Fig. 1. GP improvement of MiniSAT. Tied to offline environment

  3. Environmental Factors We cannot anticipate the environment that the software will be executed; hence it is hard to optimise for it.

  4. Offline Optimisation selection crossover mutation … fitness evaluation One Generation

  5. Amortised Optimisation selection crossover mutation … … Persistence Layer Optimisation executed in micro-steps, each in-situ execution as a single fitness evaluation

  6. Amortised Optimisation Budget Controlled (will stop when run out) Genetic Improvement, out in the wild! Low Overhead (only microscopes)

  7. Does it work? We applied amortised optimisation to pypy , a tracing-JIT based python implementation.

  8. T racing JIT Parameters When to begin When to mark as hot? tracing? When to compile the bridge?

  9. PIACIN 1.Install the package. 2.Import the package 3. There is no step 3.

  10. Table 1. Benchmark user scripts used for the JIT optimisation case study Script Description Repeated method calls in Python bm call method.py Use django to generate 100 by 100 tables bm django.py Predict n -body planetary movements a bm nbody.py Solve the 8 queens problem bm nqueens.py bm regex compile.py Forced recompliations of regular expressions Regular expression matching benchmark adopted from V8 b bm regex v8.py Apply a Bayesian spam filter c to a stored mailbox bm spambayes.py Generate HTML tables using spitfire d library bm spitfire.py a Adopted from http://shootout.alioth.debian.org/u64q/benchmark.php?test= nbody&lang=python&id=4 . b Google’s Javascript Runtime: https://code.google.com/p/v8/ . c http://spambayes.sourceforge.net d A template compiler library: https://code.google.com/p/spitfire/

  11. Default Amortised Optimisation bm_regex_compile.py 14 14 14 ● ● ● 10 10 10 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 6 6 6 0 5 10 15 20 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 bm_spambayes.py ● 15 15 15 ● ● ● ● ● ● 10 10 10 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 5 5 5 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 5 10 15 20 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 bm_regex_v8.py ● ● ● ● ● ● 7.5 7.5 7.5 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 6.5 6.5 6.5 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 5 10 15 20 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95

  12. Default Amortised Optimisation 0.76 0.76 0.76 bm_call_method.py ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.70 0.70 0.70 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.64 0.64 0.64 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 5 10 15 20 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 ● ● ● bm_spitfire.py 21.0 21.0 21.0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 20.0 20.0 ● 20.0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 5 10 15 20 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 2.9 2.9 2.9 ● ● bm_django.py ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 2.6 2.6 2.6 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 2.3 2.3 2.3 ● ● ● ● ● 0 5 10 15 20 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95

  13. How about hardware? Let us consider matrix multiplication. Optimal block size depends on L1 size. } { } } { { x = Blocked Matrix Multiplication: smaller inner loop to fit everything into L1 cache.

  14. NIA 3 CIN Non-Invasive, Amortised and Autonomous Code Injection Annotation-based Event-driven dependency injection

  15. Evaluation Table 3. Information about CPUs for which BMM was optimised CPU Clock Frequency L1 Instruction Cache L1 Data Cache Intel Xeon W3680 a 3.33GHz 32KB 32KB Intel Core-i7 3820QM a 2.7GHz 32KB 32KB ARM1176 (BCM2835 SoC) b 250MHz 16KB 16KB a These Intel CPUs share data and instruction caches between two processor threads. b Raspberry Pi Model B, first edition.

Recommend


More recommend