-
Couldn't load subscription status.
- Fork 57
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Take this function:
@inline function barrier(flag=0)
Base.llvmcall(("""
declare void @air.wg.barrier(i32, i32) #1
define void @entry(i32 %flag) #0 {
call void @air.wg.barrier(i32 %flag, i32 1)
ret void
}
attributes #0 = { alwaysinline }
attributes #1 = { convergent }""", "entry"),
Nothing, Tuple{Cuint}, convert(Cuint, flag))
endNote how air.wg.barrier has been marked with the convergent attribute. Julia's code_llvm keeps that around:
julia> f() = barrier()
f (generic function with 1 method)
julia> code_llvm(f, Tuple{}; raw=true, dump_module=true)
; Function Attrs: convergent
declare void @air.wg.barrier(i32, i32) #2
GPUCompiler doesn't:
julia> Metal.code_llvm(f, Tuple{}; raw=true, dump_module=true)
declare void @air.wg.barrier(i32, i32) local_unnamed_addr
That's bad.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working