Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SparseArraysExt = "SparseArrays"
Adapt = "0.4, 1.0, 2.0, 3.0, 4"
Atomix = "0.1, 1"
EnzymeCore = "0.7, 0.8.1"
GPUCompiler = "1.13.3"
GPUCompiler = "1.23"
InteractiveUtils = "1.6"
LLVM = "9.4.1"
LinearAlgebra = "1.6"
Expand Down
1 change: 0 additions & 1 deletion src/KernelAbstractions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import PrecompileTools
import Atomix: @atomic, @atomicswap, @atomicreplace

using MacroTools
using StaticArrays
using Adapt

"""
Expand Down
8 changes: 5 additions & 3 deletions src/pocl/backend.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ using ..POCL: device, clconvert, clfunction
import KernelAbstractions as KA
import KernelAbstractions.KernelIntrinsics as KI

import StaticArrays

import Adapt


Expand Down Expand Up @@ -222,7 +220,11 @@ end
end

@device_override @inline function KA.Scratchpad(ctx, ::Type{T}, ::Val{Dims}) where {T, Dims}
StaticArrays.MArray{KA.__size(Dims), T}(undef)
# private per-workitem scratch: a stack `alloca` (lowered by GPUCompiler) wrapped in a
# device array. the slot lives in OpenCL "Function" storage (LLVM addrspace 0), which is
# where the SPIR-V target places allocas.
ptr = POCL.GPUCompiler.alloca(T, Val(prod(Dims)))
CLDeviceArray(Dims, reinterpret(POCL.LLVMPtr{T, POCL.AS.Function}, ptr))
end


Expand Down
Loading