Skip to content

Commit

Permalink
Switch to SPIRVIntrinsics.jl. (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt authored Oct 22, 2024
1 parent 25cf3e0 commit ff6180c
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 1,014 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "oneAPI"
uuid = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b"
authors = ["Tim Besard <[email protected]>"]
version = "1.6.1"
version = "2.0.0"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand All @@ -17,6 +17,7 @@ NEO_jll = "700fe977-ac61-5f37-bbc8-c6c4b2b6a9fd"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SPIRVIntrinsics = "71d1d633-e7e8-4a92-83a1-de8814b09ba8"
SPIRV_LLVM_Translator_unified_jll = "85f0d8ed-5b39-5caa-b1ae-7472de402361"
SPIRV_Tools_jll = "6ac6d60f-d740-5983-97d7-a4482c0689f4"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Expand All @@ -36,6 +37,7 @@ KernelAbstractions = "0.9.1"
LLVM = "6, 7, 8, 9"
NEO_jll = "=24.26.30049"
Preferences = "1"
SPIRVIntrinsics = "0.2"
SPIRV_LLVM_Translator_unified_jll = "0.4"
SpecialFunctions = "1.3, 2"
StaticArrays = "1"
Expand Down
15 changes: 14 additions & 1 deletion src/device/array.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contiguous on-device arrays

export oneDeviceArray, oneDeviceVector, oneDeviceMatrix
export oneDeviceArray, oneDeviceVector, oneDeviceMatrix, oneLocalArray


## construction
Expand Down Expand Up @@ -240,3 +240,16 @@ function Base.reinterpret(::Type{T}, a::oneDeviceArray{S,N,A}) where {T,S,N,A}
osize = tuple(size1, Base.tail(isize)...)
return oneDeviceArray{T,N,A}(osize, reinterpret(LLVMPtr{T,A}, a.ptr), a.maxsize)
end


## local memory

export oneLocalArray

@inline function oneLocalArray(::Type{T}, dims) where {T}
len = prod(dims)
# NOTE: this relies on const-prop to forward the literal length to the generator.
# maybe we should include the size in the type, like StaticArrays does?
ptr = emit_localmemory(T, Val(len))
oneDeviceArray(dims, ptr)
end
264 changes: 0 additions & 264 deletions src/device/opencl/atomic.jl

This file was deleted.

53 changes: 0 additions & 53 deletions src/device/opencl/integer.jl

This file was deleted.

Loading

0 comments on commit ff6180c

Please sign in to comment.