llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Segmentation fault (core dumped) in triton

Open hunterkritik-byte opened this issue 2 months ago • 3 comments

poc.mlir:

#H_ac321c5b_shared = #ttg.swizzled_shared<{vec = 1, perPhase = 1, maxPhase = 1, order = [0]}>
#H_ac321c5b_smem = #ttg.shared_memory
#D_fff0dcf6_A_636a6103_blocked = #ttg.blocked<{sizePerThread = [16, 1], threadsPerWarp = [4, 8], warpsPerCTA = [1, 4], order = [0, 1]}>
#D_fff0dcf6_B_ac321c5b_shared = #ttg.swizzled_shared<{vec = 1, perPhase = 1, maxPhase = 1, order = [0]}>
#D_fff0dcf6_B_ac321c5b_smem = #ttg.shared_memory
module attributes {"ttg.num-ctas" = 1 : i32, "ttg.num-warps" = 1 : i32, ttg.shared = 65544 : i32, ttg.target = "hip:gfx1250", "ttg.threads-per-warp" = 32 : i32, "ttg.total-num-warps" = 1 : i32} {
tt.func public @H_ac321c5b_alias_matrix_shared() {
    %buf0 = ttg.local_alloc {allocation.offset = 0 : i32} : () -> !ttg.memdesc<32xf32, #H_ac321c5b_shared, #H_ac321c5b_smem, mutable>
    %buf1 = ttg.local_alloc {allocation.offset = 16 : i32} : () -> !ttg.memdesc<32xf32, #H_ac321c5b_shared, #H_ac321c5b_smem, mutable>
    %bar = ttg.local_alloc {allocation.offset = 4096 : i32} : () -> !ttg.memdesc<1xi64, #H_ac321c5b_shared, #H_ac321c5b_smem, mutable>
    %dfff0dcf6_imin = arith.constant -2147483648 : i32    // INT_MIN  // state fusion
    %dfff0dcf6_f32  = arith.sitofp %dfff0dcf6_imin : i32 to f32
    %dfff0dcf6_f64  = arith.extf %dfff0dcf6_f32 : f32 to f64
    // 0.0 / 0.0 produces NaN — constant folder must not crash
    %dfff0dcf6_zero = arith.constant 0.0 : f64
    %dfff0dcf6_nan  = arith.divf %dfff0dcf6_zero, %dfff0dcf6_zero : f64
    // minimumf with NaN: result must be NaN per IEEE 754-2019
    %dfff0dcf6_r    = arith.minimumf %dfff0dcf6_f64, %dfff0dcf6_nan : f64
    // extf then truncf roundtrip: must be idempotent for finite values
    %dfff0dcf6_back = arith.truncf %dfff0dcf6_r : f64 to f32
    %dfff0dcf6_out  = arith.extf %dfff0dcf6_back : f32 to f64
    amdg.init_barrier %bar, 1 : !ttg.memdesc<1xi64, #H_ac321c5b_shared, #H_ac321c5b_smem, mutable>
    ttg.local_load %buf0 : !ttg.memdesc<32xf32, #H_ac321c5b_shared, #H_ac321c5b_smem, mutable> -> tensor<32xf32>
    ttg.local_load %buf1 : !ttg.memdesc<32xf32, #H_ac321c5b_shared, #H_ac321c5b_smem, mutable> -> tensor<32xf32>
    tt.return
  }
}

