JuliaGPU / JuliaGPU/GPUCompiler.jl

Calling device function with CC from kernel with CC results in trap

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

Description

```llvm
; ModuleID = 'reduce.bc'
source_filename = "reduce.ll"

define ptx_device void @child() {
ret void
}

define ptx_kernel void @parent() {
call void @child()
ret void
}

```

Gets optimized to a `trap`: `instcombine` makes it a `store i1 true, i1* undef, align 1` after which `simplifycfg` reduces it to `trap`; unsure why.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reduce.ll reproducer and compare the IR after instcombine and simplifycfg. Trace how the ptx_device call from the ptx_kernel function becomes an undef store and then a trap. Done means identifying the cause and documenting or correcting the behavior with a verified optimizer result.

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.