University of Maryland Dynamic Floating-Point Error Detection Mike Lam, Jeff Hollingsworth and Pete Stewart.

Slides:



Advertisements
Similar presentations
Binary-Level Tools for Floating-Point Correctness Analysis Michael Lam LLNL Summer Intern 2011 Bronis de Supinski, Mentor.
Advertisements

Software & Services Group PinPlay: A Framework for Deterministic Replay and Reproducible Analysis of Parallel Programs Harish Patil, Cristiano Pereira,
2009 Spring Errors & Source of Errors SpringBIL108E Errors in Computing Several causes for malfunction in computer systems. –Hardware fails –Critical.
Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
Arithmetic in Computers Chapter 4 Arithmetic in Computers2 Outline Data representation integers Unsigned integers Signed integers Floating-points.
University of Maryland Locality Optimizations in cc-NUMA Architectures Using Hardware Counters and Dyninst Mustafa M. Tikir Jeffrey K. Hollingsworth.
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Floating-Point FPGA (FPFPGA) Architecture and Modeling (A paper review) Jason Luu ECE University of Toronto Oct 27, 2009.
Avoiding Measurement Errors from Manipulating Data in Software
MATH 685/ CSI 700/ OR 682 Lecture Notes
MacLennan Chapter 1 The Beginning: Pseudo-code Interpreters.
Round-Off and Truncation Errors
Java for High Performance Computing Jordi Garcia Almiñana 14 de Octubre de 1998 de la era post-internet.
LIFT: A Low-Overhead Practical Information Flow Tracking System for Detecting Security Attacks Feng Qin, Cheng Wang, Zhenmin Li, Ho-seop Kim, Yuanyuan.
1 CSC 1401 Computer Programming I Hamid Harroud School of Science and Engineering, Akhawayn University
1 Lecture 11: Digital Design Today’s topics:  Evaluating a system  Intro to boolean functions.
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
Microprocessor Systems Design I
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
Representation and Conversion of Numeric Types 4 We have seen multiple data types that C provides for numbers: int and double 4 What differences are there.
1 Lecture 10: FP, Performance Metrics Today’s topics:  IEEE 754 representations  FP arithmetic  Evaluating a system Reminder: assignment 4 due in a.
Kathy Grimes. Signals Electrical Mechanical Acoustic Most real-world signals are Analog – they vary continuously over time Many Limitations with Analog.
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
Digital Signal Processors for Real-Time Embedded Systems By Jeremy Kohel.
CENG 311 Machine Representation/Numbers
Floating Point Analysis Using Dyninst Mike Lam University of Maryland, College Park Jeff Hollingsworth, Advisor.
Floating point variables of different lengths. Trade-off: accuracy vs. memory space Recall that the computer can combine adjacent bytes in the RAM memory.
Previous Next 06/18/2000Shanghai Jiaotong Univ. Computer Science & Engineering Dept. C+J Software Architecture Shanghai Jiaotong University Author: Lu,
Topic #10: Optimization EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
A Portable Virtual Machine for Program Debugging and Directing Camil Demetrescu University of Rome “La Sapienza” Irene Finocchi University of Rome “Tor.
Information Representation (Level ISA3) Floating point numbers.
University of Maryland Compiler-Assisted Binary Parsing Tugrul Ince PD Week – 27 March 2012.
Background (Floating-Point Representation 101)  Floating-point represents real numbers as (± sig × 2 exp )  Sign bit  Significand (“mantissa” or “fraction”)
Number Systems So far we have studied the following integer number systems in computer Unsigned numbers Sign/magnitude numbers Two’s complement numbers.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
Computer Architecture
Modifying Floating-Point Precision with Binary Instrumentation Michael Lam University of Maryland, College Park Jeff Hollingsworth, Advisor.
Accelerating Precise Race Detection Using Commercially-Available Hardware Transactional Memory Support Serdar Tasiran Koc University, Istanbul, Turkey.
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 10 Department of Computer Science and Software Engineering University of.
ME 142 Engineering Computation I Computer Precision & Round-Off Error.
HW/SW PARTITIONING OF FLOATING POINT SOFTWARE APPLICATIONS TO FIXED - POINTED COPROCESSOR CIRCUITS - Nalini Kumar Gaurav Chitroda Komal Kasat.
Round-off Errors.
8-1 Embedded Systems Fixed-Point Math and Other Optimizations.
Fixed and Floating Point Numbers Lesson 3 Ioan Despi.
Round-off Errors and Computer Arithmetic. The arithmetic performed by a calculator or computer is different from the arithmetic in algebra and calculus.
Title of Selected Paper: IMPRES: Integrated Monitoring for Processor Reliability and Security Authors: Roshan G. Ragel and Sri Parameswaran Presented by:
Environment Selection Application  Firefox 1.0 or 2.0  Apache Operating System  Linux  Windows XP Instrumentation Package  JIT (DynamoRio,
University of Maryland Using Dyninst to Measure Floating-point Error Mike Lam, Jeff Hollingsworth and Pete Stewart.
CSCI Rational Purify 1 Rational Purify Overview Michel Izygon - Jim Helm.
Parallelization of likelihood functions for data analysis Alfio Lazzaro CERN openlab Forum on Concurrent Programming Models and Frameworks.
Replicating Memory Behavior for Performance Skeletons Aditya Toomula PC-Doctor Inc. Reno, NV Jaspal Subhlok University of Houston Houston, TX By.
Numerical Analysis Intro to Scientific Computing.
CISC Machine Learning for Solving Systems Problems Presented by: Suman Chander B Dept of Computer & Information Sciences University of Delaware Automatic.
Chapter 1 Introduction. Chapter 1 -- Introduction2  Def: Compiler --  a program that translates a program written in a language like Pascal, C, PL/I,
1 Lecture 10: Floating Point, Digital Design Today’s topics:  FP arithmetic  Intro to Boolean functions.
Floating Point Numbers Representation, Operations, and Accuracy CS223 Digital Design.
Exploiting Instruction Streams To Prevent Intrusion Milena Milenkovic.
IT11004: Data Representation and Organization Floating Point Representation.
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale Floating point arithmetic.
Sources of Computational Errors FLP approximates exact computation with real numbers Two sources of errors to understand and counteract: 1. Representation.
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures.
ECE 750 Topic 8 Meta-programming languages, systems, and applications Automatic Program Specialization for J ava – U. P. Schultz, J. L. Lawall, C. Consel.
First Foray into Programming (the hard way). A reminder from last lesson: A machine code instruction has two parts:  Op-code  Operand An instruction.
1 University of Maryland Using Information About Cache Evictions to Measure the Interactions of Application Data Structures Bryan R. Buck Jeffrey K. Hollingsworth.
UNIVERSITY OF MASSACHUSETTS Dept
课程名 编译原理 Compiling Techniques
March 2006 Saeid Nooshabadi
The University of Adelaide, School of Computer Science
Chapter 6 Floating Point
rePLay: A Hardware Framework for Dynamic Optimization
Presentation transcript:

University of Maryland Dynamic Floating-Point Error Detection Mike Lam, Jeff Hollingsworth and Pete Stewart

University of Maryland 2 Motivation Finite precision -> roundoff error Compromises ill-conditioned calculations Hard to detect and diagnose Increasingly important as HPC grows Single-precision is faster on GPUs Double-precision fails on long-running computations Previous solutions are problematic Numerical analysis requires training Manual re-writing and testing in higher precision is tedious and time-consuming

University of Maryland 3 Our Solution Instrument floating-point instructions Automatic Minimize developer effort Ensure analysis consistency and correctness Binary-level Include shared libraries w/o source code Include compiler optimizations Runtime Data-sensitive

University of Maryland 4 Our Solution Three parts Utility that inserts binary instrumentation Runtime shared library with analysis routines GUI log viewer General overview Find floating-point instructions and insert calls to shared library Run instrumented program View output with GUI

University of Maryland 5 Our Solution Dyninst-based instrumentation Cross-platform No special hardware required Stack walking and binary rewriting Java GUI Cross-platform Minimal development effort

University of Maryland 6 Our Solution Cancellation detection Instrument addition & subtraction Compare runtime operand values Report cancelled digits Side-by-side (“shadow”) calculations Instrument all floating-point instructions Higher/lower precision Different representation (i.e. rationals) Report final errors

University of Maryland 7 Cancellation Detection Overview Loss of significant digits during operations For each addition/subtraction: Extract value of each operand Calculate result and compare magnitudes (binary exponents) If e ans < max(e x,e y ) there is a cancellation For each cancellation event: Record a “priority:” max(e x,e y ) - e ans Save event information to log

University of Maryland 8

9

10 Gaussian Elimination A -> [L,U] Comparison of eight methods Classical Classical w/ partial pivoting Classical w/ full pivoting Bordering (“Sherman’s march”) “Pickett’s charge” “Pickett’s charge” w/ partial pivoting Crout’s method Crout’s method w/ partial pivoting

University of Maryland 11 Gaussian Elimination

University of Maryland 12 Gaussian Elimination Classical vs. Bordering

University of Maryland 13 Gaussian Elimination ClassicalBordering Operations Cancellations399 Cancels/ops14%3% Average bits

University of Maryland 14 SPEC Benchmarks Results are hard to interpret without domain knowledge Overheads:

University of Maryland 15 Roundoff Error Sparse “shadow value” table Maps memory addresses to alternate values Shadow values can be single-, double-, quad- or arbitrary-precision Other ideas: rationals, # of significant digits, etc. Instrument every FP instruction Extract operation type and operand addresses Perform the same operation on corresponding shadow values Output shadow values and errors upon termination

University of Maryland 16

University of Maryland 17 More Gaussian Elimination Maximum relative error 25x2550x50100x100 Partial pivoting9.3e-102.3e-21.0 Full pivoting1.3e-152.4e-154.8e-15

University of Maryland 18 Issues & Possible Solutions Expensive overheads ( X) Optimize with inline snippets Reduce workload with data flow analysis Following values through compiler optimizations Selectively instrument MOV instructions Filtering false positives Deduce “root cause” of error using data flow

University of Maryland 19 Conclusion Analysis of floating-point error is hard Our tool provides automatic analysis of such error Work in progress

University of Maryland 20 Thank you!