diff --git a/Project.toml b/Project.toml index 863188d4..7e22dd20 100644 --- a/Project.toml +++ b/Project.toml @@ -40,7 +40,7 @@ LLVM = "9.4.1" LinearAlgebra = "1.6" MacroTools = "0.5" PrecompileTools = "1" -SPIRVIntrinsics = "0.4" +SPIRVIntrinsics = "0.5" SPIRV_LLVM_Backend_jll = "20" SPIRV_Tools_jll = "2024.4, 2025.1" SparseArrays = "<0.0.1, 1.6" diff --git a/src/pocl/backend.jl b/src/pocl/backend.jl index e733cae3..87fccdb9 100644 --- a/src/pocl/backend.jl +++ b/src/pocl/backend.jl @@ -1,7 +1,7 @@ module POCLKernels using ..POCL -using ..POCL: @device_override, SPIRVIntrinsics, cl, method_table +using ..POCL: @device_override, cl, method_table using ..POCL: device import KernelAbstractions as KA @@ -178,7 +178,7 @@ end ## Shared and Scratch Memory @device_override @inline function KA.SharedMemory(::Type{T}, ::Val{Dims}, ::Val{Id}) where {T, Dims, Id} - ptr = SPIRVIntrinsics.emit_localmemory(T, Val(prod(Dims))) + ptr = POCL.emit_localmemory(T, Val(prod(Dims))) CLDeviceArray(Dims, ptr) end @@ -190,11 +190,11 @@ end ## Synchronization and Printing @device_override @inline function KA.__synchronize() - SPIRVIntrinsics.barrier(SPIRVIntrinsics.CLK_LOCAL_MEM_FENCE | SPIRVIntrinsics.CLK_GLOBAL_MEM_FENCE) + work_group_barrier(POCL.LOCAL_MEM_FENCE | POCL.GLOBAL_MEM_FENCE) end @device_override @inline function KA.__print(args...) - SPIRVIntrinsics._print(args...) + POCL._print(args...) end diff --git a/src/pocl/compiler/compilation.jl b/src/pocl/compiler/compilation.jl index 1a561b79..3d5930d4 100644 --- a/src/pocl/compiler/compilation.jl +++ b/src/pocl/compiler/compilation.jl @@ -16,7 +16,8 @@ GPUCompiler.isintrinsic(job::OpenCLCompilerJob, fn::String) = Tuple{CompilerJob{SPIRVCompilerTarget}, typeof(fn)}, job, fn ) || - in(fn, opencl_builtins) + in(fn, known_intrinsics) || + contains(fn, "__spirv_") ## compiler implementation (cache, configure, compile, and link)