Crash:

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.      Program arguments: ./triton-opt poc.mlir -allow-unregistered-dialect --mlir-print-op-on-diagnostic --allocate-shared-memory --tritongpu-global-scratch-memory-allocation --convert-triton-amdgpu-to-llvm=gfx-arch=gfx942
 #0 0x00007f920fe345ca llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./triton-opt+0x858e5ca)
 #1 0x00007f920fe314ce llvm::sys::RunSignalHandlers() (./triton-opt+0x858b4ce)
 #2 0x00007f920fe354cb SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007f92072c5330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #4 0x00007f920f9454a4 mlir::Attribute::getContext() const (./triton-opt+0x809f4a4)
 #5 0x00007f9207f555ed getLoadedDialect<mlir::triton::gpu::TritonGPUDialect> /mnt/d/fusion-fuzz/projects/triton/deps/llvm-b010a18d-ubuntu-x64/include/mlir/IR/MLIRContext.h:94:29
 #6 0x00007f9207f555ed toLinearLayout /mnt/d/fusion-fuzz/projects/triton/triton-src/lib/Dialect/TritonGPU/IR/LinearLayoutConversions.cpp:1317:15
 #7 0x00007f9207f555ed mlir::triton::gpu::toLinearLayout(mlir::RankedTensorType) /mnt/d/fusion-fuzz/projects/triton/triton-src/lib/Dialect/TritonGPU/IR/LinearLayoutConversions.cpp:1271:10
 #8 0x00007f92081b71f5 Twine /mnt/d/fusion-fuzz/projects/triton/deps/llvm-b010a18d-ubuntu-x64/include/llvm/ADT/Twine.h:259:19
 #9 0x00007f92081b71f5 (anonymous namespace)::LocalLoadOpConversion::matchAndRewrite(mlir::triton::gpu::LocalLoadOp, mlir::triton::gpu::LocalLoadOpAdaptor, mlir::ConversionPatternRewriter&) const /mnt/d/fusion-fuzz/projects/triton/triton-src/lib/Conversion/TritonGPUToLLVM/MemoryOpToLLVM.cpp:196:55
#10 0x00007f92081bc9f2 llvm::LogicalResult mlir::ConversionPattern::dispatchTo1To1<mlir::ConvertOpToLLVMPattern<mlir::triton::gpu::LocalLoadOp, false>, mlir::triton::gpu::LocalLoadOp>(mlir::ConvertOpToLLVMPattern<mlir::triton::gpu::LocalLoadOp, false> const&, mlir::triton::gpu::LocalLoadOp, mlir::triton::gpu::LocalLoadOp::GenericAdaptor<llvm::ArrayRef<mlir::ValueRange> >, mlir::ConversionPatternRewriter&) /mnt/d/fusion-fuzz/projects/triton/deps/llvm-b010a18d-ubuntu-x64/include/mlir/Transforms/DialectConversion.h:1069:15
#11 0x00007f92081bc8d8 mlir::ConvertOpToLLVMPattern<mlir::triton::gpu::LocalLoadOp, false>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::ValueRange>, mlir::ConversionPatternRewriter&) const /mnt/d/fusion-fuzz/projects/triton/deps/llvm-b010a18d-ubuntu-x64/include/mlir/Conversion/LLVMCommon/Pattern.h:264:3
#12 0x00007f920f1a3114 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const (./triton-opt+0x78fd114)
#13 0x00007f920f1fe822 void llvm::function_ref<void ()>::callback_fn<mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>)::$_6>(long) PatternApplicator.cpp:0:0
#14 0x00007f920f1fae94 mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) (./triton-opt+0x7954e94)
#15 0x00007f920f1a4ede (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*) DialectConversion.cpp:0:0
#16 0x00007f920f1a46b5 mlir::OperationConverter::convert(mlir::Operation*, bool) (./triton-opt+0x78fe6b5)
#17 0x00007f920f1a598e mlir::OperationConverter::applyConversion(llvm::ArrayRef<mlir::Operation*>) (./triton-opt+0x78ff98e)
#18 0x00007f920f1b5198 void llvm::function_ref<void ()>::callback_fn<applyConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig, (anonymous namespace)::OpConversionMode)::$_43>(long) DialectConversion.cpp:0:0
#19 0x00007f920f1ab815 applyConversion(llvm::ArrayRef<mlir::Operation*>, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig, (anonymous namespace)::OpConversionMode) DialectConversion.cpp:0:0
#20 0x00007f920f1ab8eb mlir::applyPartialConversion(mlir::Operation*, mlir::ConversionTarget const&, mlir::FrozenRewritePatternSet const&, mlir::ConversionConfig) (./triton-opt+0x79058eb)
#21 0x00007f92086ca1c0 (anonymous namespace)::ConvertTritonAMDGPUToLLVM::runOnOperation() /mnt/d/fusion-fuzz/projects/triton/triton-src/third_party/amd/lib/TritonAMDGPUToLLVM/TritonGPUToLLVM.cpp:236:16
#22 0x00007f9208802c2b mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (./triton-opt+0xf5cc2b)
#23 0x00007f92088037a9 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (./triton-opt+0xf5d7a9)
#24 0x00007f920880a7c2 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (./triton-opt+0xf647c2)
#25 0x00007f920880a032 mlir::PassManager::run(mlir::Operation*) (./triton-opt+0xf64032)
#26 0x00007f92087f5107 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#27 0x00007f92087f439c llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::MemoryBufferRef const&, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_3>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::MemoryBufferRef const&, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#28 0x00007f920fa52801 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, llvm::MemoryBufferRef const&, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (./triton-opt+0x81ac801)
#29 0x00007f92087ea702 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (./triton-opt+0xf44702)
#30 0x00007f92087eab01 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (./triton-opt+0xf44b01)
#31 0x00007f92087ead3d mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (./triton-opt+0xf44d3d)
#32 0x00007f92087d4c0c succeeded /mnt/d/fusion-fuzz/projects/triton/deps/llvm-b010a18d-ubuntu-x64/include/llvm/Support/LogicalResult.h:40:45
#33 0x00007f92087d4c0c asMainReturnCode /mnt/d/fusion-fuzz/projects/triton/deps/llvm-b010a18d-ubuntu-x64/include/mlir/Tools/mlir-opt/MlirOptMain.h:436:12
#34 0x00007f92087d4c0c main /mnt/d/fusion-fuzz/projects/triton/triton-src/bin/triton-opt.cpp:9:10
#35 0x00007f92072aa1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#36 0x00007f92072aa28b call_init ./csu/../csu/libc-start.c:128:20
#37 0x00007f92072aa28b __libc_start_main ./csu/../csu/libc-start.c:347:5
#38 0x00007f9207d3ce75 _start (./triton-opt+0x496e75)
Segmentation fault (core dumped)

