towards numerical assistants
play

Towards Numerical Assistants Trust, Measurement, Community, and - PowerPoint PPT Presentation

Towards Numerical Assistants Trust, Measurement, Community, and Generality for the Numerical Workbench Pavel Panchekha Zachary Tatlock pavpan@cs.utah.edu ztatlock@cs.washington.edu University of Utah University of Washington Writing


  1. Towards Numerical Assistants Trust, Measurement, Community, and Generality for the Numerical Workbench Pavel Panchekha Zachary Tatlock pavpan@cs.utah.edu ztatlock@cs.washington.edu University of Utah University of Washington

  2. Writing Numerical Code Diabolical errors - Silent, non-compositional, non-local Subtle tradeoffs - Performance, accuracy, determinism Evolving landscape - bfloat, posits, Flexpoint, AdaptivFloat, ...

  3. Writing Numerical Code Diabolical errors - Silent, non-compositional, non-local Subtle tradeoffs - Performance, accuracy, determinism Evolving landscape - bfloat, posits, Flexpoint, AdaptivFloat, ...

  4. Ideal Numerical Coding 1. Look up the formula you need from Wikipedia. 2. Type formula into your program. 3. Get accurate results.

  5. Ideal Numerical Coding 1. Look up the formula you need from Wikipedia. 2. Type formula into your program. 3. Get accurate results. https://xkcd.com/217/

  6. Ideal Numerical Coding 1. Look up the formula you need from Wikipedia. 2. Type formula into your program. 3. Get accurate results. Reality.

  7. Numerical Code in Practice Blake Courter CAD Researcher

  8. Numerical Code in Practice Blake Courter CAD Researcher

  9. Vision: Numerical Assistants Blake Courter CAD Researcher

  10. Vision: Numerical Assistants Blake Courter CAD Researcher 2015

  11. Vision: Numerical Assistants

  12. Vision: Numerical Assistants FPBench Titanic

  13. Vision: Numerical Assistants Developing since 2015: 1. Trust 2. Measurement FPBench Titanic 3. Community 4. Generality

  14. Vision: Numerical Assistants First, quick background Developing since 2015: 1. Trust 2. Measurement FPBench Titanic 3. Community 4. Generality

  15. Herbie

  16. Herbie Given input expression over the reals

  17. Herbie Given input expression over the reals Synthesize a floating point implementation

  18. Herbie Given input expression over the reals Synthesize a floating point implementation Less error than naive translation

  19. Herbie “The drunk numerical analyst”

  20. Herbie “The drunk numerical analyst” Live demo: herbie.uwplse.org

  21. FPBench Benchmarks - Mine papers, enable apples-to-apples Compilers - Generate C, JavaScript, Scala, TeX, ... Standards - Support tool interchange, composition

  22. FPBench Benchmarks - Mine papers, enable apples-to-apples Compilers - Generate C, JavaScript, Scala, TeX, ... Standards - Support tool interchange, composition Live tour: fpbench.org

  23. 1. Trust Why should users trust Herbie?

  24. 1. Trust Why should users trust Herbie? Compilers forbidden from touching floating point at all … and they even get that wrong!

  25. 1. Trust Why should users trust Herbie? Compilers forbidden from touching floating point at all … and they even get that wrong! No really, why should users trust Herbie?

  26. 1. Trust Why should users trust Herbie?

  27. 1. Trust Why should users trust Herbie? Sample inputs, estimate error

  28. 1. Trust Why should users trust Herbie? Sample inputs, estimate error Heuristically search for more accurate expressions

  29. 1. Trust Why should users trust Herbie? Sample inputs, estimate error Select best exprs, infer branches Heuristically search for more accurate expressions

  30. 1. Trust Why should users trust Herbie? Sample inputs, estimate error Select best exprs, infer branches Heuristically search for more accurate expressions Unpredictable, mysterious!

  31. 1. Trust Why should users trust Herbie? Test set, not training set

  32. 1. Trust Why should users trust Herbie?

  33. 1. Trust Why should users trust Herbie? Identify where error is arising

  34. 1. Trust Why should users trust Herbie? Identify where error is arising Show stepwise derivation

  35. 1. Trust Why should users trust Herbie? Identify where error is arising Show stepwise derivation Justify by accuracy impact

  36. 2. Measurement That which is measured, improves.

  37. 2. Measurement That which is measured, improves. Herbie is a complex pipeline. Each component individually robust. - Actually works against debugging!! Need to have per-module specs and metrics.

  38. 2. Measurement That which is measured, improves. No “just enough” level of detail is right for logs...

  39. 2. Measurement That which is measured, improves.

  40. 2. Measurement That which is measured, improves. Build generic telemetry! Iteratively develop viz! 100s bugs fixed, 1000x speedups!

  41. 2. Measurement That which is measured, improves. Build generic telemetry! Improves Iteratively develop viz! Trust! 100s bugs fixed, 1000x speedups!

  42. 2. Measurement That which is measured, improves. Global overviews

  43. 2. Measurement That which is measured, improves. Global overviews Per component logs

  44. 2. Measurement That which is measured, improves. Global overviews Per component logs Compare to oracles where possible!

  45. 3. Community We are all in this together.

  46. 3. Community We are all in this together. Our thinking in 2016 Herbie is just one piece of the puzzle. The workbench demands cooperating tools: - Rigorous error bounds, precision tuning, performance optimization, … How should they interact? Need standards!

  47. 3. Community We are all in this together. Our thinking in 2016 Herbie is just one piece of the puzzle. The workbench demands cooperating tools: Numerics research is a community effort. - Rigorous error bounds, precision tuning, performance optimization, … We need more open communications! How should they interact? Need standards! We need more collaboration opportunities! We need more shared infrastructure! View today

  48. 3. Community We are all in this together.

  49. 3. Community We are all in this together.

  50. 3. Community We are all in this together.

  51. 3. Community We are all in this together.

  52. 3. Community We are all in this together. Link to join on fpbench.org

  53. 4. Generality Supporting a rapidly evolving landscape

  54. 4. Generality Supporting a rapidly evolving landscape Explosion of numerical representations. How do we adapt code? Optimize? Need tools!

  55. 4. Generality Supporting a rapidly evolving landscape Explosion of numerical representations. How do we adapt code? Optimize? Need tools! “Precision scopes” specify MPMF!

  56. 4. Generality Supporting a rapidly evolving landscape Enables parameter sweeps: iters, cost, accuracy

  57. 4. Generality Supporting a rapidly evolving landscape Increasing interest in numerics of tensor code.

  58. 4. Generality Supporting a rapidly evolving landscape Increasing interest in numerics of tensor code. FPBench 2.0 adds tensor (FPCore matmul ((A am an) (B bm bn)) support, keeps minimal core :pre (== an bm) (tensor ([m am] [n bn]) (for ([i bm]) ([prod 0 (+ prod (* (ref A m i) (ref B i n)))]) prod)) )

  59. Where do we go from here? Trust : ground truth for MPMF Measurement : metrics for tensor benchmarks Community : outreach from research to practice Generality : extensibility for new formats

  60. A brief announcement... Herbie 1.4 just released! Please take it for a spin :) herbie.uwplse.org

  61. Many Acknowledgements! Alex Sanchez-Stern Heiko Becker Bill Zorn Eva Darulova David Thien Max Willsey Oliver Flatt James Wilcox Brett Saiki Jack Firth Jason Qiu Mike Lam Ian Briggs … and more!

  62. Thank You! Trust : ground truth for MPMF Measurement : metrics for tensor benchmarks Community : outreach from research to practice Generality : extensibility for new formats herbie.uwplse.org fpbench.org

Recommend


More recommend