JuliaGPU / JuliaGPU/GPUCompiler.jl

Method overrides do not re-trigger compilation

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

Description

```julia
julia> kernel() = child()
kernel (generic function with 1 method)

julia> child() = 0
child (generic function with 1 method)

julia> native_code_llvm(kernel, Tuple{})
; @ REPL[1]:1 within `kernel`
; Function Attrs: alwaysinline
define i64 @julia_kernel_755() local_unnamed_addr #0 {
top:
ret i64 0
}

julia> GPUCompiler.@override method_table child() = 1

julia> native_code_llvm(kernel, Tuple{})
; @ REPL[1]:1 within `kernel`
; Function Attrs: alwaysinline
define i64 @julia_kernel_1124() local_unnamed_addr #0 {
top:
ret i64 0
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the Julia REPL reproducer using native_code_llvm and GPUCompiler.@override, comparing the generated LLVM before and after the method override. Trace how the override affects compilation and invalidation; done means native_code_llvm(kernel, Tuple{}) reflects child() returning 1 after the override.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.