ITADN

Missing gradient chlo.erf

#2507Openptiede 创建于 2026-05-24
P
ptiedecommented
```julia @jit Enzyme.gradient(Reverse, erf, ConcreteRNumber(1.0)) loc(callsite("erf/erf"("/home/ptiede/.julia/packages/Reactant/7Yaqo/ext/ReactantSpecialFunctionsExt.jl":10:0) at callsite("erf(::Reactant.TracedRNumber{Float64})"("/home/ptiede/.julia/packages/Reactant/7Yaqo/ext/ReactantSpecialFunctionsExt.jl":9:0) at callsite("overload_autodiff(::ReverseMode{false, false, false, FFIABI, false, true}, ::Const{typeof(erf)}, ::Type{Active}, ::Duplicated{Reactant.TracedRNumber{Float64}})"("/home/ptiede/.julia/packages/Reactant/7Yaqo/src/Enzyme.jl":319:0) at "gradient(::ReverseMode{false, false, false, FFIABI, false, false}, ::typeof(erf), ::Reactant.TracedRNumber{Float64})"("/home/ptiede/.julia/packages/Enzyme/QQAEi/src/sugar.jl":274:0))))): error: could not compute the adjoint for this operation %0 = "chlo.erf"(%arg0) : (tensor<f64>) -> tensor<f64> ┌ Error: Compilation failed, MLIR module written to /tmp/reactant_PJd9ct/module_001_HPDW_post_all_pm.mlir └ @ Reactant.MLIR.IR ~/.julia/packages/Reactant/7Yaqo/src/mlir/IR/Pass.jl:146 ERROR: "failed to run pass manager on module" Stacktrace: [1] run!(pm::Reactant.MLIR.IR.PassManager, operation::Reactant.MLIR.IR.Operation, key::String) @ Reactant.MLIR.IR ~/.julia/packages/Reactant/7Yaqo/src/mlir/IR/Pass.jl:194 [2] run_pass_pipeline!(mod::Reactant.MLIR.IR.Module, pass_pipeline::String, key::String; enable_verifier::Bool) @ Reactant.Compiler ~/.julia/packages/Reactant/7Yaqo/src/compiler/OptimizationPasses.jl:160 [3] run_pass_pipeline! @ ~/.julia/packages/Reactant/7Yaqo/src/compiler/OptimizationPasses.jl:155 [inlined] [4] compile_mlir!(mod::Reactant.MLIR.IR.Module, f::typeof(gradient), args::Tuple{…}, compile_options::CompileOptions, debugcache::Vector{…}, callcache::Dict{…}, sdycache::Dict{…}, sdygroupidcache::Tuple{…}; fn_kwargs::@NamedTuple{}, backend::String, runtime::Val{…}, legalize_stablehlo_to_mhlo::Bool, client::Reactant.XLA.PJRT.Client, kwargs::@Kwargs{}) @ Reactant.Compiler ~/.julia/packages/Reactant/7Yaqo/src/compiler/Compiler.jl:451 [5] compile_mlir! @ ~/.julia/packages/Reactant/7Yaqo/src/compiler/Compiler.jl:237 [inlined] [6] compile_xla(ctx::Reactant.MLIR.IR.Context, f::Function, args::Tuple{…}; before_xla_optimizations::Bool, client::Nothing, serializable::Bool, kwargs::@Kwargs{…}) @ Reactant.Compiler ~/.julia/packages/Reactant/7Yaqo/src/compiler/Compiler.jl:1330 [7] compile_xla @ ~/.julia/packages/Reactant/7Yaqo/src/compiler/Compiler.jl:1305 [inlined] [8] compile(ctx::Reactant.MLIR.IR.Context, f::Function, args::Tuple{…}; kwargs::@Kwargs{…}) @ Reactant.Compiler ~/.julia/packages/Reactant/7Yaqo/src/compiler/Compiler.jl:1422 [9] macro expansion @ ~/.julia/packages/Reactant/7Yaqo/src/compiler/Macros.jl:299 [inlined] [10] macro expansion @ ~/.julia/packages/LLVM/eBGq5/src/base.jl:113 [inlined] [11] macro expansion @ ~/.julia/packages/Reactant/7Yaqo/src/compiler/Macros.jl:298 [inlined] [12] top-level scope @ REPL[67]:1 Some type information was truncated. Use `show(err)` to see complete types. ````
1 条评论