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

[LLVM] Update to LLVM 12 #40774

Merged
merged 7 commits into from
May 22, 2021
Merged

[LLVM] Update to LLVM 12 #40774

merged 7 commits into from
May 22, 2021

Conversation

vchuravy
Copy link
Member

No description provided.

@vchuravy vchuravy added the upstream The issue is with an upstream dependency, e.g. LLVM label May 10, 2021
@vchuravy vchuravy requested a review from staticfloat May 10, 2021 17:03
@vchuravy
Copy link
Member Author

@staticfloat do I need to regenerate the Artifacts.toml in stdlib/libLLVM_jll?

@vchuravy vchuravy requested a review from maleadt May 10, 2021 17:05
@staticfloat
Copy link
Member

There shouldn't be an Artifacts.toml. There can be an StdlibArtifacts.toml, but that should not be checked in; it gets downloaded from GitHub at build time.

@vchuravy
Copy link
Member Author

@yuyichao on AArch64 we are getting:

'-fmi' is not a recognized feature for this target (ignoring feature)
'-pa' is not a recognized feature for this target (ignoring feature)

It seems fmi was renamed in https://reviews.llvm.org/D94081 and pa in https://reviews.llvm.org/D94083

best things is probably to #ifdef on the LLVM version?

@vchuravy

This comment has been minimized.

@vchuravy

This comment has been minimized.

@vchuravy vchuravy requested a review from yuyichao May 12, 2021 00:18
@nanosoldier
Copy link
Collaborator

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

@chriselrod
Copy link
Contributor

chriselrod commented May 12, 2021

All the failures I looked at originated from VectorizationBase.jl or SIMD.jl not removing experimental and v2 with LLVM 12:
llvm.experimental.vector.reduce.v2.fadd.v4f64
EDIT:
VectorizationBase.jl: JuliaSIMD/VectorizationBase.jl@441988f
SIMD.jl: eschnett/SIMD.jl#86

@nanosoldier
Copy link
Collaborator

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

@vchuravy

This comment has been minimized.

@vchuravy
Copy link
Member Author

All the failures I looked at originated from VectorizationBase.jl or SIMD.jl not removing experimental and v2 with LLVM 12:
llvm.experimental.vector.reduce.v2.fadd.v4f64
EDIT:
VectorizationBase.jl: JuliaSIMD/VectorizationBase.jl@441988f
SIMD.jl: eschnett/SIMD.jl#86

Thanks @chriselrod! Once the SIMD.jl one has been merged and tagged we can rerun PkgEval.

@nanosoldier
Copy link
Collaborator

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

@vchuravy

This comment has been minimized.

@vtjnash
Copy link
Member

vtjnash commented May 12, 2021

Wow, that's truly horrendous. How did you manage to make even basic things like + and sin that much slower?

@vchuravy
Copy link
Member Author

How did you manage

Hey now! How did they manage to make everything slower.

I fixed the 30000x regression, that seemed to be a missing pass and we will see what impact that has elsewhere.

@nanosoldier
Copy link
Collaborator

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

@vchuravy
Copy link
Member Author

Ok, this is looking much better. Still some regression but they are all in the normal range. I will look at a few of the larger ones.

@staticfloat this is now blocked on getting python3 on the build it's.

@vchuravy vchuravy force-pushed the vc/llvm12_upgrade branch from ab21e38 to 9593fb5 Compare May 20, 2021 02:38
@vchuravy vchuravy marked this pull request as ready for review May 20, 2021 02:39
@vchuravy

This comment has been minimized.

@vchuravy
Copy link
Member Author

@DilumAluthge any ideas why buildkite didn't get triggered automatically? There was a webhook triggered.

Manually: https://buildkite.com/julialang/julia/builds/200

@DilumAluthge
Copy link
Member

Hmmm. I checked the settings and everything looked correct. Can you try pushing a new commit to this branch?

