-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
correctness_saturating_casts
seem to be failing on i386
#8532
Comments
x86-32 in general is supposed to work, and we have buildbots for it, though there might be testing holes. I can't think off the top of my head what might be meaningfully different between our build bot config and vanilla i386. I'll see if I can repro. |
Package is being built with/against LLVM19+Clang19 with ThinLTO + |
Looks like it's a saturating cast from int to float, which doesn't actually saturate - it's just an int to float conversion. We expect the int to float conversion inside Halide-generated code via saturating cast to be bit-exact with an int to float cast in the calling binary. Maybe this is an 80-bit floating point issue. In my build it looks like the test binary uses x87 instructions to generate the reference, but the generated code uses an sse2 instruction. That's the mismatch I was wondering about that could potentially cause failure, but it isn't causing failure for me. But if the rounding modes between the two are out of sync, that could get the wrong answer for large ints. I think it's reasonable to ask for a bit-exact float comparison in this situation on other architectures, but we shouldn't be risking a mismatch between x87 and sse2. What do you think of just adding this to the top of main:
|
Pehaps CMake should be specifying |
Can you test if that fixes it for you? I still can't actually repro. |
Oh duh. |
I've gone with
for now, seems to be enough to disable that test. |
Is i386 just no longer supported globally?
The text was updated successfully, but these errors were encountered: