[Mlir-commits] [mlir] Revert "[MLIR][XeGPU] Adding XeGPU 2d block operators (#84692)" (PR #85653)

Balaji V. Iyer. llvmlistbot at llvm.org
Mon Mar 18 17:36:42 PDT 2024


bviyer wrote:

@chencha3 and @joker-eph , Here is the full call-stack for the crash (hope this helps):

```
FAIL: MLIR :: Dialect/XeGPU/XeGPUOps.mlir (95 of 2716)
******************** TEST 'MLIR :: Dialect/XeGPU/XeGPUOps.mlir' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/<snip>/llvm-project/build/bin/mlir-opt /<snip>/llvm-project/mlir/test/Dialect/XeGPU/XeGPUOps.mlir | /<snip>/llvm-project/build/bin/FileCheck /<snip>/llvm-project/mlir/test/Dialect/XeGPU/XeGPUOps.mlir
# executed command: /<snip>/llvm-project/build/bin/mlir-opt /<snip>/llvm-project/mlir/test/Dialect/XeGPU/XeGPUOps.mlir
# .---command stderr------------
# | =================================================================
# | ==2980947==ERROR: AddressSanitizer: stack-use-after-return on address 0x7fa11e242b90 at pc 0x555f76a1d614 bp 0x7fffa2f443f0 sp 0x7fffa2f443e8
# | READ of size 8 at 0x7fa11e242b90 thread T0
# |     #0 0x555f76a1d613 in operator()<long int const*> /usr/include/c++/13/bits/predefined_ops.h:318
# |     #1 0x555f76a1d613 in __count_if<long int const*, __gnu_cxx::__ops::_Iter_pred<mlir::verifyListOfOperandsOrIntegers(Operation*, llvm::StringRef, unsigned int, llvm::ArrayRef<long int>, ValueRange)::<lambda(int64_t)> > > /usr/include/c++/13/bits/stl_algobase.h:2125
# |     #2 0x555f76a1d613 in count_if<long int const*, mlir::verifyListOfOperandsOrIntegers(Operation*, llvm::StringRef, unsigned int, llvm::ArrayRef<long int>, ValueRange)::<lambda(int64_t)> > /usr/include/c++/13/bits/stl_algo.h:4104
# |     #3 0x555f76a1d613 in count_if<llvm::ArrayRef<long int>&, mlir::verifyListOfOperandsOrIntegers(Operation*, llvm::StringRef, unsigned int, llvm::ArrayRef<long int>, ValueRange)::<lambda(int64_t)> > /<snip>/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1931
# |     #4 0x555f76a1d613 in mlir::verifyListOfOperandsOrIntegers(mlir::Operation*, llvm::StringRef, unsigned int, llvm::ArrayRef<long>, mlir::ValueRange) /<snip>/llvm-project/mlir/lib/Interfaces/ViewLikeInterface.cpp:30
# |     #5 0x555f76a2100e in mlir::detail::verifyOffsetSizeAndStrideOp(mlir::OffsetSizeAndStrideOpInterface) /<snip>/llvm-project/mlir/lib/Interfaces/ViewLikeInterface.cpp:63
# |     #6 0x555f69f7f570 in mlir::detail::OffsetSizeAndStrideOpInterfaceTrait<mlir::xegpu::CreateNdDescOp>::verifyTrait(mlir::Operation*) /<snip>/llvm-project/build/tools/mlir/include/mlir/Interfaces/ViewLikeInterface.h.inc:384
# |     #7 0x555f69f7f570 in std::enable_if<llvm::detail::detector<void, mlir::op_definition_impl::has_verify_trait, mlir::OffsetSizeAndStrideOpInterface::Trait<mlir::xegpu::CreateNdDescOp> >::value_t::value, mlir::LogicalResult>::type mlir::op_definition_impl::verifyTrait<mlir::OffsetSizeAndStrideOpInterface::Trait<mlir::xegpu::CreateNdDescOp> >(mlir::Operation*) /<snip>/llvm-project/mlir/include/mlir/IR/OpDefinition.h:1620
# |     #8 0x555f69f7f933 in mlir::LogicalResult mlir::op_definition_impl::verifyTraits<mlir::OpTrait::ZeroRegions<mlir::xegpu::CreateNdDescOp>, mlir::OpTrait::OneResult<mlir::xegpu::CreateNdDescOp>, mlir::OpTrait::OneTypedResult<mlir::xegpu::TensorDescType>::Impl<mlir::xegpu::CreateNdDescOp>, mlir::OpTrait::ZeroSuccessors<mlir::xegpu::CreateNdDescOp>, mlir::OpTrait::AtLeastNOperands<1u>::Impl<mlir::xegpu::CreateNdDescOp>, mlir::OpTrait::AttrSizedOperandSegments<mlir::xegpu::CreateNdDescOp>, mlir::OpTrait::OpInvariants<mlir::xegpu::CreateNdDescOp>, mlir::BytecodeOpInterface::Trait<mlir::xegpu::CreateNdDescOp>, mlir::ConditionallySpeculatable::Trait<mlir::xegpu::CreateNdDescOp>, mlir::OpTrait::AlwaysSpeculatableImplTrait<mlir::xegpu::CreateNdDescOp>, mlir::MemoryEffectOpInterface::Trait<mlir::xegpu::CreateNdDescOp>, mlir::ViewLikeOpInterface::Trait<mlir::xegpu::CreateNdDescOp>, mlir::OffsetSizeAndStrideOpInterface::Trait<mlir::xegpu::CreateNdDescOp> >(mlir::Operation*) /<snip>/llvm-project/mlir/include/mlir/IR/OpDefinition.h:1631
# |     #9 0x555f69f7fa2d in mlir::Op<mlir::xegpu::CreateNdDescOp, mlir::OpTrait::ZeroRegions, mlir::OpTrait::OneResult, mlir::OpTrait::OneTypedResult<mlir::xegpu::TensorDescType>::Impl, mlir::OpTrait::ZeroSuccessors, mlir::OpTrait::AtLeastNOperands<1u>::Impl, mlir::OpTrait::AttrSizedOperandSegments, mlir::OpTrait::OpInvariants, mlir::BytecodeOpInterface::Trait, mlir::ConditionallySpeculatable::Trait, mlir::OpTrait::AlwaysSpeculatableImplTrait, mlir::MemoryEffectOpInterface::Trait, mlir::ViewLikeOpInterface::Trait, mlir::OffsetSizeAndStrideOpInterface::Trait>::verifyInvariants(mlir::Operation*) /<snip>/llvm-project/mlir/include/mlir/IR/OpDefinition.h:2012
# |     #10 0x555f5e58bd44 in mlir::LogicalResult llvm::detail::UniqueFunctionBase<mlir::LogicalResult, mlir::Operation*>::CallImpl<mlir::LogicalResult (* const)(mlir::Operation*)>(void*, mlir::Operation*) /<snip>/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:221
# |     #11 0x555f5e64fe9a in llvm::unique_function<mlir::LogicalResult (mlir::Operation*) const>::operator()(mlir::Operation*) const /<snip>/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:411
# |     #12 0x555f69f7cb8d in mlir::RegisteredOperationName::Model<mlir::xegpu::CreateNdDescOp>::verifyInvariants(mlir::Operation*) /<snip>/llvm-project/mlir/include/mlir/IR/OperationSupport.h:558
# |     #13 0x555f6e15f782 in mlir::OperationName::verifyInvariants(mlir::Operation*) const /<snip>/llvm-project/mlir/include/mlir/IR/OperationSupport.h:317
# |     #14 0x555f6e15f782 in verifyOnEntrance /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:179
# |     #15 0x555f6e162d52 in operator()<mlir::Operation> /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:293
# |     #16 0x555f6e162d52 in operator()<(anonymous namespace)::OperationVerifier::verifyOperation(mlir::Operation&)::<lambda(auto:46*)> > /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:277
# |     #17 0x555f6e162d52 in verifyOperation /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:292
# |     #18 0x555f6e162d52 in verifyOpAndDominance /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:85
# |     #19 0x555f6e16d6fb in operator() /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:229
# |     #20 0x555f6e16d6fb in failableParallelForEach<mlir::Operation**, (anonymous namespace)::OperationVerifier::verifyOnExit(mlir::Operation&)::<lambda(mlir::Operation*)> > /<snip>/llvm-project/mlir/include/mlir/IR/Threading.h:46
# |     #21 0x555f6e16d6fb in failableParallelForEach<llvm::SmallVector<mlir::Operation*>&, (anonymous namespace)::OperationVerifier::verifyOnExit(mlir::Operation&)::<lambda(mlir::Operation*)> > /<snip>/llvm-project/mlir/include/mlir/IR/Threading.h:92
# |     #22 0x555f6e16d6fb in verifyOnExit /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:227
# |     #23 0x555f6e16330d in operator()<mlir::Operation> /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:286
# |     #24 0x555f6e16330d in operator()<(anonymous namespace)::OperationVerifier::verifyOperation(mlir::Operation&)::<lambda(auto:45*)> > /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:277
# |     #25 0x555f6e16330d in verifyOperation /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:285
# |     #26 0x555f6e16330d in verifyOpAndDominance /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:85
# |     #27 0x555f6e16d6fb in operator() /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:229
# |     #28 0x555f6e16d6fb in failableParallelForEach<mlir::Operation**, (anonymous namespace)::OperationVerifier::verifyOnExit(mlir::Operation&)::<lambda(mlir::Operation*)> > /<snip>/llvm-project/mlir/include/mlir/IR/Threading.h:46
# |     #29 0x555f6e16d6fb in failableParallelForEach<llvm::SmallVector<mlir::Operation*>&, (anonymous namespace)::OperationVerifier::verifyOnExit(mlir::Operation&)::<lambda(mlir::Operation*)> > /<snip>/llvm-project/mlir/include/mlir/IR/Threading.h:92
# |     #30 0x555f6e16d6fb in verifyOnExit /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:227
# |     #31 0x555f6e16330d in operator()<mlir::Operation> /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:286
# |     #32 0x555f6e16330d in operator()<(anonymous namespace)::OperationVerifier::verifyOperation(mlir::Operation&)::<lambda(auto:45*)> > /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:277
# |     #33 0x555f6e16330d in verifyOperation /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:285
# |     #34 0x555f6e16330d in verifyOpAndDominance /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:85
# |     #35 0x555f6e16c2a3 in mlir::verify(mlir::Operation*, bool) /<snip>/llvm-project/mlir/lib/IR/Verifier.cpp:423
# |     #36 0x555f766d5ea5 in finalize /<snip>/llvm-project/mlir/lib/AsmParser/Parser.cpp:842
# |     #37 0x555f766d5ea5 in parse /<snip>/llvm-project/mlir/lib/AsmParser/Parser.cpp:2736
# |     #38 0x555f766d5ea5 in mlir::parseAsmSourceFile(llvm::SourceMgr const&, mlir::Block*, mlir::ParserConfig const&, mlir::AsmParserState*, mlir::AsmParserCodeCompleteContext*) /<snip>/llvm-project/mlir/lib/AsmParser/Parser.cpp:2790
# |     #39 0x555f6d85ca8f in mlir::parseSourceFile(std::shared_ptr<llvm::SourceMgr> const&, mlir::Block*, mlir::ParserConfig const&, mlir::LocationAttr*) /<snip>/llvm-project/mlir/lib/Parser/Parser.cpp:46
# |     #40 0x555f6d85284b in mlir::OwningOpRef<mlir::ModuleOp> mlir::detail::parseSourceFile<mlir::ModuleOp, std::shared_ptr<llvm::SourceMgr> const&>(mlir::ParserConfig const&, std::shared_ptr<llvm::SourceMgr> const&) /<snip>/llvm-project/mlir/include/mlir/Parser/Parser.h:159
# |     #41 0x555f6d85284b in mlir::OwningOpRef<mlir::ModuleOp> mlir::parseSourceFile<mlir::ModuleOp>(std::shared_ptr<llvm::SourceMgr> const&, mlir::ParserConfig const&) /<snip>/llvm-project/mlir/include/mlir/Parser/Parser.h:189
# |     #42 0x555f6d85284b in mlir::parseSourceFileForTool(std::shared_ptr<llvm::SourceMgr> const&, mlir::ParserConfig const&, bool) /<snip>/llvm-project/mlir/include/mlir/Tools/ParseUtilities.h:31
# |     #43 0x555f6d85284b in performActions /<snip>/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:383
# |     #44 0x555f6d855f0a in processBuffer /<snip>/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:472
# |     #45 0x555f6d85647d in operator() /<snip>/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:547
# |     #46 0x555f6d85647d in callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer>, DialectRegistry&, const MlirOptMainConfig&)::<lambda(std::unique_ptr<llvm::MemoryBuffer>, llvm::raw_ostream&)> > /<snip>/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45
# |     #47 0x555f6dc1ae36 in llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::raw_ostream&)>::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::raw_ostream&) const /<snip>/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68
# |     #48 0x555f6dc1ae36 in mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) /<snip>/llvm-project/mlir/lib/Support/ToolUtilities.cpp:28
# |     #49 0x555f6d83de07 in mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) /<snip>/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:550
# |     #50 0x555f6d856b5a in mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) /<snip>/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:588
# |     #51 0x555f6d857f94 in mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) /<snip>/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:604
# |     #52 0x555f5e1889d2 in main /<snip>/llvm-project/mlir/tools/mlir-opt/mlir-opt.cpp:305
# |     #53 0x7fa1200456c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
# |     #54 0x7fa120045784 in __libc_start_main_impl ../csu/libc-start.c:360
# |     #55 0x555f5e188520 in _start (/<snip>/llvm-project/build/bin/mlir-opt+0x2f46520) (BuildId: b7e6261e7c5460d2b9d33d0c9288640d4941bca8)
# |
# | Address 0x7fa11e242b90 is located in stack of thread T0 at offset 144 in frame
# |     #0 0x555f69f6e835 in mlir::detail::OffsetSizeAndStrideOpInterfaceInterfaceTraits::Model<mlir::xegpu::CreateNdDescOp>::getStaticSizes(mlir::detail::OffsetSizeAndStrideOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*) /<snip>/llvm-project/build/tools/mlir/include/mlir/Interfaces/ViewLikeInterface.h.inc:426
# |
# |   This frame has 4 object(s):
# |     [32, 40) '<unknown>'
# |     [64, 72) '<unknown>'
# |     [96, 112) '<unknown>'
# |     [128, 192) '<unknown>' <== Memory access at offset 144 is inside this variable
# | HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
# |       (longjmp and C++ exceptions *are* supported)
# | SUMMARY: AddressSanitizer: stack-use-after-return /usr/include/c++/13/bits/predefined_ops.h:318 in operator()<long int const*>
# | Shadow bytes around the buggy address:
# |   0x7fa11e242900: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
# |   0x7fa11e242980: f5 f5 f5 f5 f5 f5 f5 f5 00 00 00 00 00 00 00 00
# |   0x7fa11e242a00: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
# |   0x7fa11e242a80: f5 f5 f5 f5 f5 f5 f5 f5 00 00 00 00 00 00 00 00
# |   0x7fa11e242b00: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
# | =>0x7fa11e242b80: f5 f5[f5]f5 f5 f5 f5 f5 f5 f5 f5 f5 00 00 00 00
# |   0x7fa11e242c00: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
# |   0x7fa11e242c80: f5 f5 f5 f5 f5 f5 f5 f5 00 00 00 00 00 00 00 00
# |   0x7fa11e242d00: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
# |   0x7fa11e242d80: f5 f5 f5 f5 f5 f5 f5 f5 00 00 00 00 00 00 00 00
# |   0x7fa11e242e00: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
# | Shadow byte legend (one shadow byte represents 8 application bytes):
# |   Addressable:           00
# |   Partially addressable: 01 02 03 04 05 06 07
# |   Heap left redzone:       fa
# |   Freed heap region:       fd
# |   Stack left redzone:      f1
# |   Stack mid redzone:       f2
# |   Stack right redzone:     f3
# |   Stack after return:      f5
# |   Stack use after scope:   f8
# |   Global redzone:          f9
# |   Global init order:       f6
# |   Poisoned by user:        f7
# |   Container overflow:      fc
# |   Array cookie:            ac
# |   Intra object redzone:    bb
# |   ASan internal:           fe
# |   Left alloca redzone:     ca
# |   Right alloca redzone:    cb
# | ==2980947==ABORTING
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /<snip>/llvm-project/build/bin/FileCheck /<snip>/llvm-project/mlir/test/Dialect/XeGPU/XeGPUOps.mlir
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /<snip>/llvm-project/build/bin/FileCheck /<snip>/llvm-project/mlir/test/Dialect/XeGPU/XeGPUOps.mlir
# `-----------------------------
# error: command failed with exit status: 2

--

********************
********************
Failed Tests (1):
  MLIR :: Dialect/XeGPU/XeGPUOps.mlir


Testing Time: 20.12s

Total Discovered Tests: 2716
  Unsupported      :  480 (17.67%)
  Passed           : 2234 (82.25%)
  Expectedly Failed:    1 (0.04%)
  Failed           :    1 (0.04%)
FAILED: tools/mlir/test/CMakeFiles/check-mlir /<snip>/llvm-project/build/tools/mlir/test/CMakeFiles/check-mlir
cd /<snip>/llvm-project/build/tools/mlir/test && /usr/bin/python3 /<snip>/llvm-project/build/./bin/llvm-lit -sv /<snip>/llvm-project/build/tools/mlir/test
ninja: build stopped: subcommand failed.
```

https://github.com/llvm/llvm-project/pull/85653


More information about the Mlir-commits mailing list