@vchuravy vchuravy force-pushed the vc/llvm12_upgrade branch from 8114f7a to 8ae50e0 Compare May 20, 2021 23:15
@vchuravy
Copy link
Member Author

@nanosoldier runtests(["OpenQuantumBase", "LiveServer", "CBinding", "LLVM", "VectorizationBase"])

@vchuravy

This comment has been minimized.

@vchuravy
Copy link
Member Author

If these come back clean I am inclined to merge this tomorrow.

@nanosoldier
Copy link
Collaborator

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

@chriselrod
Copy link
Contributor

Active lane mask fixed in VectorizationBase and tagged: JuliaRegistries/General#37133

Ugh, now actually fixed.

@nanosoldier
Copy link
Collaborator

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

@KristofferC
Copy link
Member

The ["union", "array", ("perf_simplecopy", "Bool", 1)] and company might be relevant (4x regression).

@vchuravy

This comment has been minimized.

@vchuravy

This comment has been minimized.

@nanosoldier

This comment has been minimized.

@nanosoldier

This comment has been minimized.

@vchuravy
Copy link
Member Author

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

@vchuravy
Copy link
Member Author

@nanosoldier runbenchmarks(ALL, vs="@8ae50e0cea280e5cc7310a648c280e90c592ed04")

@vchuravy
Copy link
Member Author

@nanosoldier runtests(ALL, vs = ":master")

@nanosoldier
Copy link
Collaborator

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

@nanosoldier
Copy link
Collaborator

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

@DilumAluthge
Copy link
Member

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

@chriselrod The Tullio failures here seem to be coming from LoopVectorization and/or VectorizationBase? E.g.:

new arrays: Error During Test at /home/pkgeval/.julia/packages/Tullio/IHd6P/test/parsing.jl:4
  Got exception outside of a @test
  llvmcall only supports intrinsic calls
  Stacktrace:
    [1] macro expansion
      @ ~/.julia/packages/VectorizationBase/xil1r/src/llvm_intrin/intrin_funcs.jl:292 [inlined]
    [2] vsum
      @ ~/.julia/packages/VectorizationBase/xil1r/src/llvm_intrin/intrin_funcs.jl:292 [inlined]
    [3] vsum
      @ ~/.julia/packages/VectorizationBase/xil1r/src/llvm_intrin/intrin_funcs.jl:269 [inlined]
    [4] reduced_add
      @ ~/.julia/packages/VectorizationBase/xil1r/src/llvm_intrin/intrin_funcs.jl:319 [inlined]

@chriselrod
Copy link
Contributor

chriselrod commented May 22, 2021

@chriselrod The Tullio failures here seem to be coming from LoopVectorization and/or VectorizationBase? E.g.:

So, Tullio tests:

 [3d5dd08c] VectorizationBase v0.15.7

RegularizedLeastSquares tests:

  [3d5dd08c] + VectorizationBase v0.19.39

They should be on VectorizationBase 0.20.10.

ApproxManifoldProducts had:

  [3d5dd08c] VectorizationBase v0.20.10

Basic 3D multiply and cross dimension covariance test...: Error During Test at /home/pkgeval/.julia/packages/ApproxManifoldProducts/BhS8C/test/testBasicManiProduct.jl:26
  Got exception outside of a @test
  DomainError with -7.426431436168918e300:
  log will only return a complex result if called with a complex argument. Try log(Complex(x)).
  Stacktrace:
    [1] throw_complex_domainerror(f::Symbol, x::Float64)
      @ Base.Math ./math.jl:33

So maybe that's related, but I don't see how from a quick look. It depends on SLEEFPirates.jl, without actually using it, as far as I can tell.

BPFNative had:

  [929cbde3] + LLVM v3.7.1

