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

Optimization pass segfaults on differentiating matmul of complex arrays #270

Closed
mofeing opened this issue Jan 25, 2025 · 1 comment
Closed

Comments

@mofeing
Copy link
Collaborator

mofeing commented Jan 25, 2025

Following EnzymeAD/Reactant.jl#604, it seems like there is some bug on some optimization bass when differentiating matmul of complex arrays.

I'm not sure which optimization pass is the one that crashes but when calling @code_hlo:

  • optimize=false works
  • optimize=:before_enzyme works
  • optimize=:no_enzyme works
  • optimize=:after_enzyme segfaults
julia> using Reactant, Enzyme
AssertionError("Could not find registered platform with name: \"cuda\". Available platform names are: ")

julia> a = ones(ComplexF64, 2, 2)
2×2 Matrix{ComplexF64}:
 1.0+0.0im  1.0+0.0im
 1.0+0.0im  1.0+0.0im

julia> a_re = Reactant.to_rarray(a)
2×2 ConcreteRArray{ComplexF64, 2}:
 1.0+0.0im  1.0+0.0im
 1.0+0.0im  1.0+0.0im

julia> b = 2.0 * ones(ComplexF64, 2, 2)
2×2 Matrix{ComplexF64}:
 2.0+0.0im  2.0+0.0im
 2.0+0.0im  2.0+0.0im

julia> b_re = Reactant.to_rarray(b)
2×2 ConcreteRArray{ComplexF64, 2}:
 2.0+0.0im  2.0+0.0im
 2.0+0.0im  2.0+0.0im

julia> function f(x,y)
           return Enzyme.gradient(Reverse, *, x, y)
       end
f (generic function with 1 method)

