Skip to content

Commit 78fe005

Browse files
authored
Merge pull request #68 from yuehhua/update_cuda
Update to CUDA.jl 1.2 and Flux 0.11
2 parents b8ff9a7 + 878f24d commit 78fe005

File tree

12 files changed

+122
-134
lines changed

12 files changed

+122
-134
lines changed

Manifest.toml

Lines changed: 93 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ version = "0.3.3"
1414

1515
[[Adapt]]
1616
deps = ["LinearAlgebra"]
17-
git-tree-sha1 = "fd04049c7dd78cfef0b06cdc1f0f181467655712"
17+
git-tree-sha1 = "0fac443759fa829ed8066db6cf1077d888bb6573"
1818
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
19-
version = "1.1.0"
19+
version = "2.0.2"
2020

2121
[[ArnoldiMethod]]
2222
deps = ["DelimitedFiles", "LinearAlgebra", "Random", "SparseArrays", "StaticArrays", "Test"]
@@ -26,9 +26,9 @@ version = "0.0.4"
2626

2727
[[ArrayLayouts]]
2828
deps = ["FillArrays", "LinearAlgebra"]
29-
git-tree-sha1 = "a3254b3780a3544838ca0b7e23b1e9b06eb71bd8"
29+
git-tree-sha1 = "6f6e33efac70fc24c1f2a654a090b7af01690ffe"
3030
uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
31-
version = "0.3.5"
31+
version = "0.3.7"
3232

3333
[[Base64]]
3434
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
@@ -40,45 +40,27 @@ uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
4040
version = "0.5.10"
4141

4242
[[CEnum]]
43-
git-tree-sha1 = "1b77a77c3b28e0b3f413f7567c9bb8dd9bdccd14"
43+
git-tree-sha1 = "215a9aa4a1f23fbd05b92769fdd62559488d70e9"
4444
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
45-
version = "0.3.0"
46-
47-
[[CUDAapi]]
48-
deps = ["Libdl", "Logging"]
49-
git-tree-sha1 = "831b825d10104bd29e28f6da93312a976830717b"
50-
uuid = "3895d2a7-ec45-59b8-82bb-cfc6a382f9b3"
51-
version = "4.0.0"
45+
version = "0.4.1"
5246

53-
[[CUDAdrv]]
54-
deps = ["CEnum", "CUDAapi", "Printf"]
55-
git-tree-sha1 = "f56bbf18c86bcff7a961a32a4947a5abb2963a29"
56-
uuid = "c5f51814-7f29-56b8-a69c-e4d8f6be1fde"
57-
version = "6.3.0"
58-
59-
[[CUDAnative]]
60-
deps = ["Adapt", "BinaryProvider", "CEnum", "CUDAapi", "CUDAdrv", "ExprTools", "GPUCompiler", "LLVM", "Libdl", "Pkg", "Printf"]
61-
git-tree-sha1 = "ac86db2b05fdfec96b011e25a504ffe7476e8a68"
62-
uuid = "be33ccc6-a3ff-5ff2-a52e-74243cff1e17"
63-
version = "3.1.0"
47+
[[CUDA]]
48+
deps = ["AbstractFFTs", "Adapt", "BinaryProvider", "CEnum", "DataStructures", "ExprTools", "GPUArrays", "GPUCompiler", "LLVM", "Libdl", "LinearAlgebra", "Logging", "MacroTools", "NNlib", "Pkg", "Printf", "Random", "Reexport", "Requires", "SparseArrays", "Statistics", "TimerOutputs"]
49+
git-tree-sha1 = "66dbcc0d8e9470358d57aa52dbe74f97bab31a7f"
50+
uuid = "052768ef-5323-5732-b1bb-66c8b64840ba"
51+
version = "1.2.0"
6452

