-
Notifications
You must be signed in to change notification settings - Fork 0
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
negative nodes for pattern matching #1
Open
bollu
wants to merge
2
commits into
master
Choose a base branch
from
negative-nodes
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bollu
added a commit
that referenced
this pull request
Feb 4, 2022
_druid@siddharth-lean ~/phd/mlir-hoopl-rete/build/bin ‹master› ╰─$ LLVM_SYMBOLIZER_PATH=`which llvm-symbolizer-7` ./rete --bench-pdl ../../test/simple.mlir rete: /home/siddu_druid/phd/mlir-hoopl-rete/llvm-project/mlir/lib/Rewrite/ByteCode.cpp:489: void (anonymous namespace)::Generator::generate(mlir::ModuleOp): Assertion `matcherFunc && rewriterModule && "invalid PDL Interpreter module"' failed. PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump: 0. Program arguments: ./rete --bench-pdl ../../test/simple.mlir #0 0x000000000049ad43 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./rete+0x49ad43) #1 0x00000000004989fe llvm::sys::RunSignalHandlers() (./rete+0x4989fe) #2 0x000000000049b386 SignalHandler(int) (./rete+0x49b386) #3 0x00007f5d7e0a5ef0 __restore_rt (/nix/store/563528481rvhc5kxwipjmg6rqrl95mdx-glibc-2.33-56/lib/libpthread.so.0+0x12ef0) #4 0x00007f5d7dbc7baa __GI_raise (/nix/store/563528481rvhc5kxwipjmg6rqrl95mdx-glibc-2.33-56/lib/libc.so.6+0x3bbaa) #5 0x00007f5d7dbb2523 __GI_abort (/nix/store/563528481rvhc5kxwipjmg6rqrl95mdx-glibc-2.33-56/lib/libc.so.6+0x26523) #6 0x00007f5d7dbb241f _nl_load_domain.cold.0 (/nix/store/563528481rvhc5kxwipjmg6rqrl95mdx-glibc-2.33-56/lib/libc.so.6+0x2641f) #7 0x00007f5d7dbc05f2 (/nix/store/563528481rvhc5kxwipjmg6rqrl95mdx-glibc-2.33-56/lib/libc.so.6+0x345f2) #8 0x0000000001226e2d mlir::detail::PDLByteCode::PDLByteCode(mlir::ModuleOp, llvm::StringMap<std::function<mlir::LogicalResult (llvm::ArrayRef<mlir::PDLValue>, mlir::ArrayAttr, mlir::PatternRewriter&)>, llvm::MallocAllocator>, llvm::StringMap<std::function<void (llvm::ArrayRef<mlir::PDLValue>, mlir::ArrayAttr, mlir::PatternRewriter&, mlir::PDLResultList&)>, llvm::MallocAllocator>) (./rete+0x1226e2d) #9 0x000000000121ef05 std::_MakeUniq<mlir::detail::PDLByteCode>::__single_object std::make_unique<mlir::detail::PDLByteCode, mlir::ModuleOp&, llvm::StringMap<std::function<mlir::LogicalResult (llvm::ArrayRef<mlir::PDLValue>, mlir::ArrayAttr, mlir::PatternRewriter&)>, llvm::MallocAllocator>, llvm::StringMap<std::function<void (llvm::ArrayRef<mlir::PDLValue>, mlir::ArrayAttr, mlir::PatternRewriter&, mlir::PDLResultList&)>, llvm::MallocAllocator> >(mlir::ModuleOp&, llvm::StringMap<std::function<mlir::LogicalResult (llvm::ArrayRef<mlir::PDLValue>, mlir::ArrayAttr, mlir::PatternRewriter&)>, llvm::MallocAllocator>&&, llvm::StringMap<std::function<void (llvm::ArrayRef<mlir::PDLValue>, mlir::ArrayAttr, mlir::PatternRewriter&, mlir::PDLResultList&)>, llvm::MallocAllocator>&&) (./rete+0x121ef05) <Up>[1] 23174 abort LLVM_SYMBOLIZER_PATH=`which llvm-symbolizer-7` ./rete --bench-pdl
bollu
added a commit
that referenced
this pull request
Feb 4, 2022
╭─siddu_druid@siddharth-lean ~/phd/mlir-hoopl-rete/test ‹master●› ╰─$ mlir-opt pdl-simple.mlir -allow-unregistered-dialect -test-pdl-bytecode-pass 148 ↵ PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump: 0. Program arguments: mlir-opt pdl-simple.mlir -allow-unregistered-dialect -test-pdl-bytecode-pass #0 0x00000000008be623 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/siddu_druid/phd/mlir-hoopl-rete/llvm-project/build/bin/mlir-opt+0x8be623) #1 0x00000000008bc2de llvm::sys::RunSignalHandlers() (/home/siddu_druid/phd/mlir-hoopl-rete/llvm-project/build/bin/mlir-opt+0x8bc2de) #2 0x00000000008bec16 SignalHandler(int) (/home/siddu_druid/phd/mlir-hoopl-rete/llvm-project/build/bin/mlir-opt+0x8bec16) #3 0x00007fad2398d730 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12730) #4 0x0000000000faa046 std::enable_if<!(std::is_convertible<mlir::ValueRange&, mlir::Operation*>::value), void>::type mlir::ResultRange::replaceAllUsesWith<mlir::ValueRange&>(mlir::ValueRange&) (/home/siddu_druid/phd/mlir-hoopl-rete/llvm-pr oject/build/bin/mlir-opt+0xfaa046) #5 0x0000000001862fac mlir::RewriterBase::replaceOp(mlir::Operation*, mlir::ValueRange) (/home/siddu_druid/phd/mlir-hoopl-rete/llvm-project/build/bin/mlir-opt+0x1862fac) #6 0x00000000018d6ad5 (anonymous namespace)::ByteCodeExecutor::execute(mlir::PatternRewriter&, llvm::SmallVectorImpl<mlir::detail::PDLByteCode::MatchResult>*, llvm::Optional<mlir::Location>) (/home/siddu_druid/phd/mlir-hoopl-rete/llvm-proj ect/build/bin/mlir-opt+0x18d6ad5) #7 0x00000000018d8ec1 mlir::detail::PDLByteCode::rewrite(mlir::PatternRewriter&, mlir::detail::PDLByteCode::MatchResult const&, mlir::detail::PDLByteCodeMutableState&) const (/home/siddu_druid/phd/mlir-hoopl-rete/llvm-project/build/bin/mli r-opt+0x18d8ec1) #8 0x00000000018f15b6 mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResu lt (mlir::Pattern const&)>) (/home/siddu_druid/phd/mlir-hoopl-rete/llvm-project/build/bin/mlir-opt+0x18f15b6) #9 0x00000000017aab4c mlir::applyPatternsAndFoldGreedily(llvm::MutableArrayRef<mlir::Region>, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig) (/home/siddu_druid/phd/mlir-hoopl-rete/llvm-project/build/bin/mlir-opt+0x17aab4c ) signed int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/siddu_druid/phd/mlir-hoopl-rete/llvm-project/build/bin/mlir-opt+0x174f404) +0x1725bf0) try&, llvm::ThreadPool*) (/home/siddu_druid/phd/mlir-hoopl-rete/llvm-project/build/bin/mlir-opt+0x1723dfa) ol, bool, bool) (/home/siddu_druid/phd/mlir-hoopl-rete/llvm-project/build/bin/mlir-opt+0x1723aaa) [2] 27957 segmentation fault mlir-opt pdl-simple.mlir -allow-unregistered-dialect -test-pdl-bytecode-pass ╭─siddu_druid@siddharth-lean ~/phd/mlir-hoopl-rete/test ‹master●›
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm not sure we really need this power, but it seems interesting to know how to implement. It lets us express things like