julia> @code_hlo optimize=false f(a_re,b_re)
module {
  func.func private @"Const{typeof(*)}(*)_autodiff"(%arg0: tensor<2x2xcomplex<f64>>, %arg1: tensor<2x2xcomplex<f64>>) -> (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) {
    %0 = stablehlo.transpose %arg0, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %1 = stablehlo.transpose %arg1, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %cst = stablehlo.constant dense<(0.000000e+00,0.000000e+00)> : tensor<2x2xcomplex<f64>>
    %2 = stablehlo.convert %0 : tensor<2x2xcomplex<f64>>
    %3 = stablehlo.convert %1 : tensor<2x2xcomplex<f64>>
    %4 = stablehlo.dot_general %2, %3, contracting_dims = [1] x [0] : (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %5 = stablehlo.transpose %4, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %6 = stablehlo.transpose %0, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %7 = stablehlo.transpose %1, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    return %5, %6, %7 : tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>
  }
  func.func @main(%arg0: tensor<2x2xcomplex<f64>>, %arg1: tensor<2x2xcomplex<f64>>) -> (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) {
    %0 = stablehlo.transpose %arg0, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %1 = stablehlo.transpose %arg1, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %cst = stablehlo.constant dense<(0.000000e+00,0.000000e+00)> : tensor<complex<f64>>
    %cst_0 = stablehlo.constant dense<(0.000000e+00,0.000000e+00)> : tensor<2x2xcomplex<f64>>
    %cst_1 = stablehlo.constant dense<(0.000000e+00,0.000000e+00)> : tensor<complex<f64>>
    %2 = stablehlo.broadcast_in_dim %cst_1, dims = [] : (tensor<complex<f64>>) -> tensor<2x2xcomplex<f64>>
    %cst_2 = stablehlo.constant dense<(0.000000e+00,0.000000e+00)> : tensor<complex<f64>>
    %cst_3 = stablehlo.constant dense<(0.000000e+00,0.000000e+00)> : tensor<2x2xcomplex<f64>>
    %cst_4 = stablehlo.constant dense<(0.000000e+00,0.000000e+00)> : tensor<complex<f64>>
    %3 = stablehlo.broadcast_in_dim %cst_4, dims = [] : (tensor<complex<f64>>) -> tensor<2x2xcomplex<f64>>
    %cst_5 = stablehlo.constant dense<(1.000000e+00,0.000000e+00)> : tensor<2x2xcomplex<f64>>
    %4 = stablehlo.transpose %0, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %5 = stablehlo.transpose %1, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %6 = stablehlo.transpose %cst_5, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %7 = stablehlo.transpose %2, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %8 = stablehlo.transpose %3, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %9:4 = enzyme.autodiff @"Const{typeof(*)}(*)_autodiff"(%4, %5, %6, %7, %8) {activity = [#enzyme<activity enzyme_active>, #enzyme<activity enzyme_active>], ret_activity = [#enzyme<activity enzyme_activenoneed>, #enzyme<activity enzyme_active>, #enzyme<activity enzyme_active>]} : (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) -> (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>)
    %10 = stablehlo.transpose %9#0, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %11 = stablehlo.transpose %9#1, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %12 = stablehlo.transpose %9#2, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %13 = stablehlo.transpose %9#3, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %14 = stablehlo.transpose %12, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %15 = stablehlo.transpose %13, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %16 = stablehlo.transpose %10, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %17 = stablehlo.transpose %11, dims = [1, 0] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    return %14, %15, %16, %17 : tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>
  }
}

julia> @code_hlo optimize=:before_enzyme f(a_re,b_re)
module {
  func.func private @"diffeConst{typeof(*)}(*)_autodiff"(%arg0: tensor<2x2xcomplex<f64>>, %arg1: tensor<2x2xcomplex<f64>>, %arg2: tensor<2x2xcomplex<f64>>, %arg3: tensor<2x2xcomplex<f64>>, %arg4: tensor<2x2xcomplex<f64>>) -> (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) {
    %cst = stablehlo.constant dense<(0.000000e+00,0.000000e+00)> : tensor<2x2xcomplex<f64>>
    %0 = stablehlo.add %cst, %arg2 : tensor<2x2xcomplex<f64>>
    %1 = stablehlo.add %cst, %arg3 : tensor<2x2xcomplex<f64>>
    %2 = stablehlo.add %cst, %arg4 : tensor<2x2xcomplex<f64>>
    %3 = chlo.conj %0 : tensor<2x2xcomplex<f64>> -> tensor<2x2xcomplex<f64>>
    %4 = stablehlo.dot_general %3, %arg0, contracting_dims = [1] x [1] : (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %5 = stablehlo.transpose %4, dims = [0, 1] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %6 = chlo.conj %5 : tensor<2x2xcomplex<f64>> -> tensor<2x2xcomplex<f64>>
    %7 = stablehlo.add %2, %6 : tensor<2x2xcomplex<f64>>
    %8 = stablehlo.dot_general %arg1, %3, contracting_dims = [0] x [0] : (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %9 = stablehlo.transpose %8, dims = [0, 1] : (tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    %10 = chlo.conj %9 : tensor<2x2xcomplex<f64>> -> tensor<2x2xcomplex<f64>>
    %11 = stablehlo.add %1, %10 : tensor<2x2xcomplex<f64>>
    return %arg0, %arg1, %11, %7 : tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>
  }
  func.func @main(%arg0: tensor<2x2xcomplex<f64>>, %arg1: tensor<2x2xcomplex<f64>>) -> (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) {
    %cst = stablehlo.constant dense<(1.000000e+00,0.000000e+00)> : tensor<2x2xcomplex<f64>>
    %cst_0 = stablehlo.constant dense<(0.000000e+00,0.000000e+00)> : tensor<2x2xcomplex<f64>>
    %0:4 = call @"diffeConst{typeof(*)}(*)_autodiff"(%arg0, %arg1, %cst, %cst_0, %cst_0) : (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) -> (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>)
    return %0#2, %0#3, %0#0, %0#1 : tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>
  }
}

julia> @code_hlo optimize=:no_enzyme f(a_re,b_re)
module {
  func.func private @"Const{typeof(*)}(*)_autodiff"(%arg0: tensor<2x2xcomplex<f64>>, %arg1: tensor<2x2xcomplex<f64>>) -> (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) {
    %0 = stablehlo.dot_general %arg1, %arg0, contracting_dims = [1] x [0] : (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) -> tensor<2x2xcomplex<f64>>
    return %0, %arg0, %arg1 : tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>
  }
  func.func @main(%arg0: tensor<2x2xcomplex<f64>>, %arg1: tensor<2x2xcomplex<f64>>) -> (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) {
    %cst = stablehlo.constant dense<(1.000000e+00,0.000000e+00)> : tensor<2x2xcomplex<f64>>
    %cst_0 = stablehlo.constant dense<(0.000000e+00,0.000000e+00)> : tensor<2x2xcomplex<f64>>
    %0:4 = enzyme.autodiff @"Const{typeof(*)}(*)_autodiff"(%arg0, %arg1, %cst, %cst_0, %cst_0) {activity = [#enzyme<activity enzyme_active>, #enzyme<activity enzyme_active>], ret_activity = [#enzyme<activity enzyme_activenoneed>, #enzyme<activity enzyme_active>, #enzyme<activity enzyme_active>]} : (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>) -> (tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>)
    return %0#2, %0#3, %0#0, %0#1 : tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>, tensor<2x2xcomplex<f64>>
  }
}

julia> @code_hlo optimize=:after_enzyme f(a_re,b_re)

[44910] signal 11 (1): Segmentation fault
in expression starting at REPL[14]:1
unknown function (ip: 0x79f4ddba0d60)
_ZL8readBitsPKcmm at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZNK4mlir17DenseElementsAttr18IntElementIteratordeEv at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZNK4mlir17DenseElementsAttr13getSplatValueIN4llvm5APIntEEENSt9enable_ifIXoontsrSt10is_base_ofINS_9AttributeET_E5valuesrSt7is_sameIS6_S7_E5valueES7_E4typeEv at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZNK12_GLOBAL__N_111AddSimplify15matchAndRewriteEN4mlir9stablehlo5AddOpERNS1_15PatternRewriterE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZZN4mlir17PatternApplicator15matchAndRewriteEPNS_9OperationERNS_15PatternRewriterEN4llvm12function_refIFbRKNS_7PatternEEEENS6_IFvS9_EEENS6_IFNS5_13LogicalResultES9_EEEENKUlvE_clEv at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir17PatternApplicator15matchAndRewriteEPNS_9OperationERNS_15PatternRewriterEN4llvm12function_refIFbRKNS_7PatternEEEENS6_IFvS9_EEENS6_IFNS5_13LogicalResultES9_EEE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN12_GLOBAL__N_126GreedyPatternRewriteDriver15processWorklistEv at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir21applyPatternsGreedilyERNS_6RegionERKNS_23FrozenRewritePatternSetENS_19GreedyRewriteConfigEPb at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir9transform15ApplyPatternsOp10applyToOneERNS0_17TransformRewriterEPNS_9OperationERNS0_21ApplyToEachResultListERNS0_14TransformStateE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir9transform6detail20applyTransformToEachINS0_15ApplyPatternsOpERN4llvm14iterator_rangeINS4_20filter_iterator_implIPKPNS_9OperationEZNKS0_14TransformState13getPayloadOpsENS_5ValueEEUlS8_E_St26bidirectional_iterator_tagEEEEEENS_27DiagnosedSilenceableFailureET_RNS0_17TransformRewriterEOT0_RNS4_15SmallVectorImplINS0_21ApplyToEachResultListEEERSB_ at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir9transform20TransformEachOpTraitINS0_15ApplyPatternsOpEE5applyERNS0_17TransformRewriterERNS0_16TransformResultsERNS0_14TransformStateE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir9transform6detail35TransformOpInterfaceInterfaceTraits5ModelINS0_15ApplyPatternsOpEE5applyEPKNS2_7ConceptEPNS_9OperationERNS0_17TransformRewriterERNS0_16TransformResultsERNS0_14TransformStateE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir9transform20TransformOpInterface5applyERNS0_17TransformRewriterERNS0_16TransformResultsERNS0_14TransformStateE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir9transform14TransformState14applyTransformENS0_20TransformOpInterfaceE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZL18applySequenceBlockRN4mlir5BlockENS_9transform22FailurePropagationModeERNS2_14TransformStateERNS2_16TransformResultsE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir9transform15NamedSequenceOp5applyERNS0_17TransformRewriterERNS0_16TransformResultsERNS0_14TransformStateE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir9transform6detail35TransformOpInterfaceInterfaceTraits5ModelINS0_15NamedSequenceOpEE5applyEPKNS2_7ConceptEPNS_9OperationERNS0_17TransformRewriterERNS0_16TransformResultsERNS0_14TransformStateE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir9transform20TransformOpInterface5applyERNS0_17TransformRewriterERNS0_16TransformResultsERNS0_14TransformStateE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir9transform14TransformState14applyTransformENS0_20TransformOpInterfaceE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir9transform15applyTransformsEPNS_9OperationENS0_20TransformOpInterfaceERKNS_11RaggedArrayIN4llvm12PointerUnionIJS2_NS_9AttributeENS_5ValueEEEEEERKNS0_16TransformOptionsEbNS5_12function_refIFvRNS0_14TransformStateEEEENSG_IFNS5_13LogicalResultESI_EEE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir9transform27applyTransformNamedSequenceENS_11RaggedArrayIN4llvm12PointerUnionIJPNS_9OperationENS_9AttributeENS_5ValueEEEEEENS0_20TransformOpInterfaceENS_8ModuleOpERKNS0_16TransformOptionsE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN12_GLOBAL__N_115InterpreterPass14runOnOperationEv at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir6detail17OpToOpPassAdaptor3runEPNS_4PassEPNS_9OperationENS_15AnalysisManagerEbj at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir6detail17OpToOpPassAdaptor11runPipelineERNS_13OpPassManagerEPNS_9OperationENS_15AnalysisManagerEbjPNS_16PassInstrumentorEPKNS_19PassInstrumentation18PipelineParentInfoE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir11PassManager9runPassesEPNS_9OperationENS_15AnalysisManagerE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
_ZN4mlir11PassManager3runEPNS_9OperationE at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
mlirPassManagerRunOnOp at /home/ssanche1/.julia/artifacts/3991ecb1f224dd41936167065867aae30b68ddb6/lib/libReactantExtra.so (unknown line)
mlirPassManagerRunOnOp at /home/ssanche1/Developer/Reactant.jl/src/mlir/libMLIR_h.jl:5867 [inlined]
run! at /home/ssanche1/Developer/Reactant.jl/src/mlir/IR/Pass.jl:74 [inlined]
#run_pass_pipeline!#2 at /home/ssanche1/Developer/Reactant.jl/src/Compiler.jl:335
run_pass_pipeline! at /home/ssanche1/Developer/Reactant.jl/src/Compiler.jl:330 [inlined]
#compile_mlir!#9 at /home/ssanche1/Developer/Reactant.jl/src/Compiler.jl:534
compile_mlir! at /home/ssanche1/Developer/Reactant.jl/src/Compiler.jl:426 [inlined]
#7 at /home/ssanche1/Developer/Reactant.jl/src/Compiler.jl:362 [inlined]
context! at /home/ssanche1/Developer/Reactant.jl/src/mlir/IR/Context.jl:76
unknown function (ip: 0x79f4dc1de936)
#compile_mlir#6 at /home/ssanche1/Developer/Reactant.jl/src/Compiler.jl:360
compile_mlir at /home/ssanche1/Developer/Reactant.jl/src/Compiler.jl:356
unknown function (ip: 0x79f4dc1dabad)
jl_apply at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/julia.h:2157 [inlined]
do_call at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/interpreter.c:126
eval_value at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/interpreter.c:223
eval_stmt_value at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/interpreter.c:174 [inlined]
eval_body at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/interpreter.c:663
jl_interpret_toplevel_thunk at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/interpreter.c:821
jl_toplevel_eval_flex at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/toplevel.c:943
jl_toplevel_eval_flex at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/toplevel.c:886
ijl_toplevel_eval_in at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/toplevel.c:994
eval at ./boot.jl:430 [inlined]
eval_user_input at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:245
repl_backend_loop at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:342
#start_repl_backend#59 at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:327
start_repl_backend at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:324
#run_repl#72 at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:483
run_repl at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:469
jfptr_run_repl_10104.1 at /home/ssanche1/.julia/juliaup/julia-1.11.2+0.x64.linux.gnu/share/julia/compiled/v1.11/REPL/u0gqU_4x0TT.so (unknown line)
#1150 at ./client.jl:446
jfptr_YY.1150_14803.1 at /home/ssanche1/.julia/juliaup/julia-1.11.2+0.x64.linux.gnu/share/julia/compiled/v1.11/REPL/u0gqU_4x0TT.so (unknown line)
jl_apply at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/julia.h:2157 [inlined]
jl_f__call_latest at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/builtins.c:875
#invokelatest#2 at ./essentials.jl:1055 [inlined]
invokelatest at ./essentials.jl:1052 [inlined]
run_main_repl at ./client.jl:430
repl_main at ./client.jl:567 [inlined]
_start at ./client.jl:541
jfptr__start_73406.1 at /home/ssanche1/.julia/juliaup/julia-1.11.2+0.x64.linux.gnu/lib/julia/sys.so (unknown line)
jl_apply at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/julia.h:2157 [inlined]
true_main at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/jlapi.c:900
jl_repl_entrypoint at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/jlapi.c:1059
main at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/cli/loader_exe.c:58
unknown function (ip: 0x79f4dda29d8f)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x4010b8)
Allocations: 32930135 (Pool: 32924380; Big: 5755); GC: 39
Segmentation fault (core dumped)
@wsmoses
Copy link
Member

wsmoses commented Jan 25, 2025

For the non julians here can you post the MLIR pass pipeline which triggers (ie via enzymexlamlir-opt)

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