6553
[[ChainRules]]
66-
deps = ["ChainRulesCore", "LinearAlgebra", "Reexport", "Requires", "Statistics"]
67-
git-tree-sha1 = "76cd719cb7ab57bd2687dcb3b186c4f99820a79d"
54+
deps = ["ChainRulesCore", "LinearAlgebra", "Random", "Reexport", "Requires", "Statistics"]
55+
git-tree-sha1 = "fbc6ca7a758b15cbb18df4936b2f588fbf3abdda"
6856
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
69-
version = "0.6.5"
57+
version = "0.7.10"
7058

7159
[[ChainRulesCore]]
7260
deps = ["MuladdMacro"]
73-
git-tree-sha1 = "c384e0e4fe6bfeb6bec0d41f71cc5e391cd110ba"
61+
git-tree-sha1 = "87e289253a5fc690c4860a41bbd427e16576f716"
7462
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
75-
version = "0.8.1"
76-
77-
[[CodeTracking]]
78-
deps = ["InteractiveUtils", "UUIDs"]
79-
git-tree-sha1 = "9c173f62af93cce8af2bd3527d160b6ddd6eaf81"
80-
uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
81-
version = "1.0.0"
63+
version = "0.9.3"
8264

8365
[[CodecZlib]]
8466
deps = ["TranscodingStreams", "Zlib_jll"]
@@ -110,17 +92,11 @@ git-tree-sha1 = "7c4f882c41faa72118841185afc58a2eb00ef612"
11092
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
11193
version = "0.3.3+0"
11294

113-
[[Cthulhu]]
114-
deps = ["CodeTracking", "FoldingTrees", "InteractiveUtils", "REPL", "UUIDs", "Unicode"]
115-
git-tree-sha1 = "34bf82a46f0600727673e3cbed9a5908efff3c0c"
116-
uuid = "f68482b8-f384-11e8-15f7-abe071a5a75f"
117-
version = "1.2.0"
118-
119-
[[CuArrays]]
120-
deps = ["AbstractFFTs", "Adapt", "CEnum", "CUDAapi", "CUDAdrv", "CUDAnative", "DataStructures", "GPUArrays", "Libdl", "LinearAlgebra", "MacroTools", "NNlib", "Pkg", "Printf", "Random", "Reexport", "Requires", "SparseArrays", "Statistics", "TimerOutputs"]
121-
git-tree-sha1 = "55ab24cc3fcf96f74246cf7e14bc9c2f818facbc"
122-
uuid = "3a865a2d-5b23-5a0f-bc46-62713ec82fae"
123-
version = "2.2.2"
95+
[[CpuId]]
96+
deps = ["Markdown", "Test"]
97+
git-tree-sha1 = "f0464e499ab9973b43c20f8216d088b61fda80c6"
98+
uuid = "adafc99b-e345-5852-983c-f28acb93d879"
99+
version = "0.2.2"
124100

125101
[[DataAPI]]
126102
git-tree-sha1 = "176e23402d80e7743fc26c19c681bfb11246af32"
@@ -157,6 +133,12 @@ version = "1.0.1"
157133
deps = ["Random", "Serialization", "Sockets"]
158134
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
159135

136+
[[DocStringExtensions]]
137+
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
138+
git-tree-sha1 = "c5714d9bcdba66389612dc4c47ed827c64112997"
139+
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
140+
version = "0.8.2"
141+
160142
[[ExprTools]]
161143
git-tree-sha1 = "6f0517056812fd6aa3af23d4b70d5325a2ae4e95"
162144
uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
@@ -170,9 +152,9 @@ version = "1.3.0"
170152

171153
[[FillArrays]]
172154
deps = ["LinearAlgebra", "Random", "SparseArrays"]
173-
git-tree-sha1 = "4783bbbeade37f2a8bd82af6c112510fde78e532"
155+
git-tree-sha1 = "be4180bdb27a11188d694ee3773122f4921f1a62"
174156
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
175-
version = "0.8.12"
157+
version = "0.8.13"
176158

177159
[[FixedPointNumbers]]
178160
deps = ["Statistics"]
@@ -181,38 +163,38 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
181163
version = "0.8.2"
182164

