synapse
play

SYNAPSE with Metasketches POPL 2016 James Bornholt Emina Torlak - PowerPoint PPT Presentation

f a i c t t r A C o m p * * l e t t n e e * A t * s i W s E n e L o l l C C P D * o O * e c s u P u m e E e R n * o t e v t d y s a E * a d l e u t a Optimizing Synthesis


  1. f a i c t t r A C o m p * * l e t t n e e * A t * s i W s E n e L o l l C C P D * o O * e c s u P u m e E e R n * o t e v t d y s a E * a d l e u t a Optimizing Synthesis SYNAPSE with Metasketches POPL 2016 James Bornholt Emina Torlak Dan Grossman Luis Ceze University of Washington

  2. f a i c t t r A C o m p * * l e t t n e e * A t * s i W s E n e L o l l C C P D * o O * e c s u P u m e E e R n * o t e v t d y s a E * a d l e u t a Optimizing Synthesis SYNAPSE with Metasketches d e t a m o POPL 2016 t u A r o f e t a m i x o r p p A James Bornholt g n i m m a r Emina Torlak g o r P Dan Grossman Luis Ceze University of Washington

  3. Approximate computing in the future

  4. Approximate computing in the future Precise Program

  5. Approximate computing in the future Precise Acceptability Program Criteria

  6. Approximate computing in the future Approximation Specification

  7. Approximate computing in the future Approximation Specification Magical Approximate Compiler

  8. Approximate computing in the future Approximation Specification Magical Approximate Compiler Approximate Program

  9. Synthesis finds programs automatically Specification Program Synthesis Program

  10. Synthesis finds programs automatically f ( x ) = 4 x + 1 Specification Program Synthesis Program

  11. Synthesis finds programs automatically f ( x ) = 4 x + 1 Specification Program Synthesis Program 4*x + 1

  12. Synthesis finds programs automatically f ( x ) = 4 x + 1 Specification Program Synthesis Program 4*x + 1 (x << 2) + 1

  13. What if synthesis doesn’t work? Specification Program Synthesis Program

  14. What if synthesis doesn’t work? f ( L, k ) = Search ( L, k ) Specification Program Synthesis Program

  15. What if synthesis doesn’t work? f ( L, k ) = Search ( L, k ) Specification Program Synthesis Program

  16. What if synthesis doesn’t work? f ( L, k ) = Search ( L, k ) Restricts the space of Syntactic candidate programs Specification Template (e.g. sketch, CFG) Program Synthesis Program

  17. What if synthesis doesn’t work? f ( L, k ) = Search ( L, k ) Restricts the space of Syntactic candidate programs Specification Template (e.g. sketch, CFG) Syntax-Guided Synthesis Program

  18. What if synthesis doesn’t work? f ( L, k ) = Search ( L, k ) Restricts the space of Syntactic candidate programs Specification Template (e.g. sketch, CFG) Syntax-Guided Synthesis Linear search Program Binary search

  19. What if synthesis doesn’t work? f ( L, k ) = Search ( L, k ) Restricts the space of Syntactic candidate programs Specification Template (e.g. sketch, CFG) Syntax-Guided Synthesis Linear search Program Binary search 7.1 MB program

  20. What if synthesis doesn’t work? Selects the solution f ( L, k ) = Search ( L, k ) with minimal cost Cost Syntactic Specification Function Template Syntax-Guided Synthesis Linear search Program Binary search 7.1 MB program

  21. What if synthesis doesn’t work? Selects the solution f ( L, k ) = Search ( L, k ) with minimal cost Cost Syntactic Specification Function Template Optimal Synthesis Linear search Program Binary search

  22. What if synthesis doesn’t work? Selects the solution f ( L, k ) = Search ( L, k ) with minimal cost Cost Syntactic Specification Function Template Optimal Synthesis Program

  23. Metasketches o ff er control over synthesis Specification Optimal Synthesis Program

  24. Metasketches o ff er control over synthesis Guides the search towards good solutions Specification Metasketch Optimal Synthesis Program

  25. Metasketches o ff er control over synthesis Guides the search towards good solutions 1. Metasketches Specification Metasketch 2. Solving Optimal Synthesis 3. Results Program

  26. Metasketches o ff er control over synthesis Guides the search towards good solutions 1. Metasketches Specification Metasketch 2. Solving Optimal Synthesis 3. Results Program

  27. Metasketches Explicit control over search strategy

  28. Synthesizing straight-line SSA programs max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) o2 = ?? op (?? a , ?? a , ?? a ) return o2

  29. Synthesizing straight-line SSA programs Operations: +, -, <, if, … max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) o2 = ?? op (?? a , ?? a , ?? a ) return o2

  30. Synthesizing straight-line SSA programs Operations: +, -, <, if, … max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) o2 = ?? op (?? a , ?? a , ?? a ) return o2 Inputs + earlier outputs

  31. Synthesizing straight-line SSA programs max(x, y): o1 = >(x, y) o2 = ?? op (?? a , ?? a , ?? a ) return o2

  32. Synthesizing straight-line SSA programs max(x, y): o1 = >(x, y) o2 = ite(o1, x, y) return o2

  33. Synthesizing straight-line SSA programs max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) o2 = ?? op (?? a , ?? a , ?? a ) return o2

  34. Synthesizing straight-line SSA programs max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 2 o2 = ?? op (?? a , ?? a , ?? a ) return o2

  35. Synthesizing straight-line SSA programs max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 1 return o1 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 2 o2 = ?? op (?? a , ?? a , ?? a ) return o2 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 3 o2 = ?? op (?? a , ?? a , ?? a ) o3 = ?? op (?? a , ?? a , ?? a ) return o3 S 4 S 5 S 6 S 7 S 8 S 9 …

  36. Synthesizing straight-line SSA programs max(x, y): Unbounded space of o1 = ?? op (?? a , ?? a , ?? a ) candidate programs S 1 return o1 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 2 o2 = ?? op (?? a , ?? a , ?? a ) return o2 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 3 o2 = ?? op (?? a , ?? a , ?? a ) o3 = ?? op (?? a , ?? a , ?? a ) return o3 S 4 S 5 S 6 S 7 S 8 S 9 …

  37. Optimal synthesis could be unbounded max(x, y): Unbounded space of o1 = ?? op (?? a , ?? a , ?? a ) candidate programs S 1 return o1 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 2 o2 = ?? op (?? a , ?? a , ?? a ) return o2 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 3 o2 = ?? op (?? a , ?? a , ?? a ) o3 = ?? op (?? a , ?? a , ?? a ) return o3 S 4 S 5 S 6 S 7 S 8 S 9 …

  38. Optimal synthesis could be unbounded max(x, y): Unbounded space of o1 = ?? op (?? a , ?? a , ?? a ) candidate programs UNSAT S 1 return o1 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 2 o2 = ?? op (?? a , ?? a , ?? a ) return o2 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 3 o2 = ?? op (?? a , ?? a , ?? a ) o3 = ?? op (?? a , ?? a , ?? a ) return o3 S 4 S 5 S 6 S 7 S 8 S 9 …

  39. Optimal synthesis could be unbounded max(x, y): Unbounded space of o1 = ?? op (?? a , ?? a , ?? a ) candidate programs UNSAT S 1 return o1 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 2 SAT, cost 5 o2 = ?? op (?? a , ?? a , ?? a ) return o2 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 3 o2 = ?? op (?? a , ?? a , ?? a ) o3 = ?? op (?? a , ?? a , ?? a ) return o3 S 4 S 5 S 6 S 7 S 8 S 9 …

  40. Optimal synthesis could be unbounded max(x, y): Unbounded space of o1 = ?? op (?? a , ?? a , ?? a ) candidate programs UNSAT S 1 return o1 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 2 SAT, cost 5 o2 = ?? op (?? a , ?? a , ?? a ) return o2 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 3 SAT, cost 4 o2 = ?? op (?? a , ?? a , ?? a ) o3 = ?? op (?? a , ?? a , ?? a ) return o3 S 4 S 5 S 6 S 7 S 8 S 9 …

  41. Optimal synthesis could be unbounded max(x, y): Unbounded space of o1 = ?? op (?? a , ?? a , ?? a ) candidate programs UNSAT S 1 return o1 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 2 SAT, cost 5 o2 = ?? op (?? a , ?? a , ?? a ) return o2 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 3 SAT, cost 4 o2 = ?? op (?? a , ?? a , ?? a ) o3 = ?? op (?? a , ?? a , ?? a ) return o3 4 4 4 3 3 3 S 4 S 5 S 6 S 7 S 8 S 9 …

  42. Optimal synthesis could be unbounded max(x, y): Unbounded space of o1 = ?? op (?? a , ?? a , ?? a ) candidate programs UNSAT S 1 return o1 Termination of optimal max(x, y): synthesis o1 = ?? op (?? a , ?? a , ?? a ) S 2 SAT, cost 5 o2 = ?? op (?? a , ?? a , ?? a ) return o2 max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 3 SAT, cost 4 o2 = ?? op (?? a , ?? a , ?? a ) o3 = ?? op (?? a , ?? a , ?? a ) return o3 4 4 4 3 3 3 S 4 S 5 S 6 S 7 S 8 S 9 …

  43. Optimal synthesis could be unbounded max(x, y): Unbounded space of o1 = ?? op (?? a , ?? a , ?? a ) candidate programs UNSAT S 1 return o1 Termination of optimal max(x, y): synthesis o1 = ?? op (?? a , ?? a , ?? a ) S 2 SAT, cost 5 o2 = ?? op (?? a , ?? a , ?? a ) return o2 Search order max(x, y): o1 = ?? op (?? a , ?? a , ?? a ) S 3 SAT, cost 4 o2 = ?? op (?? a , ?? a , ?? a ) o3 = ?? op (?? a , ?? a , ?? a ) return o3 4 4 4 3 3 3 S 4 S 5 S 6 S 7 S 8 S 9 …

  44. Metasketches control search strategy Unbounded space of candidate programs Termination of optimal synthesis Search order

  45. Metasketches control search strategy A metasketch consists of: Unbounded space of candidate programs Termination of optimal synthesis Search order

  46. Metasketches control search strategy A metasketch consists of: Unbounded space of • An ordered countable set of sketches S candidate programs Termination of optimal synthesis Search order

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend