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

[Make] remove BINARYBUILDER_LLVM_ASSERTS and use LLVM_ASSERTIONS instead #38775

Merged
merged 2 commits into from
Jan 18, 2021

Conversation

vchuravy
Copy link
Member

@vchuravy vchuravy commented Dec 8, 2020

Marked as a draft since the assert binaries are older than the current release binaries.

@staticfloat is currently building those manually and building them automatically involves JuliaPackaging/BinaryBuilder.jl#778 (comment) and JuliaPackaging/BinaryBuilder.jl#917

CI is still set-up to run LLVM_ASSERTIONS=1 so this fixes #38244

@vchuravy
Copy link
Member Author

vchuravy commented Dec 8, 2020

And indeed we are hitting assertion errors:

 cd /buildworker/worker/package_linux64/build/base && /buildworker/worker/package_linux64/build/usr/bin/julia -C "generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)" --output-ji /buildworker/worker/package_linux64/build/usr/lib/julia/corecompiler.ji.tmp --startup-file=no --warn-overwrite=yes -g0 -O0 compiler/compiler.jl
Expected<T> must be checked before access or destruction.
Expected<T> value was in success state. (Note: Expected<T> values in success mode must still be checked prior to being destroyed).
/bin/sh: line 1:  3509 Aborted                 (core dumped) /buildworker/worker/package_linux64/build/usr/bin/julia -C "generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)" --output-ji /buildworker/worker/package_linux64/build/usr/lib/julia/corecompiler.ji.tmp --startup-file=no --warn-overwrite=yes -g0 -O0 compiler/compiler.jl
make[1]: *** [/buildworker/worker/package_linux64/build/usr/lib/julia/corecompiler.ji] Error 134
make: *** [julia-sysimg-ji] Error 2
make[1]: Leaving directory `/buildworker/worker/package_linux64/build'

@vtjnash vtjnash force-pushed the vc/llvm_asserts branch 3 times, most recently from bea5ff9 to 4f9fb43 Compare December 10, 2020 05:48
@vtjnash
Copy link
Member

vtjnash commented Dec 10, 2020

Looks like we solved all Julia errors, now we're just hitting one inside GlobalISel for linuxaarch64

@vchuravy vchuravy added the backport 1.6 Change should be backported to release-1.6 label Dec 10, 2020
@KristofferC KristofferC mentioned this pull request Dec 11, 2020
53 tasks
@vchuravy vchuravy changed the base branch from master to vc/llvm_11_patches December 17, 2020 19:57
@vchuravy vchuravy marked this pull request as ready for review December 17, 2020 19:57
@vchuravy
Copy link
Member Author

The dream is not alive:

      From worker 3:	julia: /workspace/srcdir/llvm-project/llvm/lib/IR/Instructions.cpp:455: void llvm::CallInst::init(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, const llvm::Twine&): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed.
      From worker 3:	
      From worker 3:	signal (6): Aborted
      From worker 3:	in expression starting at /buildworker/worker/tester_linuxaarch64/build/share/julia/test/keywordargs.jl:321
      From worker 3:	gsignal at /lib/aarch64-linux-gnu/libc.so.6 (unknown line)
      From worker 3:	abort at /lib/aarch64-linux-gnu/libc.so.6 (unknown line)
      From worker 3:	Allocations: 548533655 (Pool: 547962150; Big: 571505); GC: 884

Base automatically changed from vc/llvm_11_patches to master December 17, 2020 22:17
@KristofferC KristofferC mentioned this pull request Dec 19, 2020
26 tasks
src/jitlayers.cpp Outdated Show resolved Hide resolved
@Keno
Copy link
Member

Keno commented Jan 5, 2021

Blocked by https://bugs.llvm.org/show_bug.cgi?id=48661 is my understanding?

@vchuravy
Copy link
Member Author

vchuravy commented Jan 6, 2021

Blocked by https://bugs.llvm.org/show_bug.cgi?id=48661 is my understanding?

Yes and whatever causes (on AArch64):

      From worker 10:	Wrong types for attribute: inalloca nest noalias nocapture nonnull readnone readonly signext sret zeroext byval(half) preallocated(half) dereferenceable(1) dereferenceable_or_null(1)
      From worker 10:	  %639 = call half inttoptr (i64 281472804681464 to half (i32, float, double, half)*)(i32 %623, float %628, double %636, half zeroext %638) [ "jl_roots"({} addrspace(10)* %176, {} addrspace(10)* %174, {} addrspace(10)* %172, {} addrspace(10)* %170) ], !dbg !19
      From worker 10:	Wrong types for attribute: inalloca nest noalias nocapture nonnull readnone readonly signext sret zeroext byval(half) preallocated(half) dereferenceable(1) dereferenceable_or_null(1)
      From worker 10:	  %700 = call [2 x i64] inttoptr (i64 281472804681520 to [2 x i64] (i32, float, double, half)*)(i32 %684, float %689, double %697, half zeroext %699) [ "jl_roots"({} addrspace(10)* %670, {} addrspace(10)* %668, {} addrspace(10)* %666, {} addrspace(10)* %664) ], !dbg !38
      From worker 10:	julia: /workspace/srcdir/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2369: llvm::slpvectorizer::BoUpSLP::~BoUpSLP(): Assertion `!verifyFunction(*F, &dbgs())' failed.
      From worker 10:	
      From worker 10:	signal (6): Aborted
      From worker 10:	in expression starting at /buildworker/worker/tester_linuxaarch64/build/share/julia/test/ccall.jl:1151
      From worker 10:	gsignal at /lib/aarch64-linux-gnu/libc.so.6 (unknown line)
      From worker 10:	abort at /lib/aarch64-linux-gnu/libc.so.6 (unknown line)
      From worker 10:	Allocations: 289993769 (Pool: 289871907; Big: 121862); GC: 366

src/jitlayers.cpp Outdated Show resolved Hide resolved
src/jitlayers.cpp Outdated Show resolved Hide resolved
@vchuravy vchuravy mentioned this pull request Jan 12, 2021
@vchuravy vchuravy mentioned this pull request Jan 14, 2021
@vchuravy vchuravy force-pushed the vc/llvm_asserts branch 2 times, most recently from 6082e89 to dba2bc6 Compare January 16, 2021 02:15
@@ -1053,7 +1053,7 @@ std::string generate_func_sig(const char *fname)
// see pull req #978. need to annotate signext/zeroext for
// small integer arguments.
jl_datatype_t *bt = (jl_datatype_t*)tti;
if (jl_datatype_size(bt) < 4) {
if (jl_datatype_size(bt) < 4 && bt != jl_float16_type) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vchuravy vchuravy changed the base branch from master to vc/llvm11.0.1 January 17, 2021 21:20
@vchuravy vchuravy requested a review from vtjnash January 17, 2021 21:20
@vchuravy vchuravy merged commit 0c20d46 into vc/llvm11.0.1 Jan 18, 2021
@vchuravy vchuravy deleted the vc/llvm_asserts branch January 18, 2021 02:22
@vchuravy
Copy link
Member Author

vchuravy commented Jan 18, 2021

Merged into the staging branch for LLVM 11.0.1.

@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label Jan 19, 2021
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

Successfully merging this pull request may close these issues.

CI should be using LLVM Asserts build
4 participants