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

Build: failing Float16 intrinsics on 1.6.6 or 1.7.2 on ubuntu 22.04 #45433

Closed
t-bltg opened this issue May 23, 2022 · 3 comments
Closed

Build: failing Float16 intrinsics on 1.6.6 or 1.7.2 on ubuntu 22.04 #45433

t-bltg opened this issue May 23, 2022 · 3 comments

Comments

@t-bltg
Copy link
Contributor

t-bltg commented May 23, 2022

I'm building julia 1.6.6 on ubuntu 22.04 with gcc 11.2.0 from source archives.

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
$ gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
[...]
$ ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3) 2.35
[...]

I have two unrelated patches applied, #45419 and #43717 for the build to end without errors.
I'm building all dependencies with USE_BINARYBUILDER := 0 and a prefix set, and standard make -j, make install.

Lots of Float16 intrinsics tests are failing, running $ julia -e 'Base.runtests("intrinsics")':

Test   (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
intrinsics  (1) |        started at 2022-05-24T14:18:57.744
intrinsics  (1) |         failed at 2022-05-24T14:19:02.184
Test Failed at [...]/share/julia/test/intrinsics.jl:128
  Expression: f() === Base.invokelatest(Core.Intrinsics.neg_float, Float16(3.3))
   Evaluated: Float16(-3.3) === Float16(-3.97e-5)
[...]

Here is a simple reproducer:

using InteractiveUtils, Test

main() = begin
  @test Core.Intrinsics.fptrunc(Float16, 4.4)  4.4
  @test Float16(4.4f0)  4.4
  @test Float16(4.4)  4.4
  return
end

main()
versioninfo()

@test Core.Intrinsics.fptrunc(Float16, 4.4)  4.4
@test Float16(4.4f0)  4.4
@test Float16(4.4)  4.4  # KO !!

And the output:

$ julia fail.jl
Julia Version 1.6.6
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, sandybridge)
Test Failed at [...]/fail.jl:15
  Expression: Float16(4.4)  4.4
   Evaluated: Float16(6.1e-6)  4.4
ERROR: LoadError: There was an error during testing
in expression starting at [...]/fail.jl:15

Same failures observed when building and testing 1.7.2. This used to build fine with tests passing on ubuntu 20.04.

Has anyone seen that before ? Does anyone have any clue on which library or code section might be failing ?

@t-bltg
Copy link
Contributor Author

t-bltg commented May 24, 2022

The problem seem to originate from handling

return generic_cast(ctx, f, Instruction::FPTrunc, argv, false, false);

If I un-comment

// return emit_runtime_call(ctx, f, argv, nargs);
, the intrinsics test passes.

@vtjnash
Copy link
Member

vtjnash commented May 24, 2022

Duplicate of #44829

@vtjnash vtjnash marked this as a duplicate of #44829 May 24, 2022
@t-bltg
Copy link
Contributor Author

t-bltg commented May 24, 2022

Thanks @vtjnash for pointing this issue. Will close when we have backported patches (as mentioned in #45249, will continue the discussion there).

EDIT: fixed by #45649.

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