183165
[[Flux]]
184-
deps = ["AbstractTrees", "Adapt", "CodecZlib", "Colors", "CuArrays", "DelimitedFiles", "Juno", "MacroTools", "NNlib", "Pkg", "Printf", "Random", "Reexport", "SHA", "Statistics", "StatsBase", "Test", "ZipFile", "Zygote"]
185-
git-tree-sha1 = "eb5801eea6294851dc2b16b20669f91776e79a3b"
166+
deps = ["AbstractTrees", "Adapt", "CUDA", "CodecZlib", "Colors", "DelimitedFiles", "Functors", "Juno", "LinearAlgebra", "MacroTools", "NNlib", "Pkg", "Printf", "Random", "Reexport", "SHA", "Statistics", "StatsBase", "Test", "ZipFile", "Zygote"]
167+
git-tree-sha1 = "a95bba0ee46dc320b34969fa246cc965c20c2c10"
186168
uuid = "587475ba-b771-5e3f-ad9e-33799f191a9c"
187-
version = "0.10.4"
188-
189-
[[FoldingTrees]]
190-
deps = ["AbstractTrees", "REPL"]
191-
git-tree-sha1 = "9a1e497cba7c33e5951aaffd9a421fa713acba0b"
192-
uuid = "1eca21be-9b9b-4ed8-839a-6d8ae26b1781"
193-
version = "1.0.0"
169+
version = "0.11.0"
194170

195171
[[ForwardDiff]]
196172
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "NaNMath", "Random", "SpecialFunctions", "StaticArrays"]
197173
git-tree-sha1 = "1d090099fb82223abc48f7ce176d3f7696ede36d"
198174
uuid = "f6369f11-7733-5829-9624-2563aa707210"
199175
version = "0.10.12"
200176

177+
[[Functors]]
178+
deps = ["MacroTools"]
179+
git-tree-sha1 = "f40adc6422f548176bb4351ebd29e4abf773040a"
180+
uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196"
181+
version = "0.1.0"
182+
201183
[[Future]]
202184
deps = ["Random"]
203185
uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"
204186

205187
[[GPUArrays]]
206188
deps = ["AbstractFFTs", "Adapt", "LinearAlgebra", "Printf", "Random", "Serialization"]
207-
git-tree-sha1 = "d887693eb1bd5e1fd573262a978745481895ec7d"
189+
git-tree-sha1 = "0aaa4ff7001086e190a00180495b93b00df8bb43"
208190
uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
209-
version = "3.4.1"
191+
version = "4.0.1"
210192

211193
[[GPUCompiler]]
212-
deps = ["Cthulhu", "DataStructures", "InteractiveUtils", "LLVM", "Libdl", "TimerOutputs"]
213-
git-tree-sha1 = "5275aa268ecd09640b32560e1eae90c78816e4d1"
194+
deps = ["DataStructures", "InteractiveUtils", "LLVM", "Libdl", "TimerOutputs", "UUIDs"]
195+
git-tree-sha1 = "6f46f295e8e504fce363caf2a28a2a56270681c0"
214196
uuid = "61eb1bfa-7361-4325-ad38-22787b887f55"
215-
version = "0.2.0"
197+
version = "0.5.3"
216198

217199
[[IRTools]]
218200
deps = ["InteractiveUtils", "MacroTools", "Test"]
@@ -243,9 +225,9 @@ version = "0.8.2"
243225

244226
[[LLVM]]
245227
deps = ["CEnum", "Libdl", "Printf", "Unicode"]
246-
git-tree-sha1 = "d9c6e1efcaa6c2fcd043da812a62b3e489a109a3"
228+
git-tree-sha1 = "a662366a5d485dee882077e8da3e1a95a86d097f"
247229
uuid = "929cbde3-209d-540e-8aea-75f648917ca0"
248-
version = "1.7.0"
230+
version = "2.0.0"
249231

250232
[[LibGit2]]
251233
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
@@ -266,6 +248,12 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
266248
[[Logging]]
267249
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
268250

