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

Update LLVM to 15.0.7 #48700

Merged
merged 7 commits into from
May 10, 2023
Merged

Update LLVM to 15.0.7 #48700

merged 7 commits into from
May 10, 2023

Conversation

vchuravy
Copy link
Member

@vchuravy vchuravy commented Feb 16, 2023

@gbaraldi gbaraldi added external dependencies Involves LLVM, OpenBLAS, or other linked libraries compiler:llvm For issues that relate to LLVM labels Feb 17, 2023
@vchuravy vchuravy requested a review from gbaraldi February 17, 2023 02:33
src/jitlayers.cpp Outdated Show resolved Hide resolved
src/jitlayers.cpp Outdated Show resolved Hide resolved
@gbaraldi
Copy link
Member

The clang++ symlink is missing. Do you have any idea why @vchuravy ?

@vchuravy
Copy link
Member Author

Because symlinks are lies? No not sure why that one would be missing, but I am pretty sure we don't require it as an output.

@gbaraldi
Copy link
Member

It does seem some things were expecting it to be there 🤷

@vchuravy
Copy link
Member Author

Can you for now just create it in place and then we can go back and look where in the process of building Clang.jl we lost it.

@gbaraldi
Copy link
Member

I will see if it works at least locally, but it seems something very odd is going on with the tools.

@gbaraldi gbaraldi force-pushed the vc/upgrade_llvm15 branch 4 times, most recently from 9323cf2 to 8d33505 Compare March 14, 2023 21:36
@gbaraldi
Copy link
Member

gbaraldi commented Mar 14, 2023

@vchuravy I think this might be ready for a pkgeval. I'm not sure what's up with ppc, and the other failures are pending me rebuilding LLVM but I'm kinda waiting to see if we don't find anything else that might also want to go into the rebuild.

The only test that failed is sockets which is kind of a known issue.

@vchuravy
Copy link
Member Author

@nanosoldier runtests(configuration = (buildflags=["LLVM_ASSERTIONS=1", "FORCE_ASSERTIONS=1"],), vs_configuration = (buildflags = ["LLVM_ASSERTIONS=1", "FORCE_ASSERTIONS=1"],))

@vchuravy
Copy link
Member Author

I will try to find some cycles for the PPC failure.

@nanosoldier
Copy link
Collaborator

Your package evaluation job has completed - possible new issues were detected.
A full report can be found here.

@gbaraldi
Copy link
Member

gbaraldi commented Mar 15, 2023

That's a surprisingly good result. I see most failures are from the LLVM world.

About the ppc thing I believe it's Float16 related.

@vchuravy
Copy link
Member Author

PPC issue seem PWR8 specific:

error during bootstrap:
LoadError(at "sysimg.jl" line 3: LoadError(at "Base.jl" line 206: LoadError(at "float.jl" line 862: StackOverflowError())))                                                          
unknown function (ip: 0x7fff9a8900b8)
unknown function (ip: 0x7fff9a89001f)

*** This error might be fixed by running `make clean`. If the error persists, try `make cleanall`. ***                                                                               
make[1]: *** [/nobackup/users/vchuravy/dev/julia/sysimage.mk:67: /nobackup/users/vchuravy/dev/julia/jl-pwr8/usr/lib/julia/sys.ji] Error 1                                            
make: *** [/nobackup/users/vchuravy/dev/julia/Makefile:97: julia-sysimg-ji] Error 2
[vchuravy@satori-login-001 jl-pwr8]$ vim ../base/float.jl

Whereas PWR9 completes the build successfully.

@gbaraldi
Copy link
Member

That is odd, do any of them support native Float16? Also StackOverflow is a funny error to have here, I do wonder what the backtrace is.

@vchuravy
Copy link
Member Author

That is odd, do any of them support native Float16? Also StackOverflow is a funny error to have here, I do wonder what the backtrace is.

Experience tells me that this is likely a hw loop issue... The curse of PWR8. Trying to get see if I can get a backtrace and maybe that gives me a better indication.
Since I have a sysimage built for PPC9 I might be able to reproduce this in JIT mode.

@vchuravy
Copy link
Member Author

AH nothing as nefarious as I thought.

