Open pxl-th opened 2 months ago
@pxl-th can you let me know what happens when you run this PR: https://github.com/EnzymeAD/Enzyme.jl/pull/1796
Still the same error:
ERROR: LoadError: AssertionError: Enzyme : mismatch between innerTy LLVM.PointerType([1 x { { i64, {} addrspace(10)*, {} addrspace(10)* } }] addrspace(11)*) and tape type LLVM.PointerType({} addrspace(10)*)
tape_idx=3
true_idx=3
isKWCall=true
kwtup=@NamedTuple{groupsize::Int64, gridsize::Int64}
funcTy=EnzymeCore.EnzymeRules.ConfigWidth{1, false, false, (false, false)}
isghostty(funcTy)=true
miRT=Union{}
sret=nothing
returnRoots=nothing
swiftself=false
RT=Const{Nothing}
rev_RT=Union{}
applicablefn=false
tape=LLVM.UndefValue(0x000000000f9f8710)
llvmf=void (i64, [2 x i64] addrspace(11)*, [1 x { { i64, {} addrspace(10)*, {} addrspace(10)* } }] addrspace(11)*, {} addrspace(10)*, [2 x {} addrspace(10)*] addrspace(11)*)
TapeT=Any
mi=MethodInstance for Core.kwcall(::@NamedTuple{groupsize::Int64, gridsize::Int64}, ::AMDGPU.Runtime.HIPKernel{typeof(square_kernel!), Tuple{AMDGPU.Device.ROCDeviceVector{Float64, 1}}}, ::ROCArray{Float64, 1, AMDGPU.Runtime.Mem.HIPBuffer})
ami=MethodInstance for Core.kwcall(::@NamedTuple{groupsize::Int64, gridsize::Int64}, ::typeof(EnzymeCore.EnzymeRules.augmented_primal), ::EnzymeCore.EnzymeRules.ConfigWidth{1, false, false, (false, false)}, ::Const{AMDGPU.Runtime.HIPKernel{typeof(square_kernel!), Tuple{AMDGPU.Device.ROCDeviceVector{Float64, 1}}}}, ::Type{Const{Nothing}}, ::Duplicated{ROCArray{Float64, 1, AMDGPU.Runtime.Mem.HIPBuffer}})
rev_TT =Tuple{UInt64, typeof(Core.kwcall), @NamedTuple{groupsize::Int64, gridsize::Int64}, typeof(EnzymeCore.EnzymeRules.reverse), EnzymeCore.EnzymeRules.ConfigWidth{1, false, false, (false, false)}, Const{AMDGPU.Runtime.HIPKernel{typeof(square_kernel!), Tuple{AMDGPU.Device.ROCDeviceVector{Float64, 1}}}}, Type{Const{Nothing}}, Any, Duplicated{ROCArray{Float64, 1, AMDGPU.Runtime.Mem.HIPBuffer}}}
Stacktrace:
[1] enzyme_custom_common_rev
@ ~/.julia/dev/Enzyme/src/rules/customrules.jl:833 [inlined]
can you retry? [and paste the updated error] -- I just pushed another commit
Now segfaulting:
[13222] signal (11.1): Segmentation fault
in expression starting at /home/pxlth/.julia/dev/AMDGPU/t.jl:24
typekeyvalue_hash at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/jltypes.c:1622 [inlined]
lookup_typevalue at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/jltypes.c:1059
jl_inst_arg_tuple_type at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/jltypes.c:2162
jl_f_tuple at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/builtins.c:868 [inlined]
jl_f_tuple at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/builtins.c:863
absint at /home/pxlth/.julia/dev/Enzyme/src/absint.jl:105
abs_typeof at /home/pxlth/.julia/dev/Enzyme/src/absint.jl:423
unknown function (ip: 0x7c94bb300343)
_jl_invoke at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:2895 [inlined]
ijl_apply_generic at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:3077
abs_typeof at /home/pxlth/.julia/dev/Enzyme/src/absint.jl:159
abs_typeof at /home/pxlth/.julia/dev/Enzyme/src/absint.jl:153
unknown function (ip: 0x7c94bb300409)
_jl_invoke at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:2895 [inlined]
ijl_apply_generic at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:3077
check_ir! at /home/pxlth/.julia/dev/Enzyme/src/compiler/validation.jl:696
check_ir! at /home/pxlth/.julia/dev/Enzyme/src/compiler/validation.jl:346
check_ir! at /home/pxlth/.julia/dev/Enzyme/src/compiler/validation.jl:316
check_ir at /home/pxlth/.julia/dev/Enzyme/src/compiler/validation.jl:158 [inlined]
#codegen#18949 at /home/pxlth/.julia/dev/Enzyme/src/compiler.jl:5652
codegen at /home/pxlth/.julia/dev/Enzyme/src/compiler.jl:5608 [inlined]
#89 at /home/pxlth/.julia/dev/Enzyme/src/Enzyme.jl:801
#JuliaContext#152 at /home/pxlth/.julia/packages/GPUCompiler/VPC5n/src/driver.jl:34
JuliaContext at /home/pxlth/.julia/packages/GPUCompiler/VPC5n/src/driver.jl:25 [inlined]
tape_type at /home/pxlth/.julia/dev/Enzyme/src/Enzyme.jl:800 [inlined]
#augmented_primal#18 at /home/pxlth/.julia/dev/AMDGPU/ext/EnzymeCoreExt/EnzymeCoreExt.jl:191
augmented_primal at /home/pxlth/.julia/dev/AMDGPU/ext/EnzymeCoreExt/EnzymeCoreExt.jl:179 [inlined]
macro expansion at /home/pxlth/.julia/dev/AMDGPU/src/highlevel.jl:175 [inlined]
square! at /home/pxlth/.julia/dev/AMDGPU/t.jl:11 [inlined]
diffejulia_square__2956wrap at /home/pxlth/.julia/dev/AMDGPU/t.jl:0
macro expansion at /home/pxlth/.julia/dev/Enzyme/src/compiler.jl:7179 [inlined]
enzyme_call at /home/pxlth/.julia/dev/Enzyme/src/compiler.jl:6788 [inlined]
CombinedAdjointThunk at /home/pxlth/.julia/dev/Enzyme/src/compiler.jl:6665 [inlined]
autodiff at /home/pxlth/.julia/dev/Enzyme/src/Enzyme.jl:320 [inlined]
autodiff at /home/pxlth/.julia/dev/Enzyme/src/Enzyme.jl:348 [inlined]
autodiff at /home/pxlth/.julia/dev/Enzyme/src/Enzyme.jl:329 [inlined]
main at /home/pxlth/.julia/dev/AMDGPU/t.jl:18
unknown function (ip: 0x7c94b912d142)
_jl_invoke at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:2895 [inlined]
ijl_apply_generic at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:3077
jl_apply at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/julia.h:1982 [inlined]
do_call at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/interpreter.c:126
eval_value at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/interpreter.c:223
eval_stmt_value at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/interpreter.c:174 [inlined]
eval_body at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/interpreter.c:617
jl_interpret_toplevel_thunk at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/interpreter.c:775
jl_toplevel_eval_flex at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/toplevel.c:934
jl_toplevel_eval_flex at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/toplevel.c:877
ijl_toplevel_eval_in at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/toplevel.c:985
eval at ./boot.jl:385 [inlined]
include_string at ./loading.jl:2076
_jl_invoke at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:2895 [inlined]
ijl_apply_generic at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:3077
_include at ./loading.jl:2136
include at ./Base.jl:495
jfptr_include_46394.1 at /home/pxlth/bin/julia-1.10.3/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:2895 [inlined]
ijl_apply_generic at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:3077
exec_options at ./client.jl:318
_start at ./client.jl:552
jfptr__start_82726.1 at /home/pxlth/bin/julia-1.10.3/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:2895 [inlined]
ijl_apply_generic at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/gf.c:3077
jl_apply at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/julia.h:1982 [inlined]
true_main at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/jlapi.c:582
jl_repl_entrypoint at /cache/build/builder-amdci4-2/julialang/julia-release-1-dot-10/src/jlapi.c:731
main at julia (unknown line)
unknown function (ip: 0x7c94f2c29d8f)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x4010b8)
Allocations: 206207229 (Pool: 205944898; Big: 262331); GC: 124
Segmentation fault (core dumped)
MWE (PR: https://github.com/JuliaGPU/AMDGPU.jl/pull/668):