-
Notifications
You must be signed in to change notification settings - Fork 127
const: Assertion `found != origToNewForward.end()' failed. #2270
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
Comments
The explorer for llvm-20 seems broken, but 18 runs in an Enzyme error, even though a different one. Rust's llvm fork is at commit acaea3d2bb8f3, but I guess any llvm-20 should do. |
Now that deadlines are over, ping @wsmoses |
Per your chat question, it fails on LLVM 20 and 19 with the same error shown above. On LLVM18, 17, and 16 it fails with (but I obviously don't care about old ones, just FYI): ➜ ad git:(main) ~/prog/llvm18/build/bin/opt --load-pass-plugin=/home/manuel/prog/Enzyme/enzyme/build18/Enzyme/LLVMEnzyme-18.so -passes=enzyme -S foo.ll
call: %3 = tail call i8 @llvm.scmp.i8.i32(i32 0, i32 0) #1
+ %8 = call ptr @calloc(i64 0) #1
+ tail call void @free(ptr %8) #1
opt: /home/manuel/prog/Enzyme/enzyme/Enzyme/AdjointGenerator.h:5997: void AdjointGenerator::visitCallInst(llvm::CallInst&): Assertion `overwritten_args_map.find(&call) != overwritten_args_map.end() || Mode == DerivativeMode::ForwardMode || Mode == DerivativeMode::ForwardModeError' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/manuel/prog/llvm18/build/bin/opt --load-pass-plugin=/home/manuel/prog/Enzyme/enzyme/build18/Enzyme/LLVMEnzyme-18.so -passes=enzyme -S foo.ll
#0 0x0000618a0c244230 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/manuel/prog/llvm18/build/bin/opt+0x1b88230)
#1 0x0000618a0c24163f llvm::sys::RunSignalHandlers() (/home/manuel/prog/llvm18/build/bin/opt+0x1b8563f)
#2 0x0000618a0c241795 SignalHandler(int) Signals.cpp:0:0
#3 0x00007de818c45320 (/lib/x86_64-linux-gnu/libc.so.6+0x45320)
#4 0x00007de818c9eb1c __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#5 0x00007de818c9eb1c __pthread_kill_internal ./nptl/pthread_kill.c:78:10
#6 0x00007de818c9eb1c pthread_kill ./nptl/pthread_kill.c:89:10
#7 0x00007de818c4526e raise ./signal/../sysdeps/posix/raise.c:27:6
#8 0x00007de818c288ff abort ./stdlib/abort.c:81:7
#9 0x00007de818c2881b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x00007de818c3b507 (/lib/x86_64-linux-gnu/libc.so.6+0x3b507)
#11 0x00007de8184cb712 AdjointGenerator::visitCallInst(llvm::CallInst&) /home/manuel/prog/Enzyme/enzyme/Enzyme/AdjointGenerator.h:6001:10
#12 0x00007de818510eed llvm::InstVisitor<AdjointGenerator, void>::delegateCallInst(llvm::CallInst&) /home/manuel/prog/llvm18/llvm/include/llvm/IR/InstVisitor.h:305:3
#13 0x00007de81850288d llvm::InstVisitor<AdjointGenerator, void>::visitCall(llvm::CallInst&) /home/manuel/prog/llvm18/llvm/include/llvm/IR/Instruction.def:209:1
#14 0x00007de8184f2fd9 llvm::InstVisitor<AdjointGenerator, void>::visit(llvm::Instruction&) /home/manuel/prog/llvm18/llvm/include/llvm/IR/Instruction.def:209:1
#15 0x00007de8184df5c3 llvm::InstVisitor<AdjointGenerator, void>::visit(llvm::Instruction*) /home/manuel/prog/llvm18/llvm/include/llvm/IR/InstVisitor.h:111:49
#16 0x00007de818488bc2 EnzymeLogic::CreatePrimalAndGradient(RequestContext, ReverseCacheKey const&&, TypeAnalysis&, AugmentedReturn const*, bool) /home/manuel/prog/Enzyme/enzyme/Enzyme/EnzymeLogic.cpp:4290:7
#17 0x00007de81841310a (anonymous namespace)::EnzymeBase::HandleAutoDiff(llvm::Instruction*, unsigned int, llvm::Value*, llvm::Type*, llvm::SmallVectorImpl<llvm::Value*>&, std::map<int, llvm::Type*, std::less<int>, std::allocator<std::pair<int const, llvm::Type*>>> const&, std::vector<DIFFE_TYPE, std::allocator<DIFFE_TYPE>> const&, llvm::Function*, DerivativeMode, (anonymous namespace)::EnzymeBase::Options&, bool, llvm::SmallVectorImpl<llvm::CallInst*>&) /home/manuel/prog/Enzyme/enzyme/Enzyme/Enzyme.cpp:1752:46
#18 0x00007de818414edc (anonymous namespace)::EnzymeBase::HandleAutoDiffArguments(llvm::CallInst*, DerivativeMode, bool, llvm::SmallVectorImpl<llvm::CallInst*>&) /home/manuel/prog/Enzyme/enzyme/Enzyme/Enzyme.cpp:2017:26
#19 0x00007de81841a282 (anonymous namespace)::EnzymeBase::lowerEnzymeCalls(llvm::Function&, std::set<llvm::Function*, std::less<llvm::Function*>, std::allocator<llvm::Function*>>&) /home/manuel/prog/Enzyme/enzyme/Enzyme/Enzyme.cpp:2775:48
#20 0x00007de81841ba4b (anonymous namespace)::EnzymeBase::run(llvm::Module&) /home/manuel/prog/Enzyme/enzyme/Enzyme/Enzyme.cpp:3002:15
#21 0x00007de81842455e EnzymeNewPM::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/manuel/prog/Enzyme/enzyme/Enzyme/Enzyme.cpp:3263:56
#22 0x00007de81846000d llvm::detail::PassModel<llvm::Module, EnzymeNewPM, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/manuel/prog/llvm18/llvm/include/llvm/IR/PassManagerInternal.h:90:3
#23 0x0000618a0bccdd11 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/manuel/prog/llvm18/build/bin/opt+0x1611d11)
#24 0x0000618a0ac58135 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) (/home/manuel/prog/llvm18/build/bin/opt+0x59c135)
#25 0x0000618a0abb6d94 main (/home/manuel/prog/llvm18/build/bin/opt+0x4fad94)
#26 0x00007de818c2a1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#27 0x00007de818c2a28b call_init ./csu/../csu/libc-start.c:128:20
#28 0x00007de818c2a28b __libc_start_main ./csu/../csu/libc-start.c:347:5
#29 0x0000618a0ac4bf65 _start (/home/manuel/prog/llvm18/build/bin/opt+0x58ff65)
[1] 105395 IOT instruction (core dumped) ~/prog/llvm18/build/bin/opt -passes=enzyme -S foo.ll |
/home/manuel/prog/rust-middle/build/x86_64-unknown-linux-gnu/llvm/build/bin/opt reduced.ll --load-pass-plugin=/home/manuel/prog/rust-middle/build/x86_64-unknown-linux-gnu/enzyme/build/Enzyme/LLVMEnzyme-20.so -passes='enzyme' -S
The text was updated successfully, but these errors were encountered: