Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move backend to GPUArraysCore.jl #420

Merged
merged 5 commits into from
Aug 17, 2022
Merged
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
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "GPUArrays"
uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
version = "8.4.2"
version = "8.4.3"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand All @@ -15,7 +15,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
Adapt = "2.0, 3.0"
GPUArraysCore = "= 0.1.1"
GPUArraysCore = "= 0.1.2"
LLVM = "3.9, 4"
Reexport = "1"
julia = "1.6"
2 changes: 1 addition & 1 deletion lib/GPUArraysCore/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GPUArraysCore"
uuid = "46192b85-c4d5-4398-a991-12ede77f4527"
authors = ["Tim Besard <[email protected]>"]
version = "0.1.1"
version = "0.1.2"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
8 changes: 8 additions & 0 deletions lib/GPUArraysCore/src/GPUArraysCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,13 @@ macro allowscalar(ex)
end
end

"""
backend(T::Type)
maleadt marked this conversation as resolved.
Show resolved Hide resolved
backend(x)

Gets the GPUArrays back-end responsible for managing arrays of type `T`.
"""
backend(::Type) = error("This object is not a GPU array") # COV_EXCL_LINE
maleadt marked this conversation as resolved.
Show resolved Hide resolved
backend(x) = backend(typeof(x))

end # module GPUArraysCore
4 changes: 2 additions & 2 deletions lib/JLArrays/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "JLArrays"
uuid = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb"
authors = ["Tim Besard <[email protected]>"]
version = "0.1.0"
version = "0.1.1"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand All @@ -10,5 +10,5 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[compat]
Adapt = "2.0, 3.0"
GPUArrays = "8.4.1"
GPUArrays = "~8.4.1"
julia = "1.6"
9 changes: 1 addition & 8 deletions src/device/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@ abstract type AbstractGPUBackend end

abstract type AbstractKernelContext end

"""
backend(T::Type)
backend(x)

Gets the GPUArrays back-end responsible for managing arrays of type `T`.
"""
backend(::Type) = error("This object is not a GPU array") # COV_EXCL_LINE
backend(x) = backend(typeof(x))
import GPUArraysCore: backend
maleadt marked this conversation as resolved.
Show resolved Hide resolved

"""
gpu_call(kernel::Function, arg0, args...; kwargs...)
Expand Down