empty: Error During Test at /home/pkgeval/.julia/packages/BPFnative/LpXdL/test/runtests.jl:27
  Got exception outside of a @test
  MethodError: no method matching LLVM.ConstantArray(::LLVM.IntegerType, ::Vector{UInt8})
  Closest candidates are:
    LLVM.ConstantArray(::LLVM.LLVMType) at /home/pkgeval/.julia/packages/LLVM/1GCWB/src/core/value/constant.jl:136
    LLVM.ConstantArray(::LLVM.LLVMType, !Matched::AbstractArray{T, N}) where {T<:LLVM.Constant, N} at /home/pkgeval/.julia/packages/LLVM/1GCWB/src/core/value/constant.jl:136
  Stacktrace:
    [1] finish_module!(job::GPUCompiler.CompilerJob{GPUCompiler.BPFCompilerTarget, BPFnative.BPFCompilerParams}, mod::LLVM.Module)
      @ GPUCompiler ~/.julia/packages/GPUCompiler/AdCnd/src/bpf.jl:54
    [2] emit_asm(job::GPUCompiler.CompilerJob, ir::LLVM.Module, kernel::LLVM.Function; strip::Bool, validate::Bool, format::LLVM.API.LLVMCodeGenFileType)
      @ GPUCompiler ~/.julia/packages/GPUCompiler/AdCnd/src/driver.jl:283
    [3] codegen(output::Symbol, job::GPUCompiler.CompilerJob; libraries::Bool, deferred_codegen::Bool, optimize::Bool, strip::Bool, validate::Bool, only_entry::Bool)
      @ GPUCompiler ~/.julia/packages/GPUCompiler/AdCnd/src/driver.jl:76
    [4] compile(target::Symbol, job::GPUCompiler.CompilerJob; libraries::Bool, deferred_codegen::Bool, optimize::Bool, strip::Bool, validate::Bool, only_entry::Bool)
      @ GPUCompiler ~/.julia/packages/GPUCompiler/AdCnd/src/driver.jl:39
    [5] bpffunction_compile(source::GPUCompiler.FunctionSpec{var"#kernel#1", Tuple{Int64}}; format::Symbol, license::String, prog_section::String, btf::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ BPFnative ~/.julia/packages/BPFnative/LpXdL/src/compiler.jl:47
    [6] check_cache(cache::Dict{UInt64, Any}, compiler::Any, linker::Any, spec::GPUCompiler.FunctionSpec{var"#kernel#1", Tuple{Int64}}, prekey::UInt64; kwargs::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:format, :license, :btf), Tuple{Symbol, String, Bool}}})

@chriselrod
Copy link
Contributor

@eschnett Can we get a new release for SIMD.jl? It crashes on the latest release:

JIT session error: Symbols not found: [ llvm.experimental.vector.reduce.v2.fadd.v4f64 ]
Failure value returned from cantFail wrapped call
Failed to materialize symbols: { (JuliaOJIT, { jfptr_sum_353, julia_sum_352 }) }
UNREACHABLE executed at /workspace/srcdir/usr/include/llvm/Support/Error.h:749!

but should be fine on master.

@vchuravy
Copy link
Member Author

To look at:

ID time ratio memory ratio
["array", "accumulate", ("accumulate!", "Int")] 2.53 (5%) 1.00 (1%)
["array", "bool", "boolarray_true_load!"] 2.73 (5%) 1.00 (1%)
["array", "comprehension", ("collect", "Vector{Float64}")] 3.36 (5%) 1.00 (1%)
["array", "comprehension", ("comprehension_collect", "Vector{Float64}")] 3.04 (5%) 1.00 (1%)
["linalg", "arithmetic", ("cumsum!", "Int32", 1024)] 2.00 (45%) 1.00 (1%)

@nanosoldier
Copy link
Collaborator

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

@eschnett
Copy link
Contributor

Released SIMD 3.3.1.

@vchuravy vchuravy merged commit a08a3ff into master May 22, 2021
@vchuravy vchuravy deleted the vc/llvm12_upgrade branch May 22, 2021 21:10
@vchuravy
Copy link
Member Author

I will look at the remaining performance regressions over the next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream The issue is with an upstream dependency, e.g. LLVM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants