JuliaGPU / JuliaGPU/GPUCompiler.jl

1.11 error AssertionError: Base.isdispatchtuple

Open
#635 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
187
Forks
68
Avg merge
1d 12h
Merged PRs (30d)
28

Description

```julia
(f, tt, world, typeof(f)) = (Enzyme.Compiler.add_one_in_place, Tuple{Any}, 0x000000000000683a, typeof(Enzyme.Compiler.add_one_in_place))

Stacktrace:
[1] methodinstance
@ ~/.julia/packages/GPUCompiler/2CW9L/src/jlgen.jl:82 [inlined]

function nested_codegen!(mode::API.CDerivativeMode, mod::LLVM.Module, f, tt, world)
+ @show f, tt, world, typeof(f)
funcspec = GPUCompiler.methodinstance(typeof(f), tt, world)
nested_codegen!(mode, mod, funcspec, world)
end
```

So essentially here we request a generic form of the function `add_one_in_place` requesting it for an any input. This works on 1.10, but fails on 1.11 hitting the aforementioned assertion error

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with GPUCompiler/2CW9L/src/jlgen.jl:82 and the nested_codegen! call to GPUCompiler.methodinstance shown in the report. Compare the Julia 1.10 and 1.11 behavior for Enzyme.Compiler.add_one_in_place with Tuple{Any}; done means the generic request no longer triggers the Base.isdispatchtuple assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.