251+
[[LoopVectorization]]
252+
deps = ["DocStringExtensions", "LinearAlgebra", "OffsetArrays", "SIMDPirates", "SLEEFPirates", "UnPack", "VectorizationBase"]
253+
git-tree-sha1 = "4c002de66221639174e081ec74c156e9013e4afa"
254+
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
255+
version = "0.8.17"
256+
269257
[[MacroTools]]
270258
deps = ["Markdown", "Random"]
271259
git-tree-sha1 = "f7d2e3f654af75f01ec49be82c231c382214223a"
@@ -302,16 +290,27 @@ git-tree-sha1 = "c6190f9a7fc5d9d5915ab29f2134421b12d24a68"
302290
uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
303291
version = "0.2.2"
304292

293+
[[NNPACK_jll]]
294+
deps = ["Libdl", "Pkg"]
295+
git-tree-sha1 = "c3d1a616362645754b18e12dbba96ec311b0867f"
296+
uuid = "a6bfbf70-4841-5cb9-aa18-3a8ad3c413ee"
297+
version = "2018.6.22+0"
298+
305299
[[NNlib]]
306-
deps = ["BinaryProvider", "Libdl", "LinearAlgebra", "Requires", "Statistics"]
307-
git-tree-sha1 = "d9f196d911f55aeaff11b11f681b135980783824"
300+
deps = ["Libdl", "LinearAlgebra", "LoopVectorization", "NNPACK_jll", "Pkg", "Requires", "Statistics"]
301+
git-tree-sha1 = "1d8128735fdf3ab1643dd8bc9499e4b34ccb718d"
308302
uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
309-
version = "0.6.6"
303+
version = "0.7.3"
310304

311305
[[NaNMath]]
312-
git-tree-sha1 = "928b8ca9b2791081dc71a51c55347c27c618760f"
306+
git-tree-sha1 = "c84c576296d0e2fbb3fc134d3e09086b3ea617cd"
313307
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
314-
version = "0.3.3"
308+
version = "0.3.4"
309+
310+
[[OffsetArrays]]
311+
git-tree-sha1 = "4ba4cd84c88df8340da1c3e2d8dcb9d18dd1b53b"
312+
uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
313+
version = "1.1.1"
315314

316315
[[OpenSpecFun_jll]]
317316
deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"]
@@ -359,6 +358,18 @@ version = "1.0.1"
359358
[[SHA]]
360359
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
361360

361+
[[SIMDPirates]]
362+
deps = ["VectorizationBase"]
363+
git-tree-sha1 = "cbe8797ac354d0b1dfe75d983429938db834b706"
364+
uuid = "21efa798-c60a-11e8-04d3-e1a92915a26a"
365+
version = "0.8.16"
366+
367+
[[SLEEFPirates]]
368+
deps = ["Libdl", "SIMDPirates", "VectorizationBase"]
369+
git-tree-sha1 = "c750d618b7c8268a97e55c70e8c88e56080d30fa"
370+
uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa"
371+
version = "0.5.4"
372+
362373
[[Serialization]]
363374
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
364375

@@ -433,9 +444,20 @@ version = "0.9.5"
433444
deps = ["Random", "SHA"]
434445
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
435446

447+
[[UnPack]]
448+
git-tree-sha1 = "d4bfa022cd30df012700cf380af2141961bb3bfb"
449+
uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
450+
version = "1.0.1"
451+
436452
[[Unicode]]
437453
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
438454

455+
[[VectorizationBase]]
456+
deps = ["CpuId", "Libdl", "LinearAlgebra"]
457+
git-tree-sha1 = "95c0c737c307dfd4f65ad50a79856b343fdb7959"
458+
uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
459+
version = "0.12.24"
460+
439461
[[ZipFile]]
440462
deps = ["Libdl", "Printf", "Zlib_jll"]
441463
git-tree-sha1 = "254975fef2fc526583bb9b7c9420fe66ffe09f2f"
@@ -449,10 +471,10 @@ uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
449471
version = "1.2.11+14"
450472