Reproduction:

./triton-opt poc.mlir -allow-unregistered-dialect --mlir-print-op-on-diagnostic --allocate-shared-memory --tritongpu-global-scratch-memory-allocation --convert-triton-amdgpu-to-llvm=gfx-arch=gfx942

Enviroment: Windows 10 Version: LLVM (http://llvm.org/): LLVM version 24.0.0git Optimized build with assertions.

hunterkritik-byte avatar Sep 15 '26 09:09 hunterkritik-byte

This issue should be filed against triton-lang/triton instead — the crash is in Triton's own triton-opt conversion path

AkunCube avatar Sep 15 '26 09:09 AkunCube

Thanks

hunterkritik-byte avatar Sep 15 '26 10:09 hunterkritik-byte

@llvm/issue-subscribers-mlir

Author: KRITIK BHATTARAI (hunterkritik-byte)

poc.mlir:
#H_ac321c5b_shared = #ttg.swizzled_shared&lt;{vec = 1, perPhase = 1, maxPhase = 1, order = [0]}&gt;
#H_ac321c5b_smem = #ttg.shared_memory
#D_fff0dcf6_A_636a6103_blocked = #ttg.blocked&lt;{sizePerThread = [16, 1], threadsPerWarp = [4, 8], warpsPerCTA = [1, 4], order = [0, 1]}&gt;
#D_fff0dcf6_B_ac321c5b_shared = #ttg.swizzled_shared&lt;{vec = 1, perPhase = 1, maxPhase = 1, order = [0]}&gt;
#D_fff0dcf6_B_ac321c5b_smem = #ttg.shared_memory
module attributes {"ttg.num-ctas" = 1 : i32, "ttg.num-warps" = 1 : i32, ttg.shared = 65544 : i32, ttg.target = "hip:gfx1250", "ttg.threads-per-warp" = 32 : i32, "ttg.total-num-warps" = 1 : i32} {
tt.func public @<!-- -->H_ac321c5b_alias_matrix_shared() {
    %buf0 = ttg.local_alloc {allocation.offset = 0 : i32} : () -&gt; !ttg.memdesc&lt;32xf32, #H_ac321c5b_shared, #H_ac321c5b_smem, mutable&gt;
    %buf1 = ttg.local_alloc {allocation.offset = 16 : i32} : () -&gt; !ttg.memdesc&lt;32xf32, #H_ac321c5b_shared, #H_ac321c5b_smem, mutable&gt;
    %bar = ttg.local_alloc {allocation.offset = 4096 : i32} : () -&gt; !ttg.memdesc&lt;1xi64, #H_ac321c5b_shared, #H_ac321c5b_smem, mutable&gt;
    %dfff0dcf6_imin = arith.constant -2147483648 : i32    // INT_MIN  // state fusion
    %dfff0dcf6_f32  = arith.sitofp %dfff0dcf6_imin : i32 to f32
    %dfff0dcf6_f64  = arith.extf %dfff0dcf6_f32 : f32 to f64
    // 0.0 / 0.0 produces NaN — constant folder must not crash
    %dfff0dcf6_zero = arith.constant 0.0 : f64
    %dfff0dcf6_nan  = arith.divf %dfff0dcf6_zero, %dfff0dcf6_zero : f64
    // minimumf with NaN: result must be NaN per IEEE 754-2019
    %dfff0dcf6_r    = arith.minimumf %dfff0dcf6_f64, %dfff0dcf6_nan : f64
    // extf then truncf roundtrip: must be idempotent for finite values
    %dfff0dcf6_back = arith.truncf %dfff0dcf6_r : f64 to f32
    %dfff0dcf6_out  = arith.extf %dfff0dcf6_back : f32 to f64
    amdg.init_barrier %bar, 1 : !ttg.memdesc&lt;1xi64, #H_ac321c5b_shared, #H_ac321c5b_smem, mutable&gt;
    ttg.local_load %buf0 : !ttg.memdesc&lt;32xf32, #H_ac321c5b_shared, #H_ac321c5b_smem, mutable&gt; -&gt; tensor&lt;32xf32&gt;
    ttg.local_load %buf1 : !ttg.memdesc&lt;32xf32, #H_ac321c5b_shared, #H_ac321c5b_smem, mutable&gt; -&gt; tensor&lt;32xf32&gt;
    tt.return
  }
}

Crash:

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.      Program arguments: ./triton-opt poc.mlir -allow-unregistered-dialect --mlir-print-op-on-diagnostic --allocate-shared-memory --tritongpu-global-scratch-memory-allocation --convert-triton-amdgpu-to-llvm=gfx-arch=gfx942
 #<!-- -->0 0x00007f920fe345ca llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;, int) (./triton-opt+0x858e5ca)
 #<!-- -->1 0x00007f920fe314ce llvm::sys::RunSignalHandlers() (./triton-opt+0x858b4ce)
 #<!-- -->2 0x00007f920fe354cb SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #<!-- -->3 0x00007f92072c5330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #<!-- -->4 0x00007f920f9454a4 mlir::Attribute::getContext() const (./triton-opt+0x809f4a4)
 #<!-- -->5 0x00007f9207f555ed getLoadedDialect&lt;mlir::triton::gpu::TritonGPUDialect&gt; /mnt/d/fusion-fuzz/projects/triton/deps/llvm-b010a18d-ubuntu-x64/include/mlir/IR/MLIRContext.h:94:29
 #<!-- -->6 0x00007f9207f555ed toLinearLayout /mnt/d/fusion-fuzz/projects/triton/triton-src/lib/Dialect/TritonGPU/IR/LinearLayoutConversions.cpp:1317:15
 #<!-- -->7 0x00007f9207f555ed mlir::triton::gpu::toLinearLayout(mlir::RankedTensorType) /mnt/d/fusion-fuzz/projects/triton/triton-src/lib/Dialect/TritonGPU/IR/LinearLayoutConversions.cpp:1271:10
 #<!-- -->8 0x00007f92081b71f5 Twine /mnt/d/fusion-fuzz/projects/triton/deps/llvm-b010a18d-ubuntu-x64/include/llvm/ADT/Twine.h:259:19
 #<!-- -->9 0x00007f92081b71f5 (anonymous namespace)::LocalLoadOpConversion::matchAndRewrite(mlir::triton::gpu::LocalLoadOp, mlir::triton::gpu::LocalLoadOpAdaptor, mlir::ConversionPatternRewriter&amp;) const /mnt/d/fusion-fuzz/projects/triton/triton-src/lib/Conversion/TritonGPUToLLVM/MemoryOpToLLVM.cpp:196:55
#<!-- -->10 0x00007f92081bc9f2 llvm::LogicalResult mlir::ConversionPattern::dispatchTo1To1&lt;mlir::ConvertOpToLLVMPattern&lt;mlir::triton::gpu::LocalLoadOp, false&gt;, mlir::triton::gpu::LocalLoadOp&gt;(mlir::ConvertOpToLLVMPattern&lt;mlir::triton::gpu::LocalLoadOp, false&gt; const&amp;, mlir::triton::gpu::LocalLoadOp, mlir::triton::gpu::LocalLoadOp::GenericAdaptor&lt;llvm::ArrayRef&lt;mlir::ValueRange&gt; &gt;, mlir::ConversionPatternRewriter&amp;) /mnt/d/fusion-fuzz/projects/triton/deps/llvm-b010a18d-ubuntu-x64/include/mlir/Transforms/DialectConversion.h:1069:15
#<!-- -->11 0x00007f92081bc8d8 mlir::ConvertOpToLLVMPattern&lt;mlir::triton::gpu::LocalLoadOp, false&gt;::matchAndRewrite(mlir::Operation*, llvm::ArrayRef&lt;mlir::ValueRange&gt;, mlir::ConversionPatternRewriter&amp;) const /mnt/d/fusion-fuzz/projects/triton/deps/llvm-b010a18d-ubuntu-x64/include/mlir/Conversion/LLVMCommon/Pattern.h:264:3
#<!-- -->12 0x00007f920f1a3114 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&amp;) const (./triton-opt+0x78fd114)
#<!-- -->13 0x00007f920f1fe822 void llvm::function_ref&lt;void ()&gt;::callback_fn&lt;mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&amp;, llvm::function_ref&lt;bool (mlir::Pattern const&amp;)&gt;, llvm::function_ref&lt;void (mlir::Pattern const&amp;)&gt;, llvm::function_ref&lt;llvm::LogicalResult (mlir::Pattern const&amp;)&gt;)::$_6&gt;(long) PatternApplicator.cpp:0:0
#<!-- -->14 0x00007f920f1fae94 mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&amp;, llvm::function_ref&lt;bool (mlir::Pattern const&amp;)&gt;, llvm::function_ref&lt;void (mlir::Pattern const&amp;)&gt;, llvm::function_ref&lt;llvm::LogicalResult (mlir::Pattern const&amp;)&gt;) (./triton-opt+0x7954e94)
#<!-- -->15 0x00007f920f1a4ede (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*) DialectConversion.cpp:0:0
#<!-- -->16 0x00007f920f1a46b5 mlir::OperationConverter::convert(mlir::Operation*, bool) (./triton-opt+0x78fe6b5)
#<!-- -->17 0x00007f920f1a598e mlir::OperationConverter::applyConversion(llvm::ArrayRef&lt;mlir::Operation*&gt;) (./triton-opt+0x78ff98e)
#<!-- -->18 0x00007f920f1b5198 void llvm::function_ref&lt;void ()&gt;::callback_fn&lt;applyConversion(llvm::ArrayRef&lt;mlir::Operation*&gt;, mlir::ConversionTarget const&amp;, mlir::FrozenRewritePatternSet const&amp;, mlir::ConversionConfig, (anonymous namespace)::OpConversionMode)::$_43&gt;(long) DialectConversion.cpp:0:0
#<!-- -->19 0x00007f920f1ab815 applyConversion(llvm::ArrayRef&lt;mlir::Operation*&gt;, mlir::ConversionTarget const&amp;, mlir::FrozenRewritePatternSet const&amp;, mlir::ConversionConfig, (anonymous namespace)::OpConversionMode) DialectConversion.cpp:0:0
#<!-- -->20 0x00007f920f1ab8eb mlir::applyPartialConversion(mlir::Operation*, mlir::ConversionTarget const&amp;, mlir::FrozenRewritePatternSet const&amp;, mlir::ConversionConfig) (./triton-opt+0x79058eb)
#<!-- -->21 0x00007f92086ca1c0 (anonymous namespace)::ConvertTritonAMDGPUToLLVM::runOnOperation() /mnt/d/fusion-fuzz/projects/triton/triton-src/third_party/amd/lib/TritonAMDGPUToLLVM/TritonGPUToLLVM.cpp:236:16
#<!-- -->22 0x00007f9208802c2b mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (./triton-opt+0xf5cc2b)
#<!-- -->23 0x00007f92088037a9 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&amp;, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (./triton-opt+0xf5d7a9)
#<!-- -->24 0x00007f920880a7c2 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (./triton-opt+0xf647c2)
#<!-- -->25 0x00007f920880a032 mlir::PassManager::run(mlir::Operation*) (./triton-opt+0xf64032)
#<!-- -->26 0x00007f92087f5107 performActions(llvm::raw_ostream&amp;, std::shared_ptr&lt;llvm::SourceMgr&gt; const&amp;, mlir::MLIRContext*, mlir::MlirOptMainConfig const&amp;) MlirOptMain.cpp:0:0
#<!-- -->27 0x00007f92087f439c llvm::LogicalResult llvm::function_ref&lt;llvm::LogicalResult (std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt; &gt;, llvm::MemoryBufferRef const&amp;, llvm::raw_ostream&amp;)&gt;::callback_fn&lt;mlir::MlirOptMain(llvm::raw_ostream&amp;, std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt; &gt;, mlir::DialectRegistry&amp;, mlir::MlirOptMainConfig const&amp;)::$_3&gt;(long, std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt; &gt;, llvm::MemoryBufferRef const&amp;, llvm::raw_ostream&amp;) MlirOptMain.cpp:0:0
#<!-- -->28 0x00007f920fa52801 mlir::splitAndProcessBuffer(std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt; &gt;, llvm::function_ref&lt;llvm::LogicalResult (std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt; &gt;, llvm::MemoryBufferRef const&amp;, llvm::raw_ostream&amp;)&gt;, llvm::raw_ostream&amp;, llvm::StringRef, llvm::StringRef) (./triton-opt+0x81ac801)
#<!-- -->29 0x00007f92087ea702 mlir::MlirOptMain(llvm::raw_ostream&amp;, std::unique_ptr&lt;llvm::MemoryBuffer, std::default_delete&lt;llvm::MemoryBuffer&gt; &gt;, mlir::DialectRegistry&amp;, mlir::MlirOptMainConfig const&amp;) (./triton-opt+0xf44702)
#<!-- -->30 0x00007f92087eab01 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&amp;) (./triton-opt+0xf44b01)
#<!-- -->31 0x00007f92087ead3d mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&amp;) (./triton-opt+0xf44d3d)
#<!-- -->32 0x00007f92087d4c0c succeeded /mnt/d/fusion-fuzz/projects/triton/deps/llvm-b010a18d-ubuntu-x64/include/llvm/Support/LogicalResult.h:40:45
#<!-- -->33 0x00007f92087d4c0c asMainReturnCode /mnt/d/fusion-fuzz/projects/triton/deps/llvm-b010a18d-ubuntu-x64/include/mlir/Tools/mlir-opt/MlirOptMain.h:436:12
#<!-- -->34 0x00007f92087d4c0c main /mnt/d/fusion-fuzz/projects/triton/triton-src/bin/triton-opt.cpp:9:10
#<!-- -->35 0x00007f92072aa1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#<!-- -->36 0x00007f92072aa28b call_init ./csu/../csu/libc-start.c:128:20
#<!-- -->37 0x00007f92072aa28b __libc_start_main ./csu/../csu/libc-start.c:347:5
#<!-- -->38 0x00007f9207d3ce75 _start (./triton-opt+0x496e75)
Segmentation fault (core dumped)

Reproduction:

./triton-opt poc.mlir -allow-unregistered-dialect --mlir-print-op-on-diagnostic --allocate-shared-memory --tritongpu-global-scratch-memory-allocation --convert-triton-amdgpu-to-llvm=gfx-arch=gfx942

Enviroment: Windows 10 Version: LLVM (http://llvm.org/): LLVM version 24.0.0git Optimized build with assertions.