Skip to content

Commit

Permalink
Upgrade to KernelAbstractions.jl v0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-ramadhan committed Apr 9, 2021
1 parent a055328 commit e956c8e
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 34 deletions.
68 changes: 39 additions & 29 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ version = "1.0.1"

[[Adapt]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "ffcfa2d345aaee0ef3d8346a073d5dd03c983ebe"
git-tree-sha1 = "f1b523983a58802c4695851926203b36e28f09db"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
version = "3.2.0"
version = "3.3.0"

[[ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"

[[ArrayInterface]]
deps = ["IfElse", "LinearAlgebra", "Requires", "SparseArrays", "Static"]
git-tree-sha1 = "ce17bad65d0842b34a15fffc8879a9f68f08a67f"
git-tree-sha1 = "2fbfa5f372352f92191b63976d070dc7195f47a4"
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version = "3.1.6"
version = "3.1.7"

[[Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Expand All @@ -46,9 +46,15 @@ version = "0.1.1"

[[CUDA]]
deps = ["AbstractFFTs", "Adapt", "BFloat16s", "CEnum", "CompilerSupportLibraries_jll", "DataStructures", "ExprTools", "GPUArrays", "GPUCompiler", "LLVM", "LazyArtifacts", "Libdl", "LinearAlgebra", "Logging", "MacroTools", "Memoize", "NNlib", "Printf", "Random", "Reexport", "Requires", "SparseArrays", "Statistics", "TimerOutputs"]
git-tree-sha1 = "870e029382294443a6578190e992bf4cbfd34e22"
git-tree-sha1 = "6893a46f357eabd44ce0fc1f9a264120a1a3a732"
uuid = "052768ef-5323-5732-b1bb-66c8b64840ba"
version = "2.6.2"
version = "2.6.3"

[[CUDAKernels]]
deps = ["Adapt", "CUDA", "Cassette", "KernelAbstractions", "SpecialFunctions", "StaticArrays"]
git-tree-sha1 = "0daaee29c30f1ea9e1a8f7c9d92b00d07aba0fa0"
uuid = "72cfdca4-0801-4ab0-bf6a-d52aa10adc57"
version = "0.1.0"

[[Cassette]]
git-tree-sha1 = "742fbff99a2798f02bd37d25087efb5615b5a207"
Expand All @@ -57,9 +63,9 @@ version = "0.3.5"

[[ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "0893f8d90331a0f5223c7ef2a8868464394a886c"
git-tree-sha1 = "44e9f638aa9ed1ad58885defc568c133010140aa"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "0.9.33"
version = "0.9.37"

[[CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
Expand All @@ -69,9 +75,9 @@ version = "0.7.0"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "919c7f3151e79ff196add81d7f4e45d91bbf420b"
git-tree-sha1 = "ac4132ad78082518ec2037ae5770b6e796f7f956"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.25.0"
version = "3.27.0"

[[CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
Expand Down Expand Up @@ -156,9 +162,9 @@ version = "3.3.9+7"

[[GPUArrays]]
deps = ["AbstractFFTs", "Adapt", "LinearAlgebra", "Printf", "Random", "Serialization"]
git-tree-sha1 = "f99a25fe0313121f2f9627002734c7d63b4dd3bd"
git-tree-sha1 = "9c95b2fd5c16bc7f97371e9f92f0fef77e0f5957"
uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
version = "6.2.0"
version = "6.2.2"

[[GPUCompiler]]
deps = ["DataStructures", "ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "Scratch", "Serialization", "TimerOutputs", "UUIDs"]
Expand Down Expand Up @@ -215,10 +221,10 @@ uuid = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
version = "1.8.0"

[[KernelAbstractions]]
deps = ["Adapt", "CUDA", "Cassette", "InteractiveUtils", "MacroTools", "SpecialFunctions", "StaticArrays", "UUIDs"]
git-tree-sha1 = "fa2b7f835f2a9579a86a3bf26fb7ee5b75a68202"
deps = ["Adapt", "Cassette", "InteractiveUtils", "MacroTools", "SpecialFunctions", "StaticArrays", "UUIDs"]
git-tree-sha1 = "0158a3efe86a7c0a3162ded188172a0ad302353b"
uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
version = "0.5.4"
version = "0.6.0"

[[LLVM]]
deps = ["CEnum", "Libdl", "Printf", "Unicode"]
Expand Down Expand Up @@ -264,9 +270,9 @@ version = "2021.1.1+1"

[[MPI]]
deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "Pkg", "Random", "Requires", "Serialization", "Sockets"]
git-tree-sha1 = "c6490dd65713ade59594223f3d498feef7b08f44"
git-tree-sha1 = "6e8c30afdcbb6167cf5d470b6333f4db01cc366f"
uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195"
version = "0.17.1"
version = "0.17.2"

[[MPICH_jll]]
deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"]
Expand Down Expand Up @@ -313,10 +319,10 @@ uuid = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
version = "0.11.3"

[[NNlib]]
deps = ["ChainRulesCore", "Compat", "LinearAlgebra", "Pkg", "Requires", "Statistics"]
git-tree-sha1 = "ab1d43fead2ecb9aa5ae460d3d547c2cf8d89461"
deps = ["Adapt", "ChainRulesCore", "Compat", "LinearAlgebra", "Pkg", "Requires", "Statistics"]
git-tree-sha1 = "723c0d5252bf95808f934b2384519dd325869f40"
uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
version = "0.7.17"
version = "0.7.18"

[[NaNMath]]
git-tree-sha1 = "bfe47e760d60b82b66b61d2d44128b62e3a369fb"
Expand Down Expand Up @@ -380,7 +386,7 @@ uuid = "4a48f351-57a6-4416-9ec4-c37015456aae"
version = "0.12.2"

[[Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs"]
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Printf]]
Expand Down Expand Up @@ -476,25 +482,25 @@ uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[StructArrays]]
deps = ["Adapt", "DataAPI", "Tables"]
git-tree-sha1 = "26ea43b4be7e919a2390c3c0f824e7eb4fc19a0a"
git-tree-sha1 = "44b3afd37b17422a62aea25f04c1f7e09ce6b07f"
uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
version = "0.5.0"
version = "0.5.1"

[[StructTypes]]
deps = ["Dates", "UUIDs"]
git-tree-sha1 = "89b390141d2fb2ef3ac2dc32e336f7a5c4810751"
git-tree-sha1 = "5eaf731e88587bb72a6c1262c0a014cd1859a08d"
uuid = "856f2bd8-1eba-4b0a-8007-ebc267875bd4"
version = "1.5.0"
version = "1.5.2"

[[TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

[[TableTraits]]
deps = ["IteratorInterfaceExtensions"]
git-tree-sha1 = "b1ad568ba658d8cbb3b892ed5380a6f3e781a81e"
git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39"
uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c"
version = "1.0.0"
version = "1.0.1"

[[Tables]]
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "TableTraits", "Test"]
Expand All @@ -508,9 +514,9 @@ uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"

[[TaylorSeries]]
deps = ["InteractiveUtils", "LinearAlgebra", "Markdown", "Requires", "SparseArrays"]
git-tree-sha1 = "39523982677336d055907fe734b30b9951b2cadc"
git-tree-sha1 = "689b31ce044e419621706c6a876f8d07c7b5318c"
uuid = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea"
version = "0.10.11"
version = "0.10.12"

[[Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
Expand Down Expand Up @@ -548,3 +554,7 @@ uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
[[nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"

[[p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version = "0.54.1"
[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
CUDAKernels = "72cfdca4-0801-4ab0-bf6a-d52aa10adc57"
Crayons = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
CubedSphere = "7445602f-e544-4518-8976-18f8e8ae6cdb"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down Expand Up @@ -32,13 +33,13 @@ Tullio = "bc48ee85-29a4-5162-ae0b-a64e1601d4bc"

[compat]
Adapt = "^2, ^3"
CUDA = "^1, ^2"
CUDA = "2, 3"
Crayons = "^4"
CubedSphere = "0.1"
FFTW = "^1"
Glob = "1.3"
JLD2 = "^0.2, ^0.3, 0.4"
KernelAbstractions = "^0.3, 0.4, 0.5"
KernelAbstractions = "0.6"
MPI = "0.16, 0.17"
NCDatasets = "^0.10, ^0.11"
OffsetArrays = "^1.4"
Expand Down
4 changes: 2 additions & 2 deletions src/Architectures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export
device, architecture, array_type, arch_array

using CUDA

using KernelAbstractions
using CUDAKernels

"""
AbstractArchitecture
Expand Down Expand Up @@ -57,7 +57,7 @@ macro hascuda(expr)
end

device(::AbstractCPUArchitecture) = KernelAbstractions.CPU()
device(::AbstractGPUArchitecture) = KernelAbstractions.CUDADevice()
device(::AbstractGPUArchitecture) = CUDAKernels.CUDADevice()

architecture(::Number) = nothing
architecture(::Array) = CPU()
Expand Down
2 changes: 1 addition & 1 deletion src/Fields/set!.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using CUDA
using KernelAbstractions: @kernel, @index, CUDADevice
using KernelAbstractions: @kernel, @index
using Oceananigans.Architectures: device, GPU
using Oceananigans.Utils: work_layout

Expand Down

0 comments on commit e956c8e

Please sign in to comment.