451473
[[Zygote]]
452-
deps = ["AbstractFFTs", "ArrayLayouts", "ChainRules", "FillArrays", "ForwardDiff", "Future", "IRTools", "InteractiveUtils", "LinearAlgebra", "MacroTools", "NNlib", "Random", "Requires", "Statistics", "ZygoteRules"]
453-
git-tree-sha1 = "2e2c82549fb0414df10469082fd001e2ede8547c"
474+
deps = ["AbstractFFTs", "ArrayLayouts", "ChainRules", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "Future", "IRTools", "InteractiveUtils", "LinearAlgebra", "LoopVectorization", "MacroTools", "NNlib", "NaNMath", "Random", "Requires", "SpecialFunctions", "Statistics", "ZygoteRules"]
475+
git-tree-sha1 = "16a7228209e6f457e9d71c39a58965616425384e"
454476
uuid = "e88e6eb3-aa80-5325-afca-941959d7151f"
455-
version = "0.4.22"
477+
version = "0.5.3"
456478

457479
[[ZygoteRules]]
458480
deps = ["MacroTools"]

Project.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ authors = ["Yueh-Hua Tu <a504082002@gmail.com>"]
44
version = "0.6.0"
55

66
[deps]
7-
CUDAapi = "3895d2a7-ec45-59b8-82bb-cfc6a382f9b3"
8-
CUDAnative = "be33ccc6-a3ff-5ff2-a52e-74243cff1e17"
9-
CuArrays = "3a865a2d-5b23-5a0f-bc46-62713ec82fae"
7+
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
108
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
119
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
1210
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
@@ -23,9 +21,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
2321
ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"
2422

2523
[compat]
26-
CUDAapi = "3, 4.0"
27-
CUDAnative = "2.10, 3.0, 3.1"
28-
CuArrays = "1.7.1, 1.7.2, 2.0, 2.1, 2.2"
24+
CUDA = "1.2"
2925
DataStructures = "~0.17"
3026
FillArrays = "^0.8.5"
3127
Flux = "~0.10, 0.11"

examples/gae.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using Statistics: mean
77
using SparseArrays
88
using LightGraphs.SimpleGraphs
99
using LightGraphs: adjacency_matrix
10-
using CuArrays
10+
using CUDA
1111

1212
@load "data/cora_features.jld2" features
1313
@load "data/cora_graph.jld2" g

examples/gcn.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using Statistics: mean
77
using SparseArrays
88
using LightGraphs.SimpleGraphs
99
using LightGraphs: adjacency_matrix
10-
using CuArrays
10+
using CUDA
1111

1212
@load "data/cora_features.jld2" features
1313
@load "data/cora_labels.jld2" labels

src/GeometricFlux.jl

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,6 @@ export
109109
gather,
110110
topk_index
111111

112-
using CUDAapi
113-
if has_cuda()
114-
try
115-
using CuArrays
116-
@eval has_cuarrays() = true
117-
catch ex
118-
@warn "CUDA is installed, but CuArrays.jl fails to load" exception=(ex,catch_backtrace())
119-
@eval has_cuarrays() = false
120-
end
121-
else
122-
has_cuarrays() = false
123-
end
124-
125112
const IntOrTuple = Union{Integer,Tuple}
126113

127114
include("operations/scatter.jl")
@@ -145,16 +132,15 @@ include("graph/simplegraphs.jl")
145132

146133

147134
function __init__()
148-
@require CuArrays = "3a865a2d-5b23-5a0f-bc46-62713ec82fae" begin
149-
using CUDAnative
150-
using CuArrays: CuArray, CuMatrix, CuVector
151-
import CuArrays: cu
135+
@require CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" begin
136+
using CUDA
137+
using CUDA: @cuda
138+
import CUDA: cu
152139
include("cuda/scatter.jl")
153140
include("cuda/msgpass.jl")
154141
include("cuda/conv.jl")
155142
include("cuda/pool.jl")
156143
include("cuda/utils.jl")
157-
CuArrays.cu(x::Array{<:Integer}) = CuArray(x)
158144
end
159145
@require SimpleWeightedGraphs = "47aef6b3-ad0c-573a-a1e2-d07658019622" begin
160146
include("graph/weightedgraphs.jl")

0 commit comments

Comments
 (0)