Thread 1 "julia" received signal SIGSEGV, Segmentation fault.                                                                                                                         
0x00007ffff71b8e14 in julia__gnu_f2h_ieee (param=-128) at /nobackup/users/vchuravy/dev/julia/src/runtime_intrinsics.c:195                                                             
195         return float_to_half(param);                                                                                                                                              
(gdb)                                                                                                                                                                                 
(gdb) bt                                                                                                                                                                              
#0  0x00007ffff71b8e14 in julia__gnu_f2h_ieee (param=-128) at /nobackup/users/vchuravy/dev/julia/src/runtime_intrinsics.c:195                                                         
#1  0x00007fffe9ee00c0 in __gnu_f2h_ieee ()
...
#476 0x00007fffe9ee0020 in __gnu_h2f_ieee ()
#477 0x00007fffe9ee00cc in __gnu_f2h_ieee ()
...
#130712 0x00007fffea4e52c4 in julia_Float16_4059 () at float.jl:159                                                                                                                   
#130713 0x00007fffea4e5360 in jfptr_Float16_4060 ()                                                                                                                                   
#130714 0x00007ffff714fa78 in _jl_invoke (world=9137, mfunc=<optimized out>, nargs=1, args=0x7fffffffa738, F=0x7fffe87caff0) at /nobackup/users/vchuravy/dev/julia/src/gf.c:2720      
#130715 ijl_apply_generic (F=0x7fffe87caff0, args=0x7fffffffa738, nargs=<optimized out>) at /nobackup/users/vchuravy/dev/julia/src/gf.c:2921 

And it's reproducible on the PWR9 build with -C pwr8

So our interposer is calling itself xD

@gbaraldi
Copy link
Member

@nanosoldier runbenchmarks()

@gbaraldi
Copy link
Member

@nanosoldier runbenchmarks(ALL, vs = "master")

@gbaraldi
Copy link
Member

The sanitizer passes are just gone from the old PM, so we have to turn the new one on here @pchintalapudi

@vchuravy vchuravy force-pushed the vc/upgrade_llvm15 branch 3 times, most recently from 969cafb to 8e0b436 Compare May 5, 2023 23:07
@vchuravy
Copy link
Member Author

vchuravy commented May 6, 2023

@nanosoldier runtests(configuration = (buildflags=["LLVM_ASSERTIONS=1", "FORCE_ASSERTIONS=1"],), vs_configuration = (buildflags = ["LLVM_ASSERTIONS=1", "FORCE_ASSERTIONS=1"],))

@vchuravy
Copy link
Member Author

vchuravy commented May 6, 2023

@nanosoldier runbenchmarks(!"scalar", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@nanosoldier
Copy link
Collaborator

Your package evaluation job has completed - possible new issues were detected.
A full report can be found here.

@vchuravy vchuravy force-pushed the vc/upgrade_llvm15 branch 2 times, most recently from 67fed9c to a596f95 Compare May 8, 2023 15:06
@vchuravy
Copy link
Member Author

@nanosoldier runbenchmarks(!"scalar", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@vchuravy vchuravy force-pushed the vc/upgrade_llvm15 branch from 90a959f to 2ddbb5a Compare May 10, 2023 14:15
@vchuravy
Copy link
Member Author

@nanosoldier runbenchmarks(!"scalar", vs=":master")

@vchuravy
Copy link
Member Author

We are expecting nanosoldier to come back with happy news and intend to merge this PR thereafter.

There is a second step that maybe @Keno or others could help with and that is to enable opaque-pointers,
but currently opqaue-pointers regresses performance to much.

Overall LLVM 15 is an important stepping stone for improved GPU support (primarily AMD), the migration the NewPM infrastructure.

This PR raises the minimum MacOS version to 10.14 and raises toolchain requirements as well.

With LLVM 15.x we will raise the version requirements of the toolchain used to build LLVM. The new requirements are as follows:

GCC >= 7.1
Clang >= 5.0
Apple Clang >= 9.3
Visual Studio 2019 >= 16.7

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@vchuravy vchuravy merged commit 21d4c2f into master May 10, 2023
@vchuravy vchuravy deleted the vc/upgrade_llvm15 branch May 10, 2023 21:59
@vchuravy
Copy link
Member Author

Many thanks to @gbaraldi and @pchintalapudi for helping out massively with this PR. This turned out to be a much harder upgrade than usual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:llvm For issues that relate to LLVM don't squash Don't squash merge external dependencies Involves LLVM, OpenBLAS, or other linked libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants