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

OptimizeMask pass fails on following input #105

Closed
vivekvpandya opened this issue Aug 9, 2024 · 1 comment
Closed

OptimizeMask pass fails on following input #105

vivekvpandya opened this issue Aug 9, 2024 · 1 comment

Comments

@vivekvpandya
Copy link

vivekvpandya commented Aug 9, 2024

stack trace

 #0 0x00007fc165e40437 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/local/mnt/workspace/users/vpandya/triton-cpu/python/triton/_C/libtriton.so+0x476c437)
 #1 0x00007fc162232787 triton_stacktrace_signal_handler(void*) /local/mnt/workspace/users/vpandya/triton-cpu/python/src/llvm.cc:525:8
 #2 0x00007fc165e3debc llvm::sys::RunSignalHandlers() (/local/mnt/workspace/users/vpandya/triton-cpu/python/triton/_C/libtriton.so+0x4769ebc)
 #3 0x00007fc165e40b0f SignalHandler(int) Signals.cpp:0:0
 #4 0x00007fc16988a090 (/lib/x86_64-linux-gnu/libc.so.6+0x43090)
 #5 0x00007fc16988a00b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #6 0x00007fc169869859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #7 0x00007fc169869729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
 #8 0x00007fc16987afd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
 #9 0x00007fc162104785 mlir::AttributeStorage::getAbstractAttribute() const /local/mnt/workspace/users/vpandya/.triton/llvm/llvm-657ec732-ubuntu-x64/include/llvm/Support/Casting.h:566:3
