Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixed precision flag with if statements #8

Open
bksaiki opened this issue Jun 26, 2020 · 2 comments
Open

Mixed precision flag with if statements #8

bksaiki opened this issue Jun 26, 2020 · 2 comments

Comments

@bksaiki
Copy link

bksaiki commented Jun 26, 2020

I'm currently improving Daisy support for FPBench. I encountered an issue where benchmarks with if statements work with uniform precision but break with the --mixed-precision flag (and necessary file with variable-precision mappings).

Ex: FPBench sanity test

FPCore:

(FPCore (x) 
  :name "Single interval (1/4)" 
  :pre (< 1 x 1.000001) 
  :spec 1.0 
  (if (< 1 x 1.000001) 1 0))

Daisy (Scala):

def f(x: Real): Real = {
  require((1 < x && x < 1.000001))
  if ((1 < x && x < 1.000001)) {
    1
  } else {
    0
  }
}

Output (w/ uniform precision):

Absolute error: 2.220446049250313e-16
Real range:     [0.0, 1.0]

Output (w/ --mixed-precision flag):

Something really bad happened. Cannot continue.

Are if statements not supported with mixed precision or is this just a bug?

@bksaiki bksaiki changed the title Mixed precision flag issue with if statements Mixed precision flag with if statements Jun 26, 2020
@malyzajko
Copy link
Owner

Mixed-precision tuning does not work for if statements right now.

@bksaiki
Copy link
Author

bksaiki commented Jun 30, 2020

Okay. I'll leave this issue open then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants