Compiler emits loads from singleton CPU instances
- Dominant language
- Julia
- Stars
- 1.4k
- Forks
- 281
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 30
Description
```julia
julia> using CUDA, StaticArrays
julia> function kernel(::RS)
Tuple{RS.parameters[1]...}
return
end
ERROR: UndefVarError: RS not defined
Stacktrace:
[1] top-level scope at REPL[3]:1
julia> function kernel(::RS) where RS
Tuple{RS.parameters[1]...}
return
end
kernel (generic function with 1 method)
julia> s = Size(3,3)
Size(3, 3)
julia> @device_code_llvm @cuda threads=1 kernel(s)
; PTX CompilerJob of kernel kernel(Size{(3, 3)}) for sm_75
; @ REPL[4]:1 within `kernel'
define dso_local ptx_kernel void @_Z17julia_kernel_20624SizeI6_3__3_E() local_unnamed_addr {
top:
; @ REPL[4]:2 within `kernel'
; ┌ @ Base.jl:28 within `getproperty'
%0 = load %jl_value_t*, %jl_value_t** inttoptr (i64 140449478951712 to %jl_value_t**), align 32
; └
call fastcc void @julia_getindex_2065(%jl_value_t* %0, i64 1)
; @ REPL[4]:3 within `kernel'
ret void
}
julia> synchronize()
ERROR: CUDA error: an illegal memory access was encountered (code 700, ERROR_ILLEGAL_ADDRESS)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.