#10 0x00007fc162104785 mlir::Attribute::getTypeID() /local/mnt/workspace/users/vpandya/.triton/llvm/llvm-657ec732-ubuntu-x64/include/mlir/IR/Attributes.h:70:58
#11 0x00007fc162104785 bool mlir::detail::StorageUserBase<mlir::IntegerAttr, mlir::Attribute, mlir::detail::IntegerAttrStorage, mlir::detail::AttributeUniquer, mlir::TypedAttr::Trait>::classof<mlir::Attribute>(mlir::Attribute) /local/mnt/workspace/users/vpandya/.triton/llvm/llvm-657ec732-ubuntu-x64/include/mlir/IR/StorageUniquerSupport.h:114:28
#12 0x00007fc162104785 llvm::CastInfo<mlir::IntegerAttr, mlir::TypedAttr const, void>::isPossible(mlir::Attribute) /local/mnt/workspace/users/vpandya/.triton/llvm/llvm-657ec732-ubuntu-x64/include/mlir/IR/Attributes.h:423:25
#13 0x00007fc162104785 bool llvm::isa<mlir::IntegerAttr, mlir::TypedAttr>(mlir::TypedAttr const&) /local/mnt/workspace/users/vpandya/.triton/llvm/llvm-657ec732-ubuntu-x64/include/llvm/Support/Casting.h:549:46
#14 0x00007fc162104785 decltype(auto) llvm::cast<mlir::IntegerAttr, mlir::TypedAttr>(mlir::TypedAttr const&) /local/mnt/workspace/users/vpandya/.triton/llvm/llvm-657ec732-ubuntu-x64/include/llvm/Support/Casting.h:566:3
#15 0x00007fc162104785 (anonymous namespace)::CdivToDiv::matchAndRewrite(mlir::arith::DivSIOp, mlir::PatternRewriter&) const /local/mnt/workspace/users/vpandya/triton-cpu/third_party/cpu/lib/TritonCPUTransforms/OptimizeMasks.cpp:90:65
#16 0x00007fc16210751f mlir::detail::OpOrInterfaceRewritePatternBase<mlir::arith::DivSIOp>::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const /local/mnt/workspace/users/vpandya/.triton/llvm/llvm-657ec732-ubuntu-x64/include/mlir/IR/PatternMatch.h:332:3
#17 0x00007fc163c44adb 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::LogicalResult (mlir::Pattern const&)>)::$_2::operator()() const PatternApplicator.cpp:0:0
#18 0x00007fc163c415ff 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::LogicalResult (mlir::Pattern const&)>) (/local/mnt/workspace/users/vpandya/triton-cpu/python/triton/_C/libtriton.so+0x256d5ff)
#19 0x00007fc163c20cfc (anonymous namespace)::GreedyPatternRewriteDriver::processWorklist() GreedyPatternRewriteDriver.cpp:0:0
#20 0x00007fc163c1cedb mlir::applyPatternsAndFoldGreedily(mlir::Region&, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig, bool*) (/local/mnt/workspace/users/vpandya/triton-cpu/python/triton/_C/libtriton.so+0x2548edb)
#21 0x00007fc162102365 mlir::LogicalResult::failed() const /local/mnt/workspace/users/vpandya/.triton/llvm/llvm-657ec732-ubuntu-x64/include/mlir/Support/LogicalResult.h:44:25
#22 0x00007fc162102365 mlir::applyPatternsAndFoldGreedily(mlir::Operation*, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig, bool*) /local/mnt/workspace/users/vpandya/.triton/llvm/llvm-657ec732-ubuntu-x64/include/mlir/Transforms/GreedyPatternRewriteDriver.h:160:20#23 0x00007fc162102365 (anonymous namespace)::OptimizeMasks::runOnOperation() /local/mnt/workspace/users/vpandya/triton-cpu/third_party/cpu/lib/TritonCPUTransforms/OptimizeMasks.cpp:362:15
#24 0x00007fc16248dc46 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/local/mnt/workspace/users/vpandya/triton-cpu/python/triton/_C/libtriton.so+0xdb9c46)
#25 0x00007fc16248e591 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/local/mnt/workspace/users/vpandya/triton-cpu/python/triton/_C/libtriton.so+0xdba591)
#26 0x00007fc162490d5b mlir::PassManager::run(mlir::Operation*) (/local/mnt/workspace/users/vpandya/triton-cpu/python/triton/_C/libtriton.so+0xdbcd5b)
#27 0x00007fc1621a0c21 init_triton_ir(pybind11::module_&&)::'lambda233'(mlir::PassManager&, mlir::ModuleOp&)::operator()(mlir::PassManager&, mlir::ModuleOp&) const (.isra.0) /local/mnt/workspace/users/vpandya/triton-cpu/python/src/ir.cc:1708:9
#28 0x00007fc1621c10b8 operator() /local/mnt/workspace/users/vpandya/.triton/pybind11/pybind11-2.11.1/include/pybind11/pybind11.h:253:40
#29 0x00007fc1621c10b8 void pybind11::cpp_function::initialize<init_triton_ir(pybind11::module_&&)::'lambda233'(mlir::PassManager&, mlir::ModuleOp&), void, mlir::PassManager&, mlir::ModuleOp&, pybind11::name, pybind11::is_method, pybind11::sibling>(init_triton_ir(pybind11::module_&&)::'lambda233'(mlir::PassManager&, mlir::ModuleOp&)&&, void (*)(mlir::PassManager&, mlir::ModuleOp&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::'lambda1'(pybind11::detail::function_call&)::_FUN(pybind11::detail::function_call&) /local/mnt/workspace/users/vpandya/.triton/pybind11/pybind11-2.11.1/include/pybind11/pybind11.h:224:21
#30 0x00007fc162184ff4 pybind11::cpp_function::dispatcher(_object*, _object*, _object*) /local/mnt/workspace/users/vpandya/.triton/pybind11/pybind11-2.11.1/include/pybind11/pybind11.h:945:47
#31 0x00000000005ee159 cfunction_call /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Objects/methodobject.c:542:18
#32 0x000000000063939d _Py_LeaveRecursiveCallTstate /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Include/internal/pycore_ceval.h:123:32
#33 0x000000000063939d _PyObject_MakeTpCall /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Objects/call.c:216:9
#34 0x000000000058ee33 _PyEval_EvalFrameDefault /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Python/ceval.c:4776:13
#35 0x00000000006e14ff _PyEval_EvalFrame /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Include/internal/pycore_ceval.h:73:16
#36 0x00000000006e14ff _PyEval_Vector /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Python/ceval.c:6434:24
#37 0x00000000006e1787 PyEval_EvalCode /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Python/ceval.c:1149:5
#38 0x00000000006bb737 run_eval_code_obj /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Python/pythonrun.c:1742:8
#39 0x00000000006bb7c0 Py_DECREF /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Include/object.h:537:8
#40 0x00000000006bb7c0 run_mod /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Python/pythonrun.c:1763:5
#41 0x00000000006bb9db pyrun_file /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Python/pythonrun.c:1657:15
#42 0x00000000006bbfa4 _PyRun_SimpleFileObject /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Python/pythonrun.c:440:13
#43 0x00000000006bc067 _PyRun_AnyFileObject /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Python/pythonrun.c:79:15
#44 0x00000000006b3dcc pymain_run_file_obj /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Modules/main.c:361:17
#45 0x00000000006b3dcc pymain_run_file /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Modules/main.c:379:15
#46 0x00000000006b3dcc pymain_run_python /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Modules/main.c:601:21
#47 0x00000000006b3dcc Py_RunMain /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Modules/main.c:680:5
#48 0x00000000006b3f7d Py_BytesMain /build/python3.11-FUT4mb/python3.11-3.11.9/build-static/../Modules/main.c:735:1
#49 0x00007fc16986b083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#50 0x0000000000669dce _start (/usr/bin/python3.11+0x669dce)

IR files
triton_.ttcir.txt
triton_.ttir.txt

@ienkovich
Copy link
Collaborator

The problem was fixed by #101

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

No branches